rust: fix 1.98.0 build on darwin - #556949
Open
r-vdp wants to merge 1 commit into
Open
Conversation
13 tasks
Since 1.98.0 the darwin tarball links LLVM dynamically and ships an unversioned libLLVM.dylib (rust-lang/rust#157205). This shadows our nixpkgs-built libLLVM.dylib when we run our own toolchain, leading to missing symbols. Rename the dylib that upstream ships to avoid the shadowing, similar to what upstream already does for linux.
r-vdp
force-pushed
the
rvdp/rust_1_98_fix
branch
from
August 27, 2026 07:54
800b6e3 to
5b4742e
Compare
whispersofthedawn
approved these changes
Aug 27, 2026
whispersofthedawn
left a comment
Contributor
There was a problem hiding this comment.
thank you! i'm not super familiar with the mechanics of what's involved here, but from what i understand of the problem, this looks fairly reasonable.
i ran some test builds with this rebased on ece38ea (for practicality; i don't want to build up from stdenv) both inside and outside of nix, and that at least convinces me that this produces a correct rustc :3
$ nix-build -A rustc-unwrapped -A cargo -A fd -A ripgrep -A rustfmt -A clippy --system aarch64-darwin
/nix/store/088rl54b62h003gd4hjmmsrvh2f1sb49-rustc-1.98.0
/nix/store/ng1xvxshfifxpy289gx7la2xj746fyx4-cargo-1.98.0
/nix/store/6j38icbxgvfgarhhakk7xyavi4y66mqq-fd-10.4.2
/nix/store/mmfxp9dfyv6drdh4xinpry7c9p8ixjpk-ripgrep-15.2.0
/nix/store/5lx4l1v6sj4v9bp513x74j5m82xb1l31-rustfmt-1.98.0
/nix/store/wr647rjdg8ianl0fhx10m27d35njbra3-clippy-1.98.0
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since 1.98.0 the darwin tarball links LLVM dynamically and ships an unversioned libLLVM.dylib (rust-lang/rust#157205).
This shadows our nixpkgs-built libLLVM.dylib when we run our own toolchain, leading to missing symbols.
Rename the dylib that upstream ships to avoid the shadowing, similar to what upstream already does for linux.
See #556706
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.