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 upStartup fails on android: Unable to load native library libmain.so after spidermonkey upgrade #6432
Comments
|
This might be similar to the CEF issue - the linker is looking for symbols that don't exist. Except Android is doing it at dynamic link time. |
|
Probably related to servo/rust-mozjs#158 |
|
Interestingly, many of the references symbols from jsapi.rs do not even exist in libmozjs.a built for Android. The one here is a great example - at least according to |
|
Even more strangely, even if you manually remove the missing ones, it's not finding matching ones. e.g., (even when you do the goofball Android "dlopen the dependencies first" trick) |
|
Aha! These symbols appear to be intentionally marked hidden by the SM build. Output from objdump: Seems intentional (there are a bunch of GCC directives in the SM build to enable the pragmas to make them invisible). @michaelwu @jdm Should I remove all of the symbols that are in rust-mozjs/jsapi.rs that are supposed to be hidden and not called from external functions? It's not clear that they would work if we attempted to call into them now, but as far as I can see we're just lucky because they're delayloaded on other platforms and we never attempt to call the Rust hooks. I could be interpreting this incorrectly, though. |
|
Yeah, that's the problem here. I'd like to fix bindgen to correctly figure out what symbols are actually visible. If you've successfully done it manually though, I don't mind landing the manual fix. |
|
This issue is fixed in servo/rust-mozjs#181. I'll pick that up when I have fixes for the rest of the Android issues. |
Update submodules and don't call setrlimit on Android r? @mbrubeck Fixes #6432. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7051) <!-- Reviewable:end -->
Update submodules and don't call setrlimit on Android r? @mbrubeck Fixes #6432. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7051) <!-- Reviewable:end -->
#6150 caused Servo to crash at startup on Android with
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
Cannot load library: reloc_library[1331]: 3020 cannot locate '_ZN2js6detail16ScrambleHashCodeEj'.