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

After upgrading to bazel 7.0.0 gcc fails with: --push-state: unknown option #20834

Closed
rsalvador opened this issue Jan 10, 2024 · 6 comments
Closed
Labels

Comments

@rsalvador
Copy link
Contributor

rsalvador commented Jan 10, 2024

Description of the bug:

After upgrading to bazel 7.0.0 the builds in our internal CIs that have an old gcc compiler are failing with:

(08:11:06) ERROR: /home/build/.cache/native_bazel_output_base/external/io_grpc_grpc_java/compiler/BUILD.bazel:5:10: Linking external/io_grpc_grpc_java/compiler/grpc_java_plugin [for tool] failed: (Exit 1): gcc failed: error executing CppLink command (from target @@io_grpc_grpc_java//compiler:grpc_java_plugin) 
  (cd /home/build/.cache/native_bazel_output_base/sandbox/processwrapper-sandbox/7179/execroot/core && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  /usr/bin/gcc @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/io_grpc_grpc_java/compiler/grpc_java_plugin-2.params)
# Configuration: 922915957e448184486ff0fb7f0ba0ee9f92dfb993e46799f9d5193882b93aa1
# Execution platform: @@local_config_platform//:host

seems that the check for is_push_state_supported in 2482322 is not working well

Which category does this issue belong to?

C++/Objective-C Rules

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

No response

Which operating system are you running Bazel on?

MacOS and Linux

What is the output of bazel info release?

release 7.0.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

2482322

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@rsalvador rsalvador changed the title Build fails after upgrading to bazel 7.0.0 gcc fails with: --push-state: unknown option After upgrading to bazel 7.0.0 gcc fails with: --push-state: unknown option Jan 10, 2024
@fmeum
Copy link
Collaborator

fmeum commented Jan 10, 2024

@bazel-io fork 7.0.1

@meteorcloudy
Copy link
Member

@fmeum Are you looking into a fix? This seems to be the only blocker for 7.0.1

@fmeum
Copy link
Collaborator

fmeum commented Jan 11, 2024

@meteorcloudy Yes, the speculative fix is #20833. Unfortunately the reporter is unable to test this and it's also very challenging to cover in integration tests.

fmeum added a commit to fmeum/bazel that referenced this issue Jan 15, 2024
Bazel forces use of `lld` and `ld.gold` if found, but performed feature detection on the default linker instead.

Fixes bazelbuild#20834

Closes bazelbuild#20833.

PiperOrigin-RevId: 598565598
Change-Id: I4890f278c5cc33d4e6a6ebb10d796fb1c22f9ba6
meteorcloudy pushed a commit that referenced this issue Jan 15, 2024
Bazel forces use of `lld` and `ld.gold` if found, but performed feature
detection on the default linker instead.

Fixes #20834

Closes #20833.

PiperOrigin-RevId: 598565598
Change-Id: I4890f278c5cc33d4e6a6ebb10d796fb1c22f9ba6

Closes #20835
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.0.1 RC2. Please test out the release candidate and report any issues as soon as possible. Thanks!

@rsalvador
Copy link
Contributor Author

Verified that 7.0.1 fixes this issue.

@iancha1992
Copy link
Member

@bazel-io fork 7.1.0

iancha1992 pushed a commit to iancha1992/bazel that referenced this issue Jan 22, 2024
Bazel forces use of `lld` and `ld.gold` if found, but performed feature detection on the default linker instead.

Fixes bazelbuild#20834

Closes bazelbuild#20833.

PiperOrigin-RevId: 598565598
Change-Id: I4890f278c5cc33d4e6a6ebb10d796fb1c22f9ba6
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2024
…20990)

Bazel forces use of `lld` and `ld.gold` if found, but performed feature
detection on the default linker instead.

Fixes #20834

Closes #20833.

Commit
2bfe045

PiperOrigin-RevId: 598565598
Change-Id: I4890f278c5cc33d4e6a6ebb10d796fb1c22f9ba6

---------

Co-authored-by: Fabian Meumertzheim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants