DoubangoTelecom / doubango

Doubango VoIP framework
https://doubango.org
398 stars 200 forks source link

Building for NEON has text-relocations #486

Closed LFShark closed 7 years ago

LFShark commented 7 years ago

I've rebuilt FFMPEG, X264 and checked by hand all the libs in doubango/thirdparties/android/armv7-a-neon/lib/dist for text-relocations by using

readelf -a <libname> | grep TEXTREL

builds for armeabi, armv5te, armv7-a pass fine, without text relocations. Build for armv7-a-neon passes but still has one text relocation:

0x00000016 (TEXTREL) 0x0 0x0000001e (FLAGS) SYMBOLIC TEXTREL BIND_NOW

What should I do to get rid of it please, I need this to run on Android API 23 and i don't want the dialog prompting the user to accept the library as it is up to API 22 and crashes due to library being rejected by the OS on API 23.

rachelxj commented 7 years ago

I got the same problem too, I found it was caused by libaudio_processing.a, I think we should rebuild the webrtc audio processing, but I don't know how.

rachelxj commented 7 years ago

@LFShark which version of ffmpeg did you rebuild? Would you please share the build script with me? thanks a lot

LFShark commented 7 years ago

Leave me your email.

MobiSciLab commented 7 years ago

@LFShark can you please share your build script with me also? (My email: mobisci.lab@gmail.com)

rachelxj commented 7 years ago

@LFShark here is my email, rachelxj2013@yahoo.com, thanks a lot

esnef commented 7 years ago

@LFShark. Please, do you can send me also the script? (My email: esnef@hotmail.com)

zaferaydn commented 7 years ago

@LFShark Can you please share your script with me too? zaferaydn@hotmail.com I guess many developers trying to solve the text relocation issue in android. Any description for solving the problem will be nice.

LFShark commented 7 years ago

@zaferaydn after you check the prebuilt libraries with the `readelf`` command, you'll see that FFMPEG is the one that has text-relocations, so you need to rebuild them as shared libraries instead of static libraries and replace the problematic libraries with your new clean ones.

I'm sorry to say that your "guess" is wrong because if they tried, they'd have done it - i'd rephrase it as "many developers are trying to find and download a working solution" instead, and it's not my job to do your work for you.

DoubangoTelecom commented 7 years ago

Please note that FFmpeg is useless in the product. Just disable it.

zaferaydn commented 7 years ago

@LFShark I really repect your help. I have rebuilt all the source without ffmpeg. I just disabled ffmpegand picoption, now i have the same stuation as yours: armeabi/tinyWRAP.so and armeabi-v7a/tinyWRAP.so does not have text relocation anymore. However, armeabi-v7a/tinyWRAP_neon.so and x86/tinyWRAP.so still have text relocation. Do you have any progress for solving neonand x86libraries also?

DoubangoTelecom commented 7 years ago

Maybe you'll also need to disable x264. We're building the libs without these two libs: ./android_build.sh commercial

zaferaydn commented 7 years ago

Hello @DoubangoTelecom Do you mean disabling openh264? Because in android_bıild.sh script there is no parameter for x264. Insead, there is export OPENH264=yes. Do you mean that I should change it to export OPENH264=no?

jcbastosportela commented 7 years ago

Hi all! I'm facing the same issue. I've tried several suggestions that I've read in already existing threads, but the closest I got was by succeeding to armv7-a and armv5te. For armv7-a-neon I always get TEXTREL when I run readelf.

So far I tried disabling ffmpeg and openh264 as well as changing with-pic to without-pic in android_build.sh. I've forced disabling x264 by hacking configure that so USE_X264_FALSE is always selected, like this: ` ########################################################

X264

######################################################## if test $target_os:$enable_gpl = android:yes; then USE_X264_TRUE= USE_X264_FALSE='#' else USE_X264_TRUE= USE_X264_FALSE='#' fi `

Is there someone here that as successfully compiled and got rid of TEXTREL? Also I've checked all the pre-built libraries and seems that none of the used is causing TEXTREL.

DoubangoTelecom commented 7 years ago

https://github.com/DoubangoTelecom/doubango/commit/e58bfcddf01b23eb3fa66063ffbb7e3765943d79

tangwudang commented 6 years ago

@zaferaydn I got the same problem, can you send the lib file to me? Here is my email, wudang_tang@163.com, thanks a lot!

MoMannn commented 6 years ago

Hey guys, I need ffmpeg in doubango and if I read this correctly some of you were able to build ffmpeg libs without text relocations. Can anyone please send them to me or point me to the right direction? My email is: tadej@kalmia.si

@zaferaydn @tangwudang @LFShark @esnef @rachelxj @MobiSciLab

cnscns commented 5 years ago

@MoMannn Had you solved?Please send the build scripts to me.My email is chenns@163.com

DoubangoTelecom commented 5 years ago

See latest release. It fix TEXTREL issues and adds support for arm64 + x86_64 https://github.com/DoubangoTelecom/doubango/commit/7604ae6761534d2efdc862bc9961623abc98b9a5

cnscns commented 5 years ago

@DoubangoTelecom how to build the thirdparty *.a files?Can share the source code or build scripts?

cnscns commented 5 years ago

The TEXTREL issues still exist!

DoubangoTelecom commented 5 years ago

We are running readelf -a path/to/libtinyWRAP.so | grep TEXTREL on the libs under imsdroid/android-ngn-stack/libs/ and we don't have them.

DoubangoTelecom commented 5 years ago

Please also note that we're not using ffmpeg in our binaries as it's useless and bring licensing issues. Use commercial target as stated

cnscns commented 5 years ago

OK Thanks

DoubangoTelecom commented 4 years ago

To check which function is introducing TEXTREL: "scanelf -qT libtinyWRAP.so". To install "scanelf" on ubuntu: "sudo apt-get install pax-utils"