libm icon indicating copy to clipboard operation
libm copied to clipboard

aarch 64 compilation failure.

Open leccyworld opened this issue 3 years ago • 2 comments

Trying to build libm as part of opendp for aarch64 target. Its failing with below error

note: cc: error: unrecognized command line option '-m64' Seems its still trying to use X86 flags, Isthis librsry not supported on aarch64 platforms at all?

leccyworld avatar Aug 20 '21 09:08 leccyworld

This crate compiles fine on aarch64 for me:

cargo build --target aarch64-unknown-linux-gnu
    Updating crates.io index
   Compiling libm v0.2.1 (/home/amanieu/code/compiler-builtins/libm)
    Finished dev [unoptimized + debuginfo] target(s) in 4.30s

Did you set up your aarch64 cross-compiler correctly in ~/.cargo/config?

[target.aarch64-unknown-linux-gnu]
ar = "aarch64-linux-gnu-ar"
linker = "aarch64-linux-gnu-gcc"

Amanieu avatar Aug 20 '21 14:08 Amanieu

I have that in config. Do you have gcc installed on your system? I didnt have gcc on my VM initially. After installing gcc it seems to compile with the target=aarch64 command.

leccyworld avatar Aug 20 '21 14:08 leccyworld