Hi everyone, I'm having problem when cross compiling openssl from AMD64 to ARM64.
I've tried:
the error stated that
However, the CC file can be found on aarch64 sysroot by running command as below:
I've also tried this:
And got error like as below:
Please share with me your thought on where I might messed up or what the correct syntax for this, really appreciate your help and comment.
I've tried:
pkg install aarch64-none-elf-gcc
./Configure BSD-generic32 --cross-compile-prefix=/usr/local/bin/aarch64-none-elf- shared --prefix=/usr/openssl-custom --openssldir=/usr/openssl-custom -Wl,-rpath=/usr/openssl-custom/lib
make install
the error stated that
/usr/local/bin/aarch64-none-elf-cc: not found
, and there is no aarch64-none-elf-cc in that directory.However, the CC file can be found on aarch64 sysroot by running command as below:
pkg install aarch64-freebsd-sysroot
I've also tried this:
./Configure BSD-generic32 --sysroot=/usr/local/freebsd-sysroot/aarch64 -prefix=/usr/local/openssl-custom --openssldir=/opt/openssl-custom -Wl,-rpath=/user/local/openssl-custom/lib
make
And got error like as below:
Code:
ld: error: crypto/aes/aes_cbc.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_cfb.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_core.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_ecb.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_ige.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_misc.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_ofb.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aes/aes_wrap.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/aria/aria.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_bitstr.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_d2i_fp.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_digest.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_dup.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_gentm.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_i2d_fp.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_int.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_mbstr.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_object.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_octet.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: crypto/asn1/a_print.o is incompatible with /usr/local/freebsd-sysroot/aarch64/usr/lib/crti.o
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Please share with me your thought on where I might messed up or what the correct syntax for this, really appreciate your help and comment.