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
fix native libraries search path #441
fix native libraries search path #441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm in principle, but are you sure they have to be excluded?
android.dl.library_path = android.nativeLibraryDir..":".. | ||
android.dir..":"..android.dir.."/libs:".. | ||
"/lib:/system/lib:/lib/lib?.so:/system/lib/lib?.so" | ||
string.gsub("@:@/lib?.so", "@", android.dl.system_libdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall why the /lib
& /lib/lib
stuff was in there in the first place, but is it safe to drop those?
(For context, it might have been for broken Chinese ROMs or something).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(FWIW, I'm in the "fuck it" train if that was the case, just wanted to know if you had thoughts on that ;)).
Yep, see the comments, the dynamic loader will bounce you if you try ;). |
The canonical path for native system libraries is `/system/lib` for 32bits and `/system/lib64` for 64bits (cf. https://source.android.com/docs/core/permissions/namespaces_libraries).
ba19bef
to
bf30bee
Compare
Going back further: 7d0c1fc So I checked with the oldest available emulator image for x86 (API level 10, Gingerbread), and Without a clear example of "broken Chinese ROMs or something", I would stick to the default. |
Cf. koreader/koreader#10533.
This change is