Message51492
The ctypes.util.find_library function for Posix systems is actually
tailored for Linux systems. While the _findlib_gcc function relies
only on the GNU compiler and may therefore work on any system with the
"gcc" command in PATH, the _findLib_ld function relies on the
/sbin/ldconfig command (originating from SunOS 4.0) which is not
standardized. The version from GNU libc differs in option syntax and
output format from other ldconfig programs around.
I therefore provide a patch that enables find_library to properly
communicate with the ldconfig program on FreeBSD systems. It has been
tested on FreeBSD 4.11 and 6.2. It probably works on other *BSD
systems too. (It works without this patch on FreeBSD, because after
getting an error from ldconfig it falls back to _findlib_gcc.)
While at it I also tidied up the Linux specific code: I'm escaping the
function argument before interpolating it into a regular expression (to
protect against nasty regexps) and removed the code for creation of a
temporary file that was not used in any way.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:55:39 | admin | link | issue1610795 messages |
2007-08-23 15:55:39 | admin | create | |
|