You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apk, built with openssl launch error: "libssl1.0.2h.so" not found #850
Try to launch apk on the device. It fails to launch, and adb logcat python:* *:E reveals linker error:
E/Trace (15822): error opening trace file: No such file or directory (2)
V/python (15822): metadata fullscreen is1
E/linker (15822): load_library(linker.cpp:759): library "libssl1.0.2h.so" not found
E/linker (15822): soinfo_link_image(linker.cpp:1652): could not load library "libssl1.0.2h.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:759): library "libssl1.0.2h.so" not found
E/dalvikvm(15822): dlopen("/data/app-lib/org.spbelect.monarchy-2/libpython2.7.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1652): could not load library "libssl1.0.2h.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:759): library "libssl1.0.2h.so" not found
E/AndroidRuntime(15822): FATAL EXCEPTION: Thread-5955
E/AndroidRuntime(15822): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1652): could not load library "libssl1.0.2h.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:759): library "libssl1.0.2h.so" not found
I checked the /data/app-lib/org.spbelect.monarchy-2 dir on my android phone, and i have that library installed there
1|u1@android:/data/app-lib/org.spbelect.monarchy-2 # ls -l
-rwxr-xr-x system system 13464 2016-08-21 20:53 libapplication.so
-rwxr-xr-x system system 1540604 2016-08-21 20:53 libcrypto1.0.2h.so
-rwxr-xr-x system system 2518340 2016-08-21 20:53 libpython2.7.so
-rwxr-xr-x system system 206364 2016-08-21 20:53 libsdl.so
-rwxr-xr-x system system 206160 2016-08-21 20:53 libsdl_image.so
-rwxr-xr-x system system 13432 2016-08-21 20:53 libsdl_main.so
-rwxr-xr-x system system 136496 2016-08-21 20:53 libsdl_mixer.so
-rwxr-xr-x system system 320780 2016-08-21 20:53 libsdl_ttf.so
-rwxr-xr-x system system 274152 2016-08-21 20:53 libsqlite3.so
-rwxr-xr-x system system 1596492 2016-08-21 20:53 libssl1.0.2h.so
I tried to debug it a bit. When I launch python from data/data/org.spbelect.monarchy/lib, I get the same error:
127|u1@android:/data/data/org.spbelect.monarchy/lib # ./libpython2.7.so
soinfo_link_image(linker.cpp:1652): could not load library "libssl1.0.2h.so" needed by "./libpython2.7.so"; caused by load_library(linker.cpp:759): library "libssl1.0.2h.so" not found CANNOT LINK EXECUTABLE
But when I set LD_LIBRARY_PATH=".", then the error disappears:
Sorry for the delay getting back to this, and thanks for isolating the problem. I'll try to take a look at this soon, maybe just by reverting the changes for now.
One user reported that update from android 5 to android 6 broke my app. It does not launch anymore. I suspect that openssl removal in android 6 did that. But not sure though.
One user reported that update from android 5 to android 6 broke my app. It does not launch anymore. I suspect that openssl removal in android 6 did that. But not sure though.
This is the reason I introduced versioning: there are different versions of openssl shipped with different versions of Android. The fact that it worked for you before is not consistent.
This is indeed the solution in my opinion: #935 (comment)
BoringSSL
Android is moving away from OpenSSL to the BoringSSL library. If you’re using the Android NDK in your app, don't link against cryptographic libraries that are not a part of the NDK API, such as libcrypto.so and libssl.so. These libraries are not public APIs, and may change or break without notice across releases and devices. In addition, you may expose yourself to security vulnerabilities. Instead, modify your native code to call the Java cryptography APIs via JNI or to statically link against a cryptography library of your choice.
Yes, we are hitting this with the latest buildozer on Android 4.4.2 and previous. Newer versions work fine. Will experiment with loading order as suggested in some references comments.
Activity
Fak3 commentedon Jul 22, 2016
I checked the
/data/app-lib/org.spbelect.monarchy-2dir on my android phone, and i have that library installed thereBut somehow linker fails to load it.
inclement commentedon Jul 27, 2016
I'm not sure what's wrong here, I'll try to test at the weekend. Thanks for reporting it.
Fak3 commentedon Aug 4, 2016
I tried to debug it a bit. When I launch python from data/data/org.spbelect.monarchy/lib, I get the same error:
But when I set LD_LIBRARY_PATH=".", then the error disappears:
Fak3 commentedon Aug 4, 2016
Fwiw I found p4a version that works for me:
It points to commit right before the openssl recipe changes, and app launches correctly with it.
inclement commentedon Aug 31, 2016
Sorry for the delay getting back to this, and thanks for isolating the problem. I'll try to take a look at this soon, maybe just by reverting the changes for now.
Fak3 commentedon Sep 26, 2016
One user reported that update from android 5 to android 6 broke my app. It does not launch anymore. I suspect that openssl removal in android 6 did that. But not sure though.
Fak3 commentedon Sep 26, 2016
Btw here is related thread from Qt, which has some interesting info: https://bugreports.qt.io/browse/QTBUG-49069
brussee commentedon Nov 28, 2016
This is the reason I introduced versioning: there are different versions of openssl shipped with different versions of Android. The fact that it worked for you before is not consistent.
This is indeed the solution in my opinion: #935 (comment)
brussee commentedon Nov 28, 2016
From: https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
Zen-CODE commentedon Aug 22, 2017
Yes, we are hitting this with the latest buildozer on Android 4.4.2 and previous. Newer versions work fine. Will experiment with loading order as suggested in some references comments.
inclement commentedon Jan 30, 2019
Closing as stale, I believe this is currently working fine on the master branch.