pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

Loading the so file crashed in android5.1

Open chenlx761 opened this issue 1 year ago • 3 comments

Describe the bug

It crashed when booted on android5.1

Steps to reproduce

It crashed when booted on android5.1

PJSIP version

2.13

Context

android5.1 android-ndk-r20b pjsip2.13

TARGET_ABI=armeabi-v7a APP_PLATFORM=android-23 ./configure-android --use-ndk-cflags

Log, call stack, etc

2024-04-26 09:56:10.021 28640-28640/com.unionbroad.app E/art: dlopen("/data/app-lib/com.unionbroad.app-1/libpjsua2.so", RTLD_LAZY) failed: dlopen failed: empty/missing DT_HASH in "libpjsua2.so" (built with --hash-style=gnu?)
2024-04-26 09:56:10.022 28640-28640/com.unionbroad.app E/SipService: Error while loading PJSIP pjsua2 native library
    java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "libpjsua2.so" (built with --hash-style=gnu?)

chenlx761 avatar Apr 26 '24 02:04 chenlx761

Never experienced this myself, so tried to search around about the error and found this.

Perhaps you can try to insert --hash-style=both into this line?

nanangizz avatar Apr 29 '24 04:04 nanangizz

我自己从未经历过这种情况,所以尝试搜索该错误并发现了这个

也许你可以尝试插入--hash-style=both这一行

Hello, after I added this line, I got an error executing make 1714440358384 1714440411739

chenlx761 avatar Apr 30 '24 01:04 chenlx761

Oops, note that -Wl,-soname,libpjsua2.so cannot be separated. So try:

MY_JNI_LDFLAGS+= -Wl,-soname,libpjsua2.so --hash-style=both

nanangizz avatar May 03 '24 06:05 nanangizz

哎呀,注意-Wl,-soname,libpjsua2.so不能分开。所以尝试:

MY_JNI_LDFLAGS+= -Wl,-soname,libpjsua2.so --hash-style=both

Hello, I used your writing method, recompile, there is another error... 333

chenlx761 avatar May 09 '24 06:05 chenlx761