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

Today's nightly fails with cannot find libz.so.1 #225

Closed
OmnipotentEntity opened this issue Jun 22, 2020 · 3 comments · Fixed by #227
Closed

Today's nightly fails with cannot find libz.so.1 #225

OmnipotentEntity opened this issue Jun 22, 2020 · 3 comments · Fixed by #227

Comments

@OmnipotentEntity
Copy link

OmnipotentEntity commented Jun 22, 2020

Minimal nix-shell to reproduce:

with import <nixpkgs> {};
let src = fetchFromGitHub {
    owner = "mozilla";
    repo = "nixpkgs-mozilla";
    rev = "e912ed483e980dfb4666ae0ed17845c4220e5e7c";
    sha256 = "08fvzb8w80bkkabc1iyhzd15f4sm7ra10jn32kfch5klgl0gj3j3";
  };
in
with import "${src.out}/rust-overlay.nix" pkgs pkgs;
stdenv.mkDerivation (with pkgs; {
  name = "rust-env";

  nativeBuildInputs = [
    latest.rustChannels.nightly.rust
    #latest.rustChannels.beta.rust #works fine.
  ];
})

Then launch nix-shell and run $ rustc -V

Output expected: The nightly version string

Output received: "rustc: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory"

Further information:

ldd for nightly rustc:

	linux-vdso.so.1 (0x00007ffdc65db000)
	librustc_driver-5e50657ff02a973e.so => /nix/store/ni1af6hmg2s7zl1dlhmc0l922c9n1z6s-rust-1.46.0-nightly-2020-06-21-a8cf39911/bin/../lib/librustc_driver-5e50657ff02a973e.so (0x000015540b3e8000)
	libstd-b6aff3703feff874.so => /nix/store/ni1af6hmg2s7zl1dlhmc0l922c9n1z6s-rust-1.46.0-nightly-2020-06-21-a8cf39911/bin/../lib/libstd-b6aff3703feff874.so (0x000015540b0e7000)
	libpthread.so.0 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libpthread.so.0 (0x000015540b0c6000)
	libdl.so.2 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libdl.so.2 (0x000015540b0c1000)
	librt.so.1 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/librt.so.1 (0x000015540b0b7000)
	libc.so.6 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libc.so.6 (0x000015540aef6000)
	/nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/ld-linux-x86-64.so.2 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x000015540f99e000)
	libLLVM-10-rust-1.46.0-nightly.so => /nix/store/ni1af6hmg2s7zl1dlhmc0l922c9n1z6s-rust-1.46.0-nightly-2020-06-21-a8cf39911/bin/../lib/../lib/libLLVM-10-rust-1.46.0-nightly.so (0x000015540688f000)
	libgcc_s.so.1 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libgcc_s.so.1 (0x0000155406875000)
	libm.so.6 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libm.so.6 (0x0000155406735000)
	libz.so.1 => not found

ldd for beta rustc:

	linux-vdso.so.1 (0x00007fff96d32000)
	librustc_driver-3ec13ed752f7a54a.so => /nix/store/ih1vfc2zs0vqiw1j0n12zh60d5cd93sh-rust-1.45.0-beta.2-2020-06-15-1dc0f6d8e/bin/../lib/librustc_driver-3ec13ed752f7a54a.so (0x000014861b969000)
	libstd-44f8eb3d0b2fad61.so => /nix/store/ih1vfc2zs0vqiw1j0n12zh60d5cd93sh-rust-1.45.0-beta.2-2020-06-15-1dc0f6d8e/bin/../lib/libstd-44f8eb3d0b2fad61.so (0x000014861b666000)
	libpthread.so.0 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libpthread.so.0 (0x000014861b645000)
	libdl.so.2 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libdl.so.2 (0x000014861b640000)
	librt.so.1 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/librt.so.1 (0x000014861b636000)
	libc.so.6 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libc.so.6 (0x000014861b475000)
	/nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/ld-linux-x86-64.so.2 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x000014861fed6000)
	libLLVM-10-rust-1.45.0-beta.so => /nix/store/ih1vfc2zs0vqiw1j0n12zh60d5cd93sh-rust-1.45.0-beta.2-2020-06-15-1dc0f6d8e/bin/../lib/../lib/libLLVM-10-rust-1.45.0-beta.so (0x0000148616e7a000)
	libgcc_s.so.1 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libgcc_s.so.1 (0x0000148616e60000)
	libm.so.6 => /nix/store/9hy6c2hv8lcwc6clnc1p2jf09cs5q9dp-glibc-2.30/lib/libm.so.6 (0x0000148616d20000)

(New dependency on libz?)

@cole-h
Copy link

cole-h commented Jun 23, 2020

Probably related: NixOS/nixpkgs#91314.

@witchof0x20
Copy link
Contributor

witchof0x20 commented Jun 23, 2020

NixOS/nixpkgs#91327

Here's the fix I wrote for nixpkgs/rustup. It appears the minimal change that needs to be made is adding zlib to the RPATH for libLLVM-10-rust-1.45.0-beta.so because of rust-lang/rust#72696

@bkchr
Copy link
Contributor

bkchr commented Jul 1, 2020

#227 fixes this bug

@nbp nbp closed this as completed in #227 Jul 2, 2020
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 29, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 29, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 29, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 30, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 30, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
jkryl pushed a commit to openebs/mayastor that referenced this issue Jul 30, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
gila pushed a commit to openebs/mayastor that referenced this issue Aug 12, 2020
Example usage: nix-shell --arg norust true

Update mozilla-pkgs overlay in order to get the fix for
mozilla/nixpkgs-mozilla#225 and enable us
to update rust nightly to latest snapshot (done on behalf of this
commit too).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants