Skip to content

rust: fix 1.98.0 build on darwin - #556949

Open
r-vdp wants to merge 1 commit into
NixOS:stagingfrom
r-vdp:rvdp/rust_1_98_fix
Open

rust: fix 1.98.0 build on darwin#556949
r-vdp wants to merge 1 commit into
NixOS:stagingfrom
r-vdp:rvdp/rust_1_98_fix

Conversation

@r-vdp

@r-vdp r-vdp commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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

@r-vdp r-vdp mentioned this pull request Aug 27, 2026
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
r-vdp force-pushed the rvdp/rust_1_98_fix branch from 800b6e3 to 5b4742e Compare August 27, 2026 07:54
@nixpkgs-ci
nixpkgs-ci Bot requested review from a team and alyssais August 27, 2026 08:00
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. labels Aug 27, 2026

@whispersofthedawn whispersofthedawn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants