DoubangoTelecom / imsdroid

High Quality Video SIP/IMS client for Google Android
https://doubango.org
Other
296 stars 169 forks source link

Android M: java.lang.UnsatisfiedLinkError: dlopen failed: has text relocations #568

Closed DoubangoTelecom closed 5 years ago

DoubangoTelecom commented 8 years ago

Only if android:targetSdkVersion>="23"

DoubangoTelecom commented 8 years ago

http://slowbutdeadly.blogspot.fr/2015/09/javalangunsatisfiedlinkerror-dlopen.html

DoubangoTelecom commented 8 years ago

To fix the issue:

ozzner commented 8 years ago

This happen when run on android M. Help me please.

\ DEVICE INFORMATION *** Brand: google Device: bullhead Model: Nexus 5X Id: MDB08L Product: bullhead ** FIRMWARE **** SDK: 23 Release: 6.0 Incremental: 2343525 \ CAUSE OF ERROR ** java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.italkyou.gui-1/lib/arm/libtinyWRAP_neon.so: has text relocations at java.lang.Runtime.loadLibrary(Runtime.java:372) at java.lang.System.loadLibrary(System.java:1076) at org.doubango.ngn.NgnEngine.initialize2(NgnEngine.java:110) at org.doubango.ngn.NgnEngine.(NgnEngine.java:94) at com.italkyou.sip.SIPManager.(SIPManager.java:42) at

yash2710 commented 8 years ago

Any solutions for it yet?

gang018 commented 8 years ago

Did anyone resolve this bug? I have the same issue on Nexus 7

kioqq commented 8 years ago

Rebuild lib for GPL use https://yadi.sk/d/sv-hJPwlucVGU

With all this stuff

Disable FFmpeg (FFmpeg is useless as we support openh264 and libyuv) Use Android NDK >10e In configure.ac, remove "-fPIC" -In android_build.sh, replace "--with-pic" with "--without-pic"

behelit commented 8 years ago

are there compiled versions of the fixed .so files available anywhere? (without text relocations), this is still an issue in the libtinyWRAP_neon.so (using Android 7.0 Nougat)

yash2710 commented 8 years ago

More than a year and no solution yet! Developers please provide support

yash2710 commented 8 years ago

@kioshimafx can you please elaborate?

kioqq commented 8 years ago

@yash2710 I don't know how fixed it, i just rebuild source code with fixes by @DoubangoTelecom

yash2710 commented 8 years ago

@kioshimafx where can I find the instructions to rebuild the source with fixes?

behelit commented 8 years ago

I think this is the guide: https://github.com/DoubangoTelecom/imsdroid/blob/master/Building_Doubango.md

EDIT: I was able to get it to work using the libs produced by following the guide. It no longer displays the text relocation errors and also has no known OpenSSL vulnerabilities

zaferaydn commented 7 years ago

I changed targetSdkVersion to 22 and it seems it doesnt throw exception anymore on emulator. But now i need to research and test more about the possible side-effects of downgrading targetSdkVersion. Cant you guys recompile the .so libraries and put them in repository?

zaferaydn commented 7 years ago

I rebuild doubango source with android NDK r10e. Then i checked libraries but there is still text relocations. I followed the below link for rebuilding the source: https://github.com/DoubangoTelecom/imsdroid/blob/master/Building_Doubango.md

Then I disabled ffmpeg, I also replaced --with-pic to --without-pic. Then I removed -fPIC in configure.ac. But I still have text relocation in the library.

Where do I make wrong? Is there some more things to try while building the source?

DoubangoTelecom commented 7 years ago

Why do you need to enable FFmpeg? It's useless in the product. Just disable it. You'll still have support for the same video features.

zaferaydn commented 7 years ago

@DoubangoTelecom thank you for your answer. I already disabled ffmeg. I just tried x86 library(x86/tinyWRAP.so), it was still having text relocation. Then I realised that arm libraries was just fixed except neon!

After I rebuilt the source without ffmpeg + without pic, I have: armeabi/tinyWRAP.so without text relocations. armeabi-v7a/tinyWRAP.so without text relocations. But I still have: armeabi-v7a/tinyWRAP_neon.so with text relocations. x86/tinyWRAP.so with text relocations.

It seems rebuilding solved my problem partially. Do you suggest any other thing to try for solving x86 and neon text relocations also?

Thanks.

behelit commented 7 years ago

Latest source fails to complete build, the following error is produced:

cp: cannot stat ‘/home/vagrant/Downloads/doubango/doubango/android-projects/output/gpl/armv5te/lib/libtinyWRAP.so.0.0.0’: No such file or directory cp: cannot stat ‘/home/vagrant/Downloads/doubango/doubango/android-projects/output/gpl/armv5te/lib/libplugin_audio_opensles.so.0.0.0’: No such file or directory cp: cannot stat ‘/home/vagrant/Downloads/doubango/doubango/android-projects/output/gpl/armv7-a/lib/libtinyWRAP.so.0.0.0’: No such file or directory cp: cannot stat ‘/home/vagrant/Downloads/doubango/doubango/android-projects/output/gpl/armv7-a/lib/libplugin_audio_opensles.so.0.0.0’: No such file or directory cp: cannot stat ‘/home/vagrant/Downloads/doubango/doubango/android-projects/output/gpl/armv7-a-neon/lib/libtinyWRAP.so.0.0.0’: No such file or directory

