ffmpeg for Android:neon build有文本重定位 [英] ffmpeg for Android: neon build has text relocations
问题描述
您好,我成功构建了appunite ffmpeg库,其中包括arm-v7a霓虹灯支持,但是当我尝试在Marshmallow设备上运行库时,我收到以下错误:
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:有文本重定位
当我使用非霓虹灯构建它的工作没有任何问题。
所以我google了一下,发现,这可能是相应的C / C ++代码的错误,但另一方面它在用NDK v。10e重建时应该固定。这就是我做的。但我仍然得到这些文本重定位:
〜/ 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)符号TEXTREL
这个问题似乎是相关的,但没有帮助:
如何解决?
这应该已经被修复了(因为提交 https://git.libav.org/?p=libav.git;a=commitdiff;h=f963f80399d ,2014年12月),所以确保你建立一个足够新的版本,这应该是正常的。 / p>
arm,aarch64和x86_64应该都可以正常运行,无需文本重定位,但对于32位x86,您不能轻易避免。 (对于x86,最简单的方法是执行 - disable-asm
,但这确实会带来很多性能损失。)
Hi I successfully built the appunite ffmpeg library including arm-v7a neon 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 the non-neon builds it works without any problems.
So I googled a bit and found out, that this is probably a bug in the corresponding C/C++ code but on the other hand it should be fixed when rebuilt with with NDK v. 10e. This is what I did. But I still get these text relocations:
~/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
This questions seemed to be relevant, but didn't help:
"ffmpeg has text relocations" error in Android
libavcodec.so: has text relocations
How do I fix that?
This should be fixed already (since commit https://git.libav.org/?p=libav.git;a=commitdiff;h=f963f80399d, December 2014), so make sure you build a new enough version and it should be fine.
arm, aarch64 and x86_64 should all work fine without text relocations, but for 32 bit x86, you can't easily avoid it. (For x86, the simplest way around it is to do --disable-asm
, but that does give quite a bit of performance loss.)
这篇关于ffmpeg for Android:neon build有文本重定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!