Open lmtr0 opened 2 years ago
OS? Clang compiler version?
Well clang was 13 and the os i tested was arch Linux container but it also doesn't work in Ubuntu, Manjaro and fedora with MacOS SDK 11.3
I was compiling a project in rust that had dependency in ring which is the crate broke the build. Btw starting the compilation with system clang fails but then switching to osxcross then works
how about it? I met the same error, can not compile briansmith/ring
use -Daarch64
in .cargo/config.toml
:
[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-D__aarch64__"]
linker = "o64h-clang"
ar = "aarch64-apple-darwin20.4-ar"
@lmtr0 got same error
I had run cargo clean
.cargo/config.toml
[build]
target = "aarch64-apple-darwin"
[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-D__aarch64__"]
linker = "/osxcross/bin/aarch64-apple-darwin20.4-clang"
ar = "/osxcross/bin/aarch64-apple-darwin20.4-ar"
o64h-clang
I found it is same as /osxcross/bin/aarch64-apple-darwin20.4-clang
can you switch to sodiumoxide? I did that since I couldn't solve it
I can not, it's not my application depend on ring, it's other package
Sorry then, this sounds to be a problem with the compiler.... maybe @tpoechtrager can help more, I just switched to libsodium cause I couldn't solve it then and I can't solve it now
The latest version of ring (0.17.0) doesn't use __aarch64__
any more. It uses __ARM_ARCH
. If clang isn't defining these automatically __ARM_ARCH
for an aarch64-* target then there is indeed something wrong.
As pointed out in https://github.com/briansmith/ring/issues/1442 it appears that the o64h-clang is not setting any arm flags: