This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients skip.montanaro
Date 2008-10-01.16:43:51
SpamBayes Score 2.15383e-14
Marked as misclassified No
Message-id <>
If you are fortunate enough to have all your third-party libraries in
a single quasi-standard location, say, /usr/local/lib, you will
probably have never encountered this problem, but setting environment
variables like LDFLAGS don't get translated into the relevant args for
the distutils build_ext command.  The evidence for this is this output
at the end of the make process:

    Failed to find the necessary bits to build these modules:
    _hashlib           _sqlite3           _ssl
    bsddb185           linuxaudiodev      ossaudiodev
    To find the necessary bits, look in in detect_modules() for
the module's name.

    Failed to build these modules:
    _curses            _curses_panel      _tkinter
    gdbm               readline

Here's the specific failure for readline:

    >>> import readline_failed
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
	ImportError: python: fatal: open failed: No
such file or directory

yet if you poke around in my config.status file you'll see that I set
the relevant -L and -R flags:

-R/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib
-R/opt/app/nonc++/gdbm-1.8/lib -L/opt/app/nonc++/readline-4.3/lib
-R/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib
-R/opt/app/nonc++/tcl-8.4/lib -L/opt/app/nonc++/BerkleyDB-4.3/lib

The workaround is to run the build_ext command separately:

    ./python ../ build_ext --library-dirs=... --rpath=...

It's not hard to work around this problem, but it's tedious to build
the command line args from the massive list of directories I have to
educate distutils about.
Date User Action Args
2008-10-01 16:43:53skip.montanarosetrecipients: + skip.montanaro
2008-10-01 16:43:53skip.montanarosetmessageid: <>
2008-10-01 16:43:52skip.montanarolinkissue4010 messages
2008-10-01 16:43:51skip.montanarocreate