Martin Panter added the comment:
Documenting this quirk seems reasonable to me if you want to suggest a patch
(and we don’t agree to fix it).
See Issue 21042 for returning full paths on Linux. We tried to make this
change, but it wasn’t easy to do it consistently for arbitrary ABIs, so I
back
Steven Johnson added the comment:
Should the docs then be changed for find_library to inform that "It is not
guaranteed that a found library can be opened" (at least for linux)?
Or would a feature request for full paths from find_library for linux be more
appropriate?
It seems hackish to me,
Meador Inge added the comment:
On Linux gcc and ld are used to implement 'find_library' and 'dlopen' is used
to implement 'CDLL'. ld searches /usr/local/lib. 'dlopen' might not if the
LD_LIBRARY_PATH isn't set up to do so. For example:
[meadori@li589-207 cpython]$ ls /usr/local/lib
libfoo.
New submission from Steven Johnson:
CDLL does not use the same paths as find_library and thus you can *find* a
library, but you can't necessarily use it.
In my case, I had SDL2 in /usr/local/lib. find_library correctly gets
the name, but does not return the path. CDLL apparently does not search