I’m trying to track down a problem with dynamic audio on Android, so I’m trying to compile lime for Android:
lime rebuild android -Dlegacy
Everything works fine until linking:
/opt/android-ndk/toolchains/x86-4.4.3/prebuilt/darwin-x86/bin/../lib/gcc/i686-linux-android/4.4.3/../../../../i686-linux-android/bin/ld: skipping incompatible ../ndll/Android/libopenal.so when searching for -lopenal
It looks like the problem is that openal was compiled for ARM:
lime/ $ file legacy/ndll/Android/libopenal.so
legacy/ndll/Android/libopenal.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped
But for some reason, it’s using arch-x86 for other libraries:
lime/ $ lime rebuild android -Dlegacy
i686-linux-android-g++ -o../legacy/ndll/Android/liblime-x86.so -frtti -nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined -Wl,-z,noexecstack --sysroot=/opt/android-ndk/platforms/android-9/arch-x86 -L/opt/android-ndk/platforms/android-9/arch-x86/usr/lib @obj/android-x86/all_objs -L../ndll/Android -lopenal -ldl -landroid -lGLESv2 /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/x86/libgnustl_static.a /opt/android-ndk/platforms/android-9/arch-x86/usr/lib/crtbegin_so.o /opt/android-ndk/toolchains/x86-4.4.3/prebuilt/darwin-x86/lib/gcc/i686-linux-android/4.4.3/libgcc.a /opt/android-ndk/platforms/android-9/arch-x86/usr/lib/libc.so /opt/android-ndk/platforms/android-9/arch-x86/usr/lib/libm.so -llog -ldl
It also appears that I’m not the only one with this problem as issue 272 was filed 24 days ago for this same problem.
I’m guessing this isn’t a bug, but rather incorrect build options. So,
- How is it possible to get openal to build for the same Android architecture as the rest of the lime build?
- How is it possible to specify the architecture of the Android build to match the architecture of the target device?
Thank you!