[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 385181e809bc by Vinay Sajip in branch 'default': Closes #9998: Allowed find_library to search additional locations for libraries. https://hg.python.org/cpython/rev/385181e809bc -- nosy: +python-dev resolution: -> fixed stage: patch review

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-08 Thread Daniel Blanchard
Changes by Daniel Blanchard : -- nosy: -Daniel.Blanchard ___ Python tracker ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-08 Thread Vinay Sajip
Vinay Sajip added the comment: Updated the last patch with code for handling the case where ld is not available. -- Added file: http://bugs.python.org/file44052/refresh-2016-08-08.diff ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-07 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file44036/refresh-2016-08-07.diff ___ Python tracker ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-29 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file43937/refresh-2016-07-29.diff ___ Python tracker ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-29 Thread Michael Felt
Michael Felt added the comment: Vinay - I am in favor, but if the root cause of the holdup is unclear documentation then let's address the root cause. Stronger, I am in agreement. The first patch I submitted for AIX included using LIBPATH (and could have added LD_LIBRARY_PATH) - but that was

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: Added belopolsky and meador.inge to nosy as they are listed as ctypes experts in the experts index (Amaury was already there). -- nosy: +meador.inge ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: In my view, the best should not be the enemy of the good, and pragmatism beats purity. I don't have the resources to test this functionality on all platforms - just Windows and Linux - and am not familiar with other platforms like AIX, Solaris or the BSDs. The

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Michael Felt
Michael Felt added the comment: imho - it is not correct to only make a modification of this nature for a single platform. To be realistic, if the "design" goal is to 'find' what dlopen() will find when given a argument without a pathname component - then gcc should not be used, and perhaps

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Changes by Vinay Sajip : -- hgrepos: -130 ___ Python tracker ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: I have updated the patch to apply against 3.6, and changed it to be more conservative: it only uses ld and LD_LIBRARY_PATH when trying to find a library if the existing gcc-based method fails. Seeing that this issue has been around for so long, I would really

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-07-28 Thread Michael Felt
Michael Felt added the comment: Getting back to this summary: Windows: {name} and {name}.dll, via %PATH% OS X: lib{name}.dylib, {name}.dylib and {name}.framework/{name}, via dyld_find() BSD: lib{name}.* via ldconfig (choose highest ABI version) and cc Solaris: lib{name}.so via crle, and

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-05-10 Thread Michael Felt
Michael Felt added the comment: In https://bugs.python.org/issue26439 I have been working on this for AIX - as the default behavior was to depend on two things: a) ldconfig -p (which generally does not exist on AIX, and I doubt it will know about the non-gnu libraries b) that the objects are

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-04-26 Thread Martin Panter
Martin Panter added the comment: Thanks Pau, for some reason I didn’t pick up the dylib OS X problem last time I looked at that link. This is a quick summary of the library names searched on different platforms: Windows: {name} and {name}.dll, via %PATH% OS X: lib{name}.dylib, {name}.dylib

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-04-25 Thread Vinay Sajip
Vinay Sajip added the comment: > Does anyone have any valid use cases where they want to use a shared library > on LD_LIBRARY_PATH or similar I presume that would include this issue's creator and other people who have commented here about what they see as a drawback in find_library's current

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-04-25 Thread Pau Tallada
Pau Tallada added the comment: > Pau: What is wrong with the more direct CDLL("libspatialindex_c.so") proposal > that bypasses find_library()? I don't know much about library loading, but from what I understand at https://github.com/Toblerity/rtree/issues/56 , if they hardcode

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-04-24 Thread Martin Panter
Martin Panter added the comment: I also found Issue 18502 essentially about the same incompatibility between CDLL() and find_library(). The problem I see with using find_library() to blindly load a library is that you could be loading an incompatible version (wrong soname). That is why I

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-03-14 Thread Vinay Sajip
Vinay Sajip added the comment: > find_library() is documented as emulating a build-time linker, not run-time It may be documented as that, but is emulating a build-time linker the most useful thing? In the context of Python binding to external libraries, why is build-time linking behaviour

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-03-11 Thread Martin Panter
Martin Panter added the comment: I tend to agree with the comment at . Find_library() is documented as emulating a build-time linker, not run-time. Build-time linking ignores LD_LIBRARY_PATH. Maybe it would make more sense to pass in an optional

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-03-09 Thread Pau Tallada
Pau Tallada added the comment: Any progress on this? It also affects installation of rtree (https://github.com/Toblerity/rtree/issues/56) -- nosy: +Pau Tallada ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-28 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: Since 3.4 entered beta last week, it is now in feature freeze, so only bug fixes are allowed, unfortunately. Since I did the ld patch I didn't want to commit it before getting another developer to review it, and it looks as if it just dropped under everyone's

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-02 Thread Daniel Blanchard
Daniel Blanchard added the comment: Any chance of this making it into 3.4? This is a rather annoying deficiency of find_library(). -- nosy: +Daniel.Blanchard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-07-19 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-07-18 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: What changed since http://bugs.python.org/issue2936? -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-07-18 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: What changed since http://bugs.python.org/issue2936? Well for one thing, #2936 was a bug report (behavior) but this is an enhancement request. It seems that if you don't know exactly what a library is called, you can't use find_library

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-07-18 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Fair enough. From what I've gathered though, it looks like the window for inclusion in 3.3 is already closed, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-06-04 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I added an updated patch which uses ld, and added a test (Linux/Unix only). -- hgrepos: +130 stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-06-04 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file25822/ce3be1c1091a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-08-31 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: There is a problem in this area of the code, not especially with the patch but with how gcc works (or doesn't). To illustrate: --- Version info --- vinay@eta-hardy:/tmp$ uname -a Linux eta-hardy

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-07-25 Thread Yaroslav Bulatov
Changes by Yaroslav Bulatov yarosla...@gmail.com: -- nosy: +yaroslavvb ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___ ___ Python-bugs-list

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-07-25 Thread Yaroslav Bulatov
Yaroslav Bulatov yarosla...@gmail.com added the comment: This causes problem for Freetype Python bindings on Linux -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9998 ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-07-25 Thread Jonathan Niehof
Jonathan Niehof jnie...@lanl.gov added the comment: Yaroslav: does the patch cause problems, or the original issue? If the former, could you be specific so I can try and fix it? -- ___ Python tracker rep...@bugs.python.org

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-07-25 Thread Yaroslav Bulatov
Yaroslav Bulatov yarosla...@gmail.com added the comment: Sorry for confusion, I meant the original problem causes problems. I haven't tested the patch because my target machines don't have gcc -- ___ Python tracker rep...@bugs.python.org

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2011-06-20 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +amaury.forgeotdarc, belopolsky -theller title: find_library should search LD_LIBRARY_PATH on linux - ctypes find_library should search LD_LIBRARY_PATH on linux ___ Python tracker