zaferaydn commented 7 years ago

@behelit I had the same erros as behelit received after the build. However, I found .so files in the folders, for instance: /home/vagrant/Downloads/doubango/doubango/android-projects/output/commercial/armv7-a-neon/lib/libtinyWRAP.so

I build the source as commercial. In my case, neon library does not have text-relocation issue anymore but x86library still has!

atalasu commented 7 years ago

Not working for Marshmallow and above

Still Facing the dlopen failed: /data/app/org.doubango.test.call-2/lib/arm/libtinyWRAP_neon.so: has text relocations issue. @DoubangoTelecom please help us for supporting Marshmallow.

rose09091989 commented 7 years ago

Not working for Marshmallow and above

Still Facing the dlopen failed: /data/app/org.doubango.test.call-2/lib/arm/libtinyWRAP_neon.so: has text relocations issue. @DoubangoTelecom please help us for supporting Marshmallow.

jgpestana commented 7 years ago

Same problem. It works perfectly on Android 5, but when I try in a device with Android 7 (for instance: Samsung S8) crashes inmediatally after login. I had to downgrade api target from 23 to 22 to solve the login problem, but others appears:

  1. /lib/arm/libtinyWRAP_neon.so has text relocations
  2. I can't record the calls on Asterisk.
  3. Volume too low.

I saw the following post in Duobango's mailing list:

"Using latest source code, you just need to build the libraries using 'commercial' target instead of 'gpl'. This will disable ffmpeg (replaced with libyuv) and x264 (replaced with openh264). These libraries introduce the relocation attributes"

After read it, I applied the solution: build source code using commercial target. However, when i tested the binaries in my app i got exactly the same poblems. May you help me to solve this issues? Anybody has a compile version of imsdroid that works for Android 7?

Thanks in advance.

shaik41 commented 6 years ago

Hi Guys,I have generated *.so files using the latest Doubango source. The text-relocation is fixed for arm but not for x86. Tested on 6.0,7.1,8.0 arm processors and works great. Ping me if you need the files.

atalasu commented 6 years ago

yes, @shaik41 please share your .so files.

shaik41 commented 6 years ago

Sorry for the late reply, sure I'll update this thread with a link.

Pintu1909 commented 6 years ago

defaultConfig { ndk { abiFilters "armeabi-v7a", "x86" }

    packagingOptions {
        exclude "lib/arm64-v8a/putyourlibrayname.so"
    }
}

in android quotes

follow this link

https://stackoverflow.com/questions/24357687/how-to-include-so-library-in-android-studio

kkvarma commented 6 years ago

Hi shaik41, @shaik41 please share your .so files. we are facing the same issue

tangwudang commented 6 years ago

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

kasturiRit commented 6 years ago

Hi, I got the same problem, Can you please share the updated .so file with no text relocation. My email : kasturi.chatterjee20@gmail.com, thanks a lot...

kasturiRit commented 6 years ago

@shaik41, I got the same problem, Can you please share the updated .so file with no text relocation. My email : kasturi.chatterjee20@gmail.com, thanks a lot...

AravindAndroidNGAGrpInc commented 6 years ago

@shaik41 I got the same problem, can you send the .so files to me? Here is my email, aravind.v234@gmail.com, thanks a lot!

aotian16 commented 6 years ago

I generated so files, try this

honeynatividad commented 6 years ago

@aotian16 have you encountered echo while callling? (with your so files)

aotian16 commented 6 years ago

@honeynatividad I only use armeabi so file, and no "text relocations" dialog. Others so file not test.

pengyizhao commented 6 years ago

@shaik41 I got the same problem, can you send the .so files to me? Here is my email, pengyizhao3@163.com, thanks a lot!

sundar122 commented 5 years ago

Hi Guys,I have generated *.so files using the latest Doubango source. The text-relocation is fixed for arm but not for x86. Tested on 6.0,7.1,8.0 arm processors and works great. Ping me if you need the files.

please share .so file to email id mohan.sundar151090@gmail.com

Evhyn commented 5 years ago

@shaik41, please share me your .so file to evhynandrianto@gmail.com thanks in advance

PalakSoniMls commented 5 years ago

@shaik41 Please share latest libutility .so file to email id : palak_soni14@yahoo.com thank u in advance

DirtoryYang commented 5 years ago

I generated so files, try this

Dear aotian16. i try your .so in android 7.0. the text-relocation is fixed. When used for a period of time , cell phone has a serious fever. and sometime , we get a fata error: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 7673 can you give me some more help?

DirtoryYang commented 5 years ago

Sorry for the late reply, sure I'll update this thread with a link.

I got the same problem, Can you please share the updated .so file with no text relocation. My email : yangxf_2019@163.com, thanks a lot...

NagaVenkateshParitala commented 5 years ago

yes, @shaik41 I got the same problem, Can you please share the updated .so file with no text relocation. My email : venkateshnaga93.com, thanks a lot...

shaik41 commented 5 years ago

Guys download from this link.

https://drive.google.com/file/d/13cHn2qLKQHkTYlWxJqunr89_HI1ukr_D/view?usp=sharing

Note: Fails only on x86 processors which run 6.0+

DoubangoTelecom commented 5 years ago

Fixed in the lastest release (no text relocations in x86 build). Also added support for x86_64 and arm64