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

Error running musl rustup on Ubuntu #3254

Open
fenhl opened this issue Mar 6, 2023 · 5 comments
Open

Error running musl rustup on Ubuntu #3254

fenhl opened this issue Mar 6, 2023 · 5 comments
Labels

Comments

@fenhl
Copy link

fenhl commented Mar 6, 2023

Problem

$ rustc +stable-x86_64-unknown-linux-musl --version
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so)
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_GetRegionStart: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_GetTextRelBase: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_RaiseException: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_SetIP: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_Resume: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_DeleteException: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_Resume_or_Rethrow: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_GetIPInfo: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_GetDataRelBase: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_SetGR: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/librustc_driver-a19ffab541701154.so: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_Resume: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetTextRelBase: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetDataRelBase: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetRegionStart: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_FindEnclosingFunction: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_DeleteException: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_SetGR: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_SetIP: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetCFA: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_RaiseException: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetIP: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_GetIPInfo: symbol not found
Error relocating /home/fenhl/.rustup/toolchains/stable-x86_64-unknown-linux-musl/lib/libstd-86aefecbddda356d.so: _Unwind_Backtrace: symbol not found

Steps

Install the x86_64-unknown-linux-musl toolchain on Ubuntu 23.04.

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.67.1 (d5a82bbd2 2023-02-07)`

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/fenhl/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
stable-x86_64-unknown-linux-musl

installed targets for active toolchain
--------------------------------------

x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.67.1 (d5a82bbd2 2023-02-07)
@rbtcollins
Copy link
Contributor

This bug would be more relevant on the rust bugtracker; rustup is a package manager, not the generator of the distributions

@pnkfelix
Copy link
Member

pnkfelix commented Mar 8, 2023

moved bug over to rust-lang/rust#108907 ; this can be closed IMO.

@fenhl fenhl closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2023
@workingjubilee
Copy link
Member

The issue here is that a gnu host is unlikely to be correctly configured for the musl toolchain (and this one was not), which is designed to run on e.g. an actual musl distro, and using the musl toolchain is usually unnecessary for compiling for the musl targets, since you can install the musl targets with the gnu toolchain.

As rustc can't do anything when it is executed and fails to link, rustup could try to warn a user about using a mismatched toolchain and inform them that the Rust toolchain performs cross-compilation. They may be expecting it to work like e.g. how gcc is built, where you need a toolchain per target.

@fenhl fenhl reopened this Mar 12, 2023
@workingjubilee
Copy link
Member

I think we should issue this warning only on an attempt to install a mismatched toolchain. Trying to check every time rustup starts could introduce unacceptable overhead and will likely just be a nuisance.

@workingjubilee
Copy link
Member

Ah, this has been taken care of:

error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default.
warning: toolchain 'stable-x86_64-unknown-linux-musl' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try rustup target add x86_64-unknown-linux-musl instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants