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
stdenv: unset SDKROOT on Darwin #97000
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ofborg
bot
added
6.topic: darwin
Running or building packages on Darwin
6.topic: stdenv
Standard environment
10.rebuild-darwin-stdenv
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-linux: 0
labels
Sep 3, 2020
The Rust `cc` crate started running `xcrun` when SDKROOT is defined: rust-lang/cc-rs@a970b0a Consequently, building crates that use newer versions of the `cc` crate fail, because xcrun is not available in pure build environments.
danieldk
requested review from
alyssais,
edolstra,
Ericson2314,
FRidh,
infinisil,
jonringer,
kalbasit,
matthewbauer,
Mic92,
mmahut,
nbp,
thoughtpolice,
ttuegel and
zowoq
as code owners
September 3, 2020 07:46
danieldk
force-pushed
the
stdenv-darwin-unset-sdkroot
branch
from
September 3, 2020 07:47
1264b6d
to
b1700a7
Compare
danieldk
removed request for
thoughtpolice,
matthewbauer,
kalbasit,
Mic92,
mmahut,
ttuegel and
Ericson2314
September 3, 2020 07:47
ofborg
bot
added
6.topic: golang
6.topic: nixos
6.topic: python
6.topic: qt/kde
6.topic: vim
8.has: changelog
8.has: documentation
8.has: module (update)
2.status: merge conflict
and removed
6.topic: golang
6.topic: nixos
6.topic: python
6.topic: qt/kde
6.topic: vim
8.has: changelog
8.has: documentation
8.has: module (update)
2.status: merge conflict
labels
Sep 3, 2020
@GrahamcOfBorg build bazel bazel.tests |
matthewbauer
approved these changes
Sep 7, 2020
This seems reasonable - or at least I don't think it will break anything. |
Another reported instance: |
10 tasks
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: darwin
Running or building packages on Darwin
6.topic: stdenv
Standard environment
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-darwin-stdenv
10.rebuild-linux: 0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
File this one under I have little idea what I am doing. I got a bug report that
broot
builds are failing on Darwin with the helpful :p message:With a little DTrace, I found that the
cc
crate, which is used by other crates to compile C/C++ code now runsxcrun
when SDKROOT is defined:rust-lang/cc-rs@a970b0a
Consequently, building crates that use newer versions of the
cc
crate fail, because xcrun is not available in pure build environments.
This change unsets SDKROOT.
Questions:
SDKROOT
. Can't test, because my MacBook is not fast enough to do large rebuilds.unset SDKROOT
(as opposed to just removing theexport SDKROOT=
line? I guess it would help with impure environments, when the user has setSDKROOT
for some reason?xcbuild
as a dependency on Darwin for Rust programs that transitively depend oncc
?Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)