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
My bad, the build command was wrong: CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc cargo build --release --target=x86_64-unknown-linux-musl
error: linker `x86_64-unknown-linux-musl-gcc` not found | = note: No such file or directory (os error 2)
and error: linker `aarch64-unknown-linux-musl-gcc` not found | = note: No such file or directory (os error 2)
even though both are installed:
which aarch64-linux-musl-gcc-> /usr/local/bin/aarch64-linux-musl-gcc
which x86_64-linux-musl-gcc-> /usr/local/bin/x86_64-linux-musl-gcc
Edit:
My bad, the build command was wrong:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc cargo build --release --target=x86_64-unknown-linux-musl
and
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc cargo build --release --target=aarch64-unknown-linux-musl
worked as expected.
error: linker `x86_64-unknown-linux-musl-gcc` not found | = note: No such file or directory (os error 2)
and
error: linker `aarch64-unknown-linux-musl-gcc` not found | = note: No such file or directory (os error 2)
even though both are installed:
which aarch64-linux-musl-gcc
->/usr/local/bin/aarch64-linux-musl-gcc
which x86_64-linux-musl-gcc
->/usr/local/bin/x86_64-linux-musl-gcc
Similar Issues:
rust-lang/rust#25289
rust-lang/backtrace-rs#34
rust-lang/rust#115430
Partial Solutions:
https://saktidwicahyono.name/blogs/cross-compile-to-linux-amd64-from-mac-m1/
https://www.docker.com/blog/cross-compiling-rust-code-for-multiple-architectures/
https://betterprogramming.pub/cross-compiling-rust-from-mac-to-linux-7fad5a454ab1
https://gist.github.com/Mefistophell/9787e1b6d2d9441c16d2ac79d6a505e6
https://stackoverflow.com/questions/41761485/how-to-cross-compile-from-mac-to-linux
https://www.reddit.com/r/rust/comments/18r8wic/cross_compile_rust_on_mac_os/
https://medium.com/@mr.pankajbahekar/cross-comiple-rust-binaries-on-mac-m1-a252e3a8925e
briansmith/ring#1414
The text was updated successfully, but these errors were encountered: