-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Lookup ld.so.cache instead of hardcoding search paths #3245
Conversation
The build fails only at Alpine Linux docker image because Alpline's ldconfig (http://www.musl-libc.org/) don't has a cache. Related to docker-library/python#111. Note that |
fa231ef
to
9eadf54
Compare
Sorry for the noise on the last comment. If If Pillow has it dependencies installed then it can be build, right? So worth the effort to adapt https://github.com/python/cpython/blob/master/Lib/ctypes/util.py |
I just searched a bit about The cache always has the same filename, and I don't expect it on a directory other than |
40377a9
to
e76c994
Compare
Any thoughts on this? I had a hard time trying to improve it. |
I'm not so familiar with this area so would prefer someone else to review it. |
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.
Let me know if you need some information to review.
Very cool that upstream developers can commit into pull requests. Happy New year! |
Fixes #3244
Changes proposed in this pull request:
/etc/ld.so.cache
instead of hardcoded assumptions;_find_strings_in_binary()
parses the cache and extract directories.It worked on my Fedora 28 workstation, but with little or even no modification it can works on FreeBSD, NetBSD and Android. Darwin architecture also has the
dyld
command that is similar toldconfig
on Linux.