Ffmpeg for Android: neon build has text relocations

Hi, I have successfully built the appunite ffmpeg library, including neon support for arm-v7a support, however, when I try to run the libraries on my Marshmallow device, I get this error:

01-08 23:42:02.350: E/AndroidRuntime(10144): java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.example.demo-1/lib/arm/libffmpeg-neon.so: has text relocations 

When I use non-neon assemblies, it works without problems.

So, I figured it out a bit and found out that this is probably an error in the corresponding C / C ++ code, but, on the other hand, it should be fixed during rebuilding using NDK v. 10e. This is what I did. But I still get these text permutations:

 ~/Projekte/AndroidFFmpeg$ /usr/Android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-readelf -a library/src/main/jniLibs/armeabi-v7a/libffmpeg-neon.so | grep TEXTREL 0x00000016 (TEXTREL) 0x0 0x0000001e (FLAGS) SYMBOLIC TEXTREL 

These questions seemed to be relevant, but did not help:

"ffmpeg has text move" error in Android

libavcodec.so: has text move

How to fix it?

+2
source share
1 answer

This should be fixed already (since commit https://git.libav.org/?p=libav.git;a=commitdiff;h=f963f80399d , December 2014), so make sure you create a new, fairly new version, and she should be fine.

arm, aarch64 and x86_64 should work fine without text moves, but for 32-bit x86 you cannot easily avoid this. (For x86, the easiest way to do this is --disable-asm , but this leads to some performance loss.)

+3
source

Source: https://habr.com/ru/post/1257963/


All Articles