question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel 4.0.0 breaks macOS Mojave support (for some XCode CLT versions)

See original GitHub issue

Description 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:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
dhalpericommented, Jan 26, 2021

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

0reactions
dhalpericommented, Jul 21, 2022

At this point 4 is one major version behind, and Mojave is 3 behind (soon to be 4), I think it’s worth closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Bazel on macOS
Step 1: Install Homebrew on macOS; Step 2: Install Bazel via Homebrew ... Step 1: Install Xcode command line tools; Step 2: Download...
Read more >
Unable to install xcode command line developer tools
I recently did a factory reset on my Macbook Pro and I'm trying to get the xcode command line developer tools back. When...
Read more >
New Release For Xcode 10 On Macos 10.14 Mojave
Apple Announces macOS 10.14 Mojave, Featuring New Dark Mode, Desktop. ... 4.0.0 breaks macOS Mojave support (for some XCode CLT versions) ...
Read more >
how to reinstall xcode command-line tools? - Ask Different
I run sudo rm -rf /Library/Developer/CommandLineTools; and then xcode-select --install. Problem fixed on my side.
Read more >
Bazel: Xcode version must be specified - Stack Overflow
Just upgraded to the latest version of Xcode and command line tools on Mac 10.12.16, and now I get this when I run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found