On running an apk that uses https://github.com/kevinresol/zbar (great lib for reading barcodes), I get through adb logcat:
11-29 16:07:58.486 17119 17119 W System.err: dlopen failed: library “/opt/android-ndk/platforms/android-9/arch-arm/usr/lib/libc.so” not found
this seems a bit cryptic, but it seems to have to do with some changes done to allow for 32 & 64 bit libs, some stuff got passed from dynamic to static, or so I gather through further reading.
Has someone come up with a way to fix this issue ?
Perhaps the SO was built using an older version of the Android NDK? Around Android 8(?) there was a change to the OS that caused older SOs to start giving this linker error unless they were rebuilt using a newer version
Yes, there was, 5 was the last one that didn’t give a warning, 6 gave warnings but executed, from 7 upwards it doesn’t run. Trying to mix private code is a no no it seems.
“I guess the wording does technically make it sound like you’re now [sic: read not] allowed to link to your own libraries. That definitely is not the case. The policy is that your cannot link to or dlopen private system libraries (anything in /system/lib that is not in the NDK).”
I went into outrage mode before reading this.
I tried to compile the SO but getting nowhere at the moment.
Exchanging the .so files for others compiled against another NDK fixed it.
I got them from here: https://github.com/acktie/Acktie-Mobile-Android-QR-Reader/issues/10#issuecomment-215423901
in case anyone comes across this.