Bazel 4.0.0 breaks macOS Mojave support (for some XCode CLT versions)
See original GitHub issueDescription of the problem / feature request:
Several folks on my team are reporting issues after upgrading to 4.0.0. One user is on 10.13.6 (High Sierra) and another is on 10.14.2 (Mojave). Both are able to build fine with 3.7.2, and both have build failures with libtool on 4.0.0:
ERROR: /private/var/tmp/_bazel_matt/c2cb640b277cd35f816879cfba9892ed/external/com_google_protobuf/BUILD:334:11: Linking external/com_google_protobuf/libprotoc_lib.a failed: (Exit 1): libtool failed: error executing command /usr/bin/libtool @bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/libprotoc_lib.a-2.params
Use --sandbox_debug to see verbose messages from the sandbox libtool failed: error executing command /usr/bin/libtool @bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/libprotoc_lib.a-2.params
Use --sandbox_debug to see verbose messages from the sandbox
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
From what I can tell, this is extremely reminiscent of #7397 – seems related to AR
resolution.
Feature requests: what underlying problem are you trying to solve with this feature?
Be able to build on old versions of macOS. Unless minimum version of macOS is planned and documented somewhere?
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- get a macbook with 10.13.6, and XCode CLT installed.
- checkout bazelbuild/bazel at HEAD today
- install JDK, e.g., via
brew tap AdoptOpenJDK/openjdk ; brew install adoptopenjdk11
bazel build //src:bazel_nojdk
with 4.0.0
Try again with 3.7.2, and it builds successfully.
What operating system are you running Bazel on?
macOS High Sierra 10.13.6 or Mojave 10.14.2 or Mojave 10.14.6
What’s the output of bazel info release
?
release 3.7.2
or release 4.0.0
What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?
Redundant with above, but built from https://github.com/bazelbuild/bazel/commit/660f5b2cf36fbd75908cf7c93cc59d98ee092eb2
Have you found anything relevant by searching the web?
No. I specifically looked for release notes announcing this as a breaking change, didn’t find any here or here
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (10 by maintainers)
Update!
I went back to the developer tools site, found that I was wrong about minimum version requirements. 11.5 requires 10.15 (Catalina), but 11.3.1 I could install on Mojave. That actually seems to work fine, without any caveats, on Mojave.
version:
11.3.1.0.1.1576735732
At this point 4 is one major version behind, and Mojave is 3 behind (soon to be 4), I think it’s worth closing.