You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a cargo project, which depends on the cc crate and a C++ runtime, is built on an musl target, the generated binary is broken: the program interpreter is set to "/lib/ld-linux-aarch64.so.1" instead of "/lib/ld-musl-aarch64.so.1".
After having posted an issue in cc crate (rust-lang/cc-rs#635) it appears the problem is rustc choosing the wrong linker.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #82519. rustc has no heuristics to select a target specific linker in cross-compilation scenarios and today it is the responsibility of the invoker to set up the environment, the flags and their build system accordingly to point them at the appropriate tools, including the linker.
There are some people who think adding such heuristics is a good idea. I don’t necessarily agree, but either way it would be a change worth an RFC.
When a cargo project, which depends on the cc crate and a C++ runtime, is built on an musl target, the generated binary is broken: the program interpreter is set to "/lib/ld-linux-aarch64.so.1" instead of "/lib/ld-musl-aarch64.so.1".
After having posted an issue in cc crate (rust-lang/cc-rs#635) it appears the problem is rustc choosing the wrong linker.
The text was updated successfully, but these errors were encountered: