Skip to content

Handling of rustc-sysroot .so files differs when sysroots do not come with their own cargo #1575

Closed
@RalfJung

Description

@RalfJung

When I install miri (cargo +nightly install --git https://github.com/solson/miri/ miri) with the nightly toolchain, I can later execute cargo +nightly miri --help just fine. However, when I do the same thing with a toolchain obtained via rustup toolchain link (a locally-compiled stage 2 sysroot), that does not work: After replacing +nightly by +stage2, all I get is

/home/r/.cargo/bin/cargo-miri: error while loading shared libraries: librustc_mir-2d8f89b6ce1d8c91.so: cannot open shared object file: No such file or directory

Interestingly, toolchains installed via https://github.com/kennytm/rustup-toolchain-install-master behave like linked ones: They also result in the above error.

What both of these toolchains (linked ones and rustup-toolchain-install-master) have in common is that they don't come with their own cargo.

I don't know how the responsibility of setting LD_LIBRARY_PATH (assuming that is what is missing here) is split between rustup and cargo, and I have no idea which cargo rustup is even using when the toolchain does not have its own. But somewhere, something doesn't quite fit together.

(Calling the cargo-miri binary directly shows such an error in both cases, but when I am using nightly, it seems that LD_LIBRARY_PATH is set properly when using cargo miri.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions