-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
"target doesn't support these crate types" error on x86_64-unknown-linux-musl host #7154
Comments
Thanks for the detailed repro! I think the issue is that One option is to use the gnu host with I'm going to close this as this is a rustc issue. |
In case someone else hits this page, my build worked using the flags commented at rust-lang/rust#59302 |
Problem
I'm trying to build an library with
proc-macro
forx86_64-unknown-linux-musl
target.When the host is
x86_64-unknown-linux-gnu
it can be compiled successfully.However, when the host is
x86_64-unknown-linux-gnu
, Cargo outputs this error:As I understand, there should be no difference, as the target is the same and no C libraries from the host are used.
Steps
I've created this repository to reproduce the problem using Docker.
Running
runs
cargo build
for a library withproc-macro = true
with hostx86_64-unknown-linux-gnu
and targetx86_64-unknown-linux-musl
, it builds the library successfully.However, running
outputs the error mentioned above.
Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: