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
libfreetype not found if installed at uncommon path #4296
Comments
Is there something we can do during the build process to fix this or should this just be documented? |
Good question... I'm not an expert at all, if I had to solve this problem in a pure Python library I would
... but instead the code using the shared library is C++, so I have no idea... |
The other problem with that approach is that it breaks the "dynamic" part IIRC, Python does not respect LD_LIBRARY_PATH at all for finding .so files On Mon, Mar 30, 2015 at 4:07 AM, Pietro Battiston notifications@github.com
|
This seems like standard UNIX behavior -- loading dynamic modules from an unusual location requires the setting of LD_LIBRARY_PATH. @WeatherGod: Python extensions are loaded using the standard import mechanism (the same as for regular Python modules). Any C shared libraries that those extensions used are loaded using the standard OS conventions, and |
Il giorno lun, 30/03/2015 alle 07.00 -0700, Benjamin Root ha scritto:
I would say that if any, the opposite is true! Allowing matplotlib to By the way, this (or the current mechanism) could be used as fallback. But that said, I can understand if it's too much work for a feature Pietro |
Installing libraries in non-standard location on a UNIX system comes with a certain set of standard requirements, and one of those things is setting |
except Unix-y systems are working on moving away from LD_LIBRARY_PATH. http://xahlee.info/UnixResource_dir/_/ldpath.html I now avoid LD_LIBRARY_PATH like the plague. I have been bitten too many On Wed, Apr 1, 2015 at 7:50 AM, Michael Droettboom <notifications@github.com
|
@mdboom: matplotlib's setup.py uses pkg-config, which looks to me like a pretty standard - and sufficient for avoiding further //manual// interventions - requirement for finding libraries in UNIX systems... (and by the way, python's behavior with libraries is clearly even better, so we tend to be spoiled... but that's another story) |
I'm not sure what you're asking for at this point. You want a way to not have to specify To clarify, pkg-config is for build-time configuration, and what you're talking about is run-time --- when the dynamic loading actually happens. That is generally handled by I'm open to suggestions, but I have spent a lot of time looking into this problem in the past, and there aren't really any good solutions. One could argue that this is the reason things like anaconda and ureka exist, to kind of workaround these shortcomings with dynamic linking by doing everything in a sandbox. But if you can point to such a better solution, I'm happy to have a look. The best solution I can think of would be to add an option to statically link against freetype, libpng etc. which would solve this problem. |
As I said, I do not have the skills to solve such a problem. But your last message suggests I was even conceptually not clear.
As far as I understand, this is both the most useful and the "most UNIX" approach, and it would be feasible in Python: if it is not feasible in C++ (or requires too much work)... sorry for the noise. (an option to statically link libraries would certainly solve my specific case... but then I do wonder whether it would be worth the effort) |
The issue is that we don't do (2). The OS' dynamic linker does. |
Closing this issue as there is nothing that we can do, this is an issue for the system linker. On linux you can use the
|
For various reasons (inability to install software as admin), my libfreetype install resides at an unusual path. This was not a problem while building matplotlib, since the command
worked perfectly. But now instead any
results in
matplotlib's setup.py did correctly find my pkgconfig catalog "freetype2.pc", and such catalog correctly specifies "libdir=/home/pietro/my/unusual/path/lib", but this libdir doesn't seem to be used anywhere. If I set
before invoking python, everything works fine.
The text was updated successfully, but these errors were encountered: