I am trying to compile the latest FFmpeg using the latest NDK r20 and although it works on arm64-v8a (which actually was part of the goal since I am trying to comply with the upcoming 64-bit requirement), I have less luck on x86 and armeabi devices.
Please note that compilation and creation of the 4 FFmpeg shared objects proceeds without errors and I don't need the FFmpeg executable, just the libs. I compile on a Linux virtual machine.
First, when I build for armeabi-v7a and arm64-v8a and run it on a Dell Venue Intel tablet with Android 4.4.2, I get this error:
fatal error : dlopen failed: "/data/app-lib/com.extreamsd.usbaudioplayerpro-1/libavutil.so" has unexpected e_machine: 40
on the call to System.loadLibrary("avutil") of the ffmpeg libraries. So the emulator is not liking the flavour I built, although it's armeabi-v7a without extra's like NEON. The libraries that I built with ndk-build that are loaded before that with System.loadLibrary() are loaded fine.
So, no worries, let's build for x86 as well now we are at it! But then I get:
com.extreamsd.usbaudioplayerpro fatal error : dlopen failed: cannot locate symbol "mmap64" referenced by "libavutil.so
Then to check the 32-bit build, I ran the armeabi-v7a build on a Nexus 5 (which doesn't feature 64-bit) and I get:
dlopen failed: cannot locate symbol "__aeabi_memcpy" referenced by "/data/app/com.extreamsd.usbaudioplayerpro-1/lib/arm/libavutil.so".
when I reduce the NDK platform level from 26 to 22 or so, this error disappears (although this 'trick' does not work on the Intel problem above).
Running the arm64-v8a build on a 64-bit Android device is fine.
With a built of ffmpeg that I built two years ago or so (armeabi-v7a only) with gcc, things run fine, but I cannot use that anymore.
Any pointers?