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

Bazel 5.3.0 //tools/osx:xcode-locator-genrule fails with Xcode 14.3 #17958

Closed
adamjstewart opened this issue Apr 3, 2023 · 6 comments
Closed
Labels
team-Rules-ObjC Issues for Objective-C maintainers type: bug

Comments

@adamjstewart
Copy link

Description of the bug:

Bazel 5.3.0 fails to build with Xcode 14.3:

ERROR: /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-bazel-5.3.0-ltrek6pv3ubac62sal2ugrqkqx3azrnb/spack-src/tools/osx/BUILD:36:8: Executing genrule //tools/osx:xcode-locator-genrule failed: (Exit 1): bash failed: error executing command 
...
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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

Try to build bazel 5.3.0 with Xcode 14.3. I'm using Spack, but it should be possible to reproduce from a source install.

Which operating system are you running Bazel on?

macOS 13.3 (arm64)

What is the output of bazel info release?

5.3.0

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

With Spack

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

No response

Have you found anything relevant by searching the web?

Found an ancient reference to this bug at https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix#L212 (added in NixOS/nixpkgs#106984). I'll try that patch and see if it solves my issue.

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

This problem occurs with bazel 5.3.0 but not 6.1.1. The bug occurs with Apple Clang 14.0.3 but not 14.0.0. I need 5.3.0 to build TF.

@keith
Copy link
Member

keith commented Apr 3, 2023

I think cherry picking #17451 might fix this

@adamjstewart
Copy link
Author

Worked like a charm, thanks for the quick fix!

@brentleyjones
Copy link
Contributor

@meteorcloudy Should there be a 5.x patch release with that cherry-pick?

@ShreeM01 ShreeM01 added the team-Rules-ObjC Issues for Objective-C maintainers label Apr 3, 2023
@meteorcloudy
Copy link
Member

@kshyanashree @keertk I think this qualifies as a OS-compatibility issue we should fix, can we start a 5.4.1 patch release to cherry pick #17451?

@keertk
Copy link
Member

keertk commented Apr 4, 2023

Sure, sounds good.

@keertk keertk removed the untriaged label Apr 4, 2023
@keertk
Copy link
Member

keertk commented Apr 4, 2023

@bazel-io fork 5.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-ObjC Issues for Objective-C maintainers type: bug
Projects
None yet
Development

No branches or pull requests

7 participants