Open kcalvinalvin opened 9 months ago
Sounds like this is a problem with the cc
crate, would you mind reporting to them?
I don't think you can easily cross-compile from linux to OSX, their linker tools are proprietery, so even if you plug clang instead of gcc and make it produce the right code you won't be able to produce an executable without their xcode stuff AFAIR
Maybe you can make this work: https://github.com/tpoechtrager/osxcross
I came across this error and wanted to document it here in case it's of help. I was compiling bdk which also compiles
secp256k1-sys
and when trying to cross-compile toaarch64-apple-darwin
fromx86_64-unknown-linxu-gnu
, compilation fails with gcc:error: unrecognized command-line option ‘-arch’
.This stackoverflow answer suggests that
-arch
is only for gcc with xcode, which means I wouldn't be able to cross-compile.Below is the full error log I got: