[New-bugs-announce] [issue15182] find_library_file() should try to link

Jeroen Demeyer report at bugs.python.org
Mon Jun 25 15:42:16 CEST 2012

New submission from Jeroen Demeyer <jdemeyer at cage.ugent.be>:

The find_library_function() in Lib/distutils/unixccompiler.py does a very simple-minded check to determine the existence of a library. It basically only checks that a certain .so file exists. This may lead to false positives: the mere existence of a .so file does not imply that we can actually link against that library.

In addition to (or even better: instead of) checking the existence of the file, you should try to (in the spirit of autoconf) compile a simple program using $CC -l$LIB prog.c -o prog

One particular instance of where things can go wrong is with a 32-bit/64-bit multilib installation. Python might find a 64-bit library in /usr/lib when we're actually compiling 32-bit with libraries in /usr/lib32.

assignee: eric.araujo
components: Distutils
messages: 163968
nosy: eric.araujo, jdemeyer, tarek
priority: normal
severity: normal
status: open
title: find_library_file() should try to link
type: compile error
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list