-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
musl-based toolchains are missing libgcc runtime dependency #161
Comments
Are you sure that this has fully solved the problem? I am still getting this on the latest revision of this repo:
Incidentally, offering an "ultra-minimal" attribute that has rustc and rust-std but no cargo could be another way around for people who want to build with a static rust toolchain. |
I assume you want to make a toolchain that produces static binary, not a toolchain itself being static (which is impossible, because it's downloaded from upstream and it's shipped as dynamic binaries). So what you need is |
Oh, you're right! Thank you! |
The
pkgs.pkgsMusl.rust-bin.xxx
toolchains mostly work fine, but (at least)rustdoc
andcargo clippy
instacrash with a missinglibgcc_s.so.1
. It seems like the musl stdenvs don't ship thelibgcc
package which supplieslibgcc_s.so.1
. This makes sense, but apparently the musl rust linux binaries were built against a dynamically linkedlibgcc_s
.The changes from #121 don't seem to work in this case.
This also affects
pkgsCross.musl64
.On
x86_64-unknown-linux-gnu
, something that kinda-sorta works around the issue is addingLD_LIBRARY_PATH=${pkgs.pkgsMusl.libgcc}
to adevShell
. But that breaks all other non-musl packages as they expect alibgcc_s
built againstglibc
.Is there some way to explicitly add the
libgcc
runtime dependency? If possible I'd like to avoidpkgsStatic
as it looks like that's not a cached package set and would incur massive upfront compilation of a static GCC toolchain.Noticed in TraceMachina/nativelink#749
cc @RaitoBezarius
The text was updated successfully, but these errors were encountered: