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

Fix RPATH for libraries downloaded by rustup #91327

Merged
merged 1 commit into from Jun 23, 2020
Merged

Conversation

witchof0x20
Copy link
Contributor

@witchof0x20 witchof0x20 commented Jun 23, 2020

Motivation for this change

Fixes #91314

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.

(Rust now has a dynamic library dependence on zlib. (see rust-lang/rust#72696))
@Mic92
Copy link
Member

Mic92 commented Jun 23, 2020

We should backport this as well.

@Mic92 Mic92 added the 9.needs: port to stable A PR needs a backport to the stable release. label Jun 23, 2020
@Mic92 Mic92 merged commit 5d8fa2f into NixOS:master Jun 23, 2020
@asymmetric
Copy link
Contributor

What's the best way to test this on my backport branch?

@casidiablo
Copy link

casidiablo commented Dec 21, 2020

I'm still seeing this in the current rustup version 1.23.1 (3df2264a9 2020-11-30).

 ldd /home/cristian/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc
	linux-vdso.so.1 (0x00007fff89957000)
	librustc_driver-b0fbf3475685dbff.so => /home/cristian/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-b0fbf3475685dbff.so (0x00007fa43d795000)
	libstd-93cbfed54dd1bac8.so => /home/cristian/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/libstd-93cbfed54dd1bac8.so (0x00007fa43d420000)
	librt.so.1 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/librt.so.1 (0x00007fa43d416000)
	libdl.so.2 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/libdl.so.2 (0x00007fa43d411000)
	libpthread.so.0 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/libpthread.so.0 (0x00007fa43d3f0000)
	libc.so.6 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/libc.so.6 (0x00007fa43d22d000)
	/lib64/ld-linux-x86-64.so.2 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib64/ld-linux-x86-64.so.2 (0x00007fa44602d000)
	libz.so.1 => not found
	libm.so.6 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/libm.so.6 (0x00007fa43d0ea000)
	libgcc_s.so.1 => /nix/store/9l06v7fc38c1x3r2iydl15ksgz0ysb82-glibc-2.32/lib/libgcc_s.so.1 (0x00007fa43d0d0000)

When trying to run rustc:

rustc
/home/cristian/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

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.

Rust Nightly is missing a library
4 participants