Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bootstrap with clang >= 15 and gcc >= 13 #18167

Closed
aaronmondal opened this issue Apr 21, 2023 · 3 comments
Closed

Can't bootstrap with clang >= 15 and gcc >= 13 #18167

aaronmondal opened this issue Apr 21, 2023 · 3 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@aaronmondal
Copy link

aaronmondal commented Apr 21, 2023

Description of the bug:

The abseil dependency used in upb is too old. Some symbols used by it no longer resolve.

Updating the gRPC dependencies would fix the issue.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Install Clang 15 or 16 (edit, thanks to @davido: or GCC 13)
  2. Try to bootstrap Bazel

Which operating system are you running Bazel on?

Gentoo X86_64 with clang profile

What is the output of bazel info release?

Tried at HEAD.

@Pavank1992 Pavank1992 added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Apr 21, 2023
@davido
Copy link
Contributor

davido commented Apr 22, 2023

@aaronmondal I am seeing probably a different issue trying to build Bazel using gcc 13:

ERROR: /home/davido/.cache/bazel/_bazel_davido/0fa756dec521553dbe2dde6b6eac99b4/external/com_google_absl/absl/strings/BUILD.bazel:1078:11: Compiling absl/strings/internal/str_format/float_conversion.cc [for tool] failed: (Exit 1): gcc failed: error executing command (from target @com_google_absl//absl/strings:str_format_internal) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 38 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from external/com_google_absl/absl/strings/internal/str_format/float_conversion.h:18,
                 from external/com_google_absl/absl/strings/internal/str_format/float_conversion.cc:15:
external/com_google_absl/absl/strings/internal/str_format/extension.h:34:6: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   34 | enum class FormatConversionChar : uint8_t;
      | ~~~~ ^~~~~
      |      -----

Ultimately, stdint.h was missing, in outdated abseil-cpp release, that was fixed upstream: [1] one year ago.

Not sure, if we need a separate issue for that?

My environment:

  $ gcc --version
gcc (SUSE Linux) 13.0.1 20230412 (experimental) [revision d339e9802f758e051b0a1ef6db732ff846cbf4e3]

[1] abseil/abseil-cpp@36a4b07

@aaronmondal
Copy link
Author

@davido This is probably related "closely enough" to be a merged issue. The gRPC dependency (and related deps like upb and abseil) is ancient from an upstream/living at head perspective. I'll update the issue to include GCC.

IMO it's an issue in general that some dependencies are not updated frequently enough and the Bazel build tends to fail with recent compiler versions.

@aaronmondal aaronmondal changed the title Can't bootstrap with clang >= 15 Can't bootstrap with clang >= 15 and GCC >=13 Apr 22, 2023
@aaronmondal aaronmondal changed the title Can't bootstrap with clang >= 15 and GCC >=13 Can't bootstrap with clang >= 15 and GCC >= 13 Apr 22, 2023
@aaronmondal aaronmondal changed the title Can't bootstrap with clang >= 15 and GCC >= 13 Can't bootstrap with clang >= 15 and gcc >= 13 Apr 22, 2023
@davido
Copy link
Contributor

davido commented Apr 23, 2023

@aaronmondal thanks for the update.

I'm working on non intrusive abseil-cpp patch similar to #15168 and #15177, will upload PR in a moment.

davido added a commit to davido/bazel that referenced this issue Apr 23, 2023
Closes bazelbuild#18167.

abseil is missing stdint.h include, that broke recent compiler versions.
This problem was fixed in this commit upstream:

abseil/abseil-cpp@36a4b07

Note, that we cannot update to the latst abseil-cpp version, because
this breaking change: "Abseil now requires at least C++14" starting
from LTS release 20230125 and Bazel is passing per default -std=c++0x
option, see:

bazelbuild#18181
@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Apr 25, 2023
davido added a commit to davido/bazel that referenced this issue Apr 25, 2023
Fixes bazelbuild#18167.

abseil-cpp is missing stdint.h header include, that broke recent
compiler versions. This problem was fixed in this commit upstream: [1].

Due to another commit: [2] in abseil-cpp, we also have to bump grpc as
well to make them compatible.

[1] abseil/abseil-cpp@36a4b07
[2] abseil/abseil-cpp@b8bbe92
davido added a commit to davido/bazel that referenced this issue Apr 27, 2023
Fixes bazelbuild#18167.

abseil-cpp is missing stdint.h header include, that broke recent
compiler versions. This problem was fixed in this commit upstream: [1].

Due to another commit: [2] in abseil-cpp, we also have to bump grpc as
well to make them compatible.

[1] abseil/abseil-cpp@36a4b07
[2] abseil/abseil-cpp@b8bbe92
davido added a commit to davido/bazel that referenced this issue Apr 27, 2023
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#18216.

Fixes bazelbuild#18167.

abseil-cpp is missing stdint.h header include, that broke recent
compiler versions. This problem was fixed in this commit upstream: [1].

Due to another commit: [2] in abseil-cpp, we also have to bump grpc as
well to make them compatible.

[1] abseil/abseil-cpp@36a4b07
[2] abseil/abseil-cpp@b8bbe92
davido added a commit to davido/bazel that referenced this issue Apr 28, 2023
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#18216.

Fixes bazelbuild#18167.

abseil-cpp is missing stdint.h header include, that broke recent
compiler versions. This problem was fixed in this commit upstream: [1].

Due to another commit: [2] in abseil-cpp, we also have to bump grpc as
well to make them compatible.

[1] abseil/abseil-cpp@36a4b07
[2] abseil/abseil-cpp@b8bbe92
fweikert pushed a commit to fweikert/bazel that referenced this issue May 25, 2023
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#18216.

Fixes bazelbuild#18167.

abseil-cpp is missing stdint.h header include, that broke recent
compiler versions. This problem was fixed in this commit upstream: [1].

Due to another commit: [2] in abseil-cpp, we also have to bump grpc as
well to make them compatible.

[1] abseil/abseil-cpp@36a4b07
[2] abseil/abseil-cpp@b8bbe92

Partial commit for third_party/*, see bazelbuild#18240.

Signed-off-by: Pavan Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
5 participants