GNOME Bugzilla – Bug 555293
--library-path option in g-ir-scanner doesn't actually do anything
Last modified: 2015-02-07 16:50:00 UTC
Maybe append its values to LPATH env var?
Created attachment 120059 [details] [review] Dirty patch Append passed library path to LPATH env var (which will be used by python's find_library call).
This would be used for applications to scan custom libraries? Do you know where can I find information about LPATH?
(In reply to comment #2) > This would be used for applications to scan custom libraries? Do you know > where can I find information about LPATH? Yes. For example, on bug #555296 patch, I wasn't able to put the custom library in a different directory simply because g-ir-scanner (and g-ir-compiler) are not able to find the library in a different path.
Created attachment 120166 [details] [review] Updated patch I added a FIXME comment about the not-so-portable use of LPATH.
What's the difference between LPATH and LD_LIBRARY_PATH? This needs to be portable across linux/osx/win32?
(In reply to comment #5) > What's the difference between LPATH and LD_LIBRARY_PATH? > This needs to be portable across linux/osx/win32? LPATH is something that gcc uses to find libraries. Looking at the code, it seems that the use of ldconfig is just broken (using -r when it should be using -p?) and this is probably why the use of ldconfig is not working. If ldconfig doesn't find the lib, gcc is used. This is why LPATH makes find_library work here and LD_LIBRARY_PATH is being "ignored". So, in practice, LPATH is a work around for a bug in Python[2]. [1] http://svn.python.org/projects/python/trunk/Lib/ctypes/util.py [2] The only related bug report in bugs.python.org I could find is this one: http://bugs.python.org/issue3383
Commited in trunk after jdahlin review.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]