I successfully created a musl
configured rustc
by following this link
My attempt to build a project (which builds fine using non-musl configured rust) failed when I used cargo rustc -- --target=x86_64-unknown-linux-musl
'error: could not find crate `libc` with expected target triple x86_64-unknown-linux-musl'
Then, I tried to create rust-libc
library using the code from crate. To be more accurate, I used the command provided by cargo
to build rust-libc
, I've only added --target=x86_64-unknown-linux-musl
to the command. This time it failed reporting:
'error: could not find native static library `c`, perhaps an -L flag is missing?`'
I have two questions:
Is it mandatory to build
musl
configuredcargo
to be able to usecargo build --target=x86_64-unknown-linux-musl
?How can I address this:
'error: could not find native static library `c`, perhaps an -L flag is missing?'