[Python-bugs-list] [Bug #132609] 2.1a2 possible include/library mismatch in setup.py

noreply@sourceforge.net noreply@sourceforge.net
Thu, 15 Feb 2001 13:34:13 -0800


Bug #132609, was updated on 2001-Feb-15 13:34
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: mfavas
Assigned to : nobody
Summary: 2.1a2 possible include/library mismatch in setup.py

Details: The current CVS (Feb 16) version of 2.1a2 has in setup.py the
following:

    def detect_modules(self):
        # Ensure that /usr/local is always used
        if '/usr/local/lib' not in self.compiler.library_dirs:
            self.compiler.library_dirs.append('/usr/local/lib')
        if '/usr/local/include' not in self.compiler.include_dirs:
            self.compiler.include_dirs.append( '/usr/local/include' )

        # lib_dirs and inc_dirs are used to search for files;
        # if a file is found in one of those directories, it can
        # be assumed that no additional -I,-L directives are needed.
        lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
        inc_dirs = ['/usr/include'] + self.compiler.include_dirs

Naively, it seems to me that the lib_dirs line should read:
inc_dirs = self.compiler.include_dirs + ['/usr/include']
so that /usr/local is searched during the compile/link phases before the
standard system locations. Otherwise, a module could "include" files from
/usr/include and link against library files from /usr/local/lib if a an
earlier version of some software package was bundled with the OS (and was
in /usr/include, /usr/lib) and a later version had been installed in
/usr/local/{include, lib}.

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=132609&group_id=5470