Subject: bug#53980: Android cross-compile and aarch64-linux-android/bin/ld: -soname: missing argument

From: Roumen Petrov <[email-masked]>
Date: Sat, 19 Feb 2022 18:49:20 +0200

Hi Jeffrey,
Jeffrey Walton wrote:
> Hi Everyone,
> 
> I'm testing an Android cross-compile using Autotools. For the Android
> cross-compile the build is failing. Other builds are Ok.

Cross-compilation is project specific.

> Any ideas what I might be doing wrong?

For some OS-es cross-compilation could fail.

> 
> Thanks in advance.
> 
> $ make 2>&1 | fold -w 80
> make  all-am
> make[1]: Entering directory '/home/jwalton/Desktop/cryptopp'

[SNIP]

> lt/linux-x86_64/sysroot   -pthread -Wl,-soname -Wl, -o .libs/
> 
> /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-li
> nux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: -soname: missing arg
> ument
> /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-li
> nux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: use the --help optio
> n for usage information
> clang++: error: linker command failed with exit code 1 (use -v to see invocation
> )
> Makefile:1308: recipe for target 'libcryptopp.la' failed
> make[1]: *** [libcryptopp.la] Error 1
> 
SONAME does not make sense on Android. Try to find a way to bay-pass it from build configuration.

Regards,
Roumen Petrov