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 with musl toolchain installed #102

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

Error with musl toolchain installed #102

fenhl opened this issue Mar 6, 2023 · 7 comments

Comments

@fenhl
Copy link

fenhl commented Mar 6, 2023

I'm getting this error when running cargo sweep on Ubuntu 23.04:

[INFO] Using all installed toolchains: ["stable-x86_64-unknown-linux-gnu", "stable-x86_64-unknown-linux-musl"]
[ERROR] Failed to clean "/home/fenhl/wslgit/github.com/midoshouse/rust-ootr-utils/target"

Caused by:
    failed to determine fingerprint for toolchain stable-x86_64-unknown-linux-musl: 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
@jyn514
Copy link
Collaborator

jyn514 commented Mar 6, 2023

@fenhl what does rustc +stable-x86_64-unknown-linux-musl --version output? If your toolchain already has an error, cargo sweep can't bypass it somehow, it needs to know the metadata hash of the version.

@jyn514
Copy link
Collaborator

jyn514 commented Mar 6, 2023

As a workaround, you can specify an individual toolchain: cargo sweep --toolchains stable-x86_64-unknown-linux-gnu

@fenhl
Copy link
Author

fenhl commented Mar 6, 2023

The rustc command also errors. I didn't think to check it since cross-compiling for musl works.

According to the cargo help sweep entry for --toolchains, the suggested workaround will delete musl artifacts, which is not what I want.

@fenhl
Copy link
Author

fenhl commented Mar 6, 2023

I opened rust-lang/rustup#3254 for the rustc error. Maybe cargo sweep could improve its error handling to indicate that the error is in rustc.

@jyn514
Copy link
Collaborator

jyn514 commented Mar 13, 2023

@fenhl cargo-sweep already says "failed to determine fingerprint for toolchain stable-x86_64-unknown-linux-musl" - how could that be improved?

@jyn514
Copy link
Collaborator

jyn514 commented Mar 13, 2023

The rustc command also errors. I didn't think to check it since cross-compiling for musl works.

According to the cargo help sweep entry for --toolchains, the suggested workaround will delete musl artifacts, which is not what I want.

Like jubilee said in rust-lang/rust#108907 (comment), the musl host toolchain is unrelated to the musl target standard library.

@fenhl
Copy link
Author

fenhl commented Mar 13, 2023

It wasn't clear to me from the error message that the error was happening in rustc. Maybe preface the part of the error message quoted from rustc with “rustc:” or “rustc output:” or something?

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

No branches or pull requests

2 participants