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

Can't run nightlies installed by cargo-bisect-rustc on NixOS? #265

Open
langston-barrett opened this issue Mar 18, 2023 · 1 comment
Open
Labels
A-downloading Area: downloading toolchains enhancement New feature or request

Comments

@langston-barrett
Copy link

I'm having trouble using cargo-bisect-rustc on NixOS. I think the trouble is that I can't run the binaries installed by cargo-bisect-rustc, whereas I can run binaries installed via rustup:

~/.rustup/toolchains/bisector-nightly-2017-01-20-x86_64-unknown-linux-gnu/bin/rustc --version

zsh: no such file or directory: /home/langston/.rustup/toolchains/bisector-nightly-2017-01-20-x86_64-unknown-linux-gnu/bin/rustc

~/.rustup/toolchains/1.68.0-x86_64-unknown-linux-gnu/bin/rustc --version

rustc 1.68.0 (2c8cc3432 2023-03-06)

The output of file shows different dynamic linker paths:

file ~/.rustup/toolchains/bisector-nightly-2017-01-20-x86_64-unknown-linux-gnu/bin/rustc

/home/langston/.rustup/toolchains/bisector-nightly-2017-01-20-x86_64-unknown-linux-gnu/bin/rustc: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, not stripped

file ~/.rustup/toolchains/1.68.0-x86_64-unknown-linux-gnu/bin/rustc

/home/langston/.rustup/toolchains/1.68.0-x86_64-unknown-linux-gnu/bin/rustc: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/0xxjx37fcy2nl3yz6igmv4mag2a7giq6-glibc-2.33-123/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped

ldd also shows more shared libraries for the bisector-nightly-* executables, but none of them are missing.

FWIW, this is cargo-bisect-rustc installed from 95eaf5b.

@Noratrieb
Copy link
Member

rustup packaged by nixpkgs (also rustup-toolchain-install-master has patches to patchelf the toolchains. I have patched it myself: https://github.com/Nilstrieb/nixos/blob/4edca36ab7e7d4a04640e77bb3b6d44d8ec849da/custom-pkgs/cargo-bisect-rustc/0001-patchelf.patch
Maybe cargo-bisect-rustc should use the rustup-toolchain-install-master binary instead of it's found? Or someone would upstream it with the patches to nixpkgs.

@ehuss ehuss added enhancement New feature or request A-downloading Area: downloading toolchains labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-downloading Area: downloading toolchains enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants