-
Notifications
You must be signed in to change notification settings - Fork 42
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 linking standard library for x86_64-unknown-linux-musl
target
#28
Comments
@outkine My guess is that cmake does not receive cross-compilation flags during the build and uses your OS's libc instead of the musl-libc. We also cross-compile on musl but we have opted to build in the same environment using docker. You can try to hack around cmake but using docker is the only reliable way I know to cross-compile rust projects with c/c++ dependencies. I hope this helps you! |
@octavonce Thank you for the recommendation! Building inside of Docker yields yet another strange error:
I'm using the rust-musl-builder configuration here. |
Setting some Rust compiler flags solved the problem. Full command:
In case anyone is having a related issue: these flags are supposed to be a good general toolkit for musl builds, so try them out! |
I'm having an issue compiling to
musl
. I'm using cross:mimalloc
compiles, but the final executable does not:You can view the
--verbose
version here. MyCargo.toml
:These errors look like a standard library linking issue, but unfortunately I am no CMAKE expert. Any ideas would be much appreciated :)
The text was updated successfully, but these errors were encountered: