dlopen failed: "/lib-main/libc++_shared.so" is for EM_ARM (40) instead of EM_386 (3)
See original GitHub issueWe’re having .so
loading error when running app on Android emulator R level. Doesn’t seems to appear on API 29.
I’ve verified that the apk has correct architecture in the proper folder:
unzip ./android/app/build/outputs/apk/debug/app-debug.apk -d /tmp/apk-debug
gobjdump -f /tmp/apk-debug/lib/x86/*.so | grep arch
architecture: i386, flags 0x00000150:
After apk install the lib folder contains proper i386 .so-s.
But when starting the app the lib-main
folder contains ARM .so-s.
See the relevant logcat in this gist https://gist.github.com/mfazekas/c593726e061a59d265835ead1c5db0dd
Not sure if related but the log has those line:
2020-04-02 11:21:18.064 10842-10842/com.rnmapboxglexample D/ApkSoSource: allowing consideration of /data/app/~~fFkI_5OwU8XV6z9_a0xypA==/com.rnmapboxglexample-Lwh6zsqdqwYFSjqSz5i5rA==/lib/x86/libc++_shared.so: sysdir file length is 997224, but the file is 575328 bytes long in the APK
I can confirm that he file with length 997224 is 386. The arm version which is incorrectly used has 575328
bytes.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was running into the same issue but wasn’t able to simply upgrade react-native because of some other dependencies.
The fix for this issue is part of SoLoader 0.8.1, you only need to force this dependency to a version higher than 0.8.0.
Root level
build.gradle
Thank you for this fix. It works in most cases but there are still some devices causing issues even after these changes. For example I have seen
One Plus 8 Pro
struggling with a similar issue (stack trace below) on Android 11