Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAndroid 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.sodlerrorreturns 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/libexcept forlibmain.sowhich is part of Servo andlibcrypto.so.1.0.0which 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?