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_1: fix build on darwin #100012

Merged
merged 1 commit into from Oct 10, 2020
Merged

Conversation

tricktron
Copy link
Member

Motivation for this change

ZHF: #97479
cc: @NixOS/nixos-release-managers

Uses clang_8 instead of clang_7 on darwin to fix thread_local error.

The build runs through successfully but bazel fails to start the server:

Build successful! Binary is here: /private/tmp/nix-build-bazel-1.2.1.drv-0/bazel_src/output/bazel
Extracting Bazel installation...
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
installing
post-installation fixup
patching script interpreter paths in /nix/store/y6sdsgns53cirjwplyl7gpsdrvhkgjjb-bazel-1.2.1
running install tests
$TEST_TMPDIR defined: output root default is '/private/tmp/nix-build-bazel-1.2.1.drv-0' and max_idle_secs default is '15'.
Extracting Bazel installation...
Starting local Bazel server and connecting to it...

Server terminated abruptly (error code: 14, error message: 'Socket closed', log file: '/private/tmp/nix-build-bazel-1.2.1.drv-0/_bazel_nixbld1/734e1a1fb0129200ec302097141b437e/server/jvm.out')

Could anybody with more knowledge about bazel jump in and help me finish this pr?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Oct 8, 2020
@tricktron tricktron marked this pull request as draft October 8, 2020 06:52
@tricktron
Copy link
Member Author

@risicle You are an avid contributor who has a Mac machine. Could you try to build this and see if you get the same error?

@Profpatsch
Copy link
Member

I haven’t tried it out, but the changes look benign for non-MacOS. The failing test must be unrelated.

@Profpatsch Profpatsch mentioned this pull request Oct 8, 2020
10 tasks
@risicle
Copy link
Contributor

risicle commented Oct 8, 2020

WFM macos 10.14.

@tricktron
Copy link
Member Author

@risicle Without any errors?

@risicle
Copy link
Contributor

risicle commented Oct 8, 2020

No errors.

@tricktron
Copy link
Member Author

Nice, I'll guess this is then ready to merge too😃

@tricktron tricktron marked this pull request as ready for review October 8, 2020 19:44
@risicle
Copy link
Contributor

risicle commented Oct 8, 2020

Your commit message still has all the

Could anybody with more knowledge about bazel jump in and help me finish this pr?

stuff in it.

Use clang_8 instead of clang_7 on darwin to fix thread_local storage error.
@tricktron
Copy link
Member Author

Your commit message still has all the

Could anybody with more knowledge about bazel jump in and help me finish this pr?

stuff in it.

@risicle Ah yes I forgot about that. Thanks for reminding me. I rebased and edited the commit message.

@risicle
Copy link
Contributor

risicle commented Oct 10, 2020

This seems sensible. I think normally people would try and keep the stdenv switcharoo up in all-packages.nix, but I can see how that would make things weird here what with needing to be able to directly reference llvmPackages_8...

@risicle risicle merged commit 96e42b0 into NixOS:master Oct 10, 2020
@risicle risicle added the 9.needs: port to stable A PR needs a backport to the stable release. label Oct 10, 2020
@tricktron tricktron deleted the fix-bazel_1-darwin branch October 10, 2020 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants