-
Notifications
You must be signed in to change notification settings - Fork 263
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
[BUG] broken RPATH entries on python3 modules #1556
Comments
We can probably safely disable some of those modules. We only need to include what LLDB and the NDK itself need. sqlite, curses, readline, and bz2 seem likely. The others are harder to be certain of. We probably don't need SSL proper but hashlib depends on libcrypto from the SSL library anyway, and that's maybe used somewhere? iirc we used to have a dependency on hashlib in the build, but idr where or why. |
hashlib can still provide most hash functions even if openssl isn't available. They're all implemented in native code, too, for acceptable performance. (Exceptions seem to be arcane, like |
The rpath values are fixed by https://android-review.googlesource.com/c/platform/external/python/cpython3/+/1788257. |
Probably should leave this open until prebuilts are updated. |
I noticed that our Python 3 REPL on Linux has no line editing on newer systems, probably because I see a comment in the python3 readline.c module:
We distribute libncurses.so.6 and libedit.so.0 dynamically with the Android Clang prebuilt, which contains LLDB. Maybe we want to configure Python to use libedit's readline emulation, and maybe we want both libedit and the I'm working on switching the Linux python3 build over to use Docker (centos:7 base container). I have it linking libffi statically, and currently, there are no |
The Python 3 module DSOs in our Linux prebuilt have a broken RPATH setting (
/../lib
, instead of the intended$ORIGIN/../lib
). Thepython3
andlibpython3.9.so
are fine, though.I suppose it's harmless, maybe? If it were to break something, maybe it would matter on a RHEL/CentOS system where
/lib64
has the 64-bit binaries and/lib
has the 32-bit ones. I think we want this RPATH on thepython
binary. For the modules, if we wanted an rpath at all, we'd want$ORIGIN
and/or$ORIGIN/../..
. None of the extension modules depend on any other prebuilt python DSO, though, so we could clear the rpath for everything except python, if the build system let us do that.RPATH values:
Also, because it's interesting, here are the current DT_NEEDED dependencies:
Edit: There is a small
lib/libpython3.so
ELF file (not a symlink), soname oflibpython3.so
, that needslibpython3.9.so.1.0
, so it needs its rpath of$ORIGIN/../lib
.The text was updated successfully, but these errors were encountered: