-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android startup fails loading libmain.so due to OpenSSL library failure #5145
Comments
Is strace available on android? It might show if it's trying to open those system libs and rejecting them? |
mwu suggested on IRC that we shouldn't be linking to libandroid.so at all, since the symbols it exposes are unstable and only meant to be used through JNI interfaces. When I modified Servo's linker arguments to remove
|
There is a |
We're no longer linking the OpenSSL libs statically because we don't set the new |
Required by the latest version of the openssl-sys build script. Fixes servo#5145.
Required by the latest version of the openssl-sys build script. Fixes servo#5145.
Required by the latest version of the openssl-sys build script. Fixes #5145. r? @larsbergstrom or @glennw <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5784) <!-- Reviewable:end -->
Since the latest Rust upgrade, Servo crashes on startup on Android with the following error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.native_activity/rust.glutin.MainActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/data/com.example.native_activity/lib/libmain.so
dlerror
returns the following in a small test program:Loading library: Cannot load library: link_image[1916]: 5532 could not load needed library 'libandroid.so' for 'libmain.so' (link_image[1916]: 5532 could not load needed library 'libandroid_runtime.so' for 'libandroid.so' (link_image[1916]: 5532 could not load needed library 'libssl.so' for 'libandroid_runtime.so' (link_image[1916]: 5532 could not load needed library 'libcrypto.so.1.0.0' for 'libssl.so' (load_library[1118]: Library 'libcrypto.so.1.0.0' not found))))
The dynamic libraries mentioned above are all found in
/system/lib
except forlibmain.so
which is part of Servo andlibcrypto.so.1.0.0
which does not exist. (There is only/system/lib/libcrypto.so
. I'm not sure what is trying to use the versioned filename or why.)We should be linking libssl and libcrypto statically on Android (sfackler/rust-openssl#119). Maybe our statically-linked versions are now conflicting somehow with the system version linked by
libandroid_runtime.so
?The text was updated successfully, but these errors were encountered: