messense/homebrew-macos-cross-toolchains

trying to build openssl getting File in wrong format error

ta3pks opened this issue · 4 comments

I run configure as follows

./Configure --cross-compile-prefix=aarch64-unknown-linux-gnu- --prefix=$HOME/aarch64_linux_openssl  no-shared  linux-arm64

then I run the make command however I get the following error.

Also changing no-shared to shared or changing aarch64-unknown-linux-gnu to aarch64-unknown-musl make no difference

/opt/homebrew/Cellar/aarch64-unknown-linux-gnu/10.3.0/toolchain/bin/../lib/gcc/aarch64-unknown-linux-gnu/10.3.0/../../../../aarch64-unknown-linux-gnu/bin/ld.bfd: fuzz/asn1.o: Relocations in generic ELF (EM: 62)
fuzz/asn1.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [fuzz/asn1-test] Error 1

What version of OpenSSL? I just tried with OpenSSL 3.0 and it doesn't have a linux-arm64 target, it's linux-aarch64. And it builds fine.

sorry for the missing info I im trying to build 1.1.1f which matches with my server version there's an aarch64 target for it

I tried 1.1.1f locally and it works fine with linux-aarch64 target.

seems I need to run make clean between builds then it seemingly works fine. Since I cannot reproduce this with a clean build I am closing the report.