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 brobecke
Recipients brobecke, mauger
Date 2010-07-08.23:02:36
SpamBayes Score 0.0025668433
Marked as misclassified No
Message-id <1278630159.21.0.885298064727.issue7352@psf.upfronthosting.co.za>
In-reply-to
Content
GDB can suffer from the same sort of problem.  In my case, I picked up a Python binary tarball built on a different machine (without --enable-shared), and the path in -L<path> returned by python-config --ldflags refered to the prefix used at configure time.  But, by comparison, --cflags returns the correct include path.

To give more context: GDB can be linked against libpython to add python scripting support in GDB. To determine how to compile&link Python in GDB, we have a copy of python-config in GDB, and do "python /path/to/python-config --cflags/ldflags.

Because it is often convenient to pick up a binary install, and because this install is not always at the same location as the prefix used at configure time, python-config --ldflags returns a -L<path> with a path that is irrelevant in our case.

The attached patch fixes this issue.

The patch also fixes the issue originally reported: I think that python-config --ldflags should also print -L<prefix>/lib in the case where python was configured with --enable-shared.  This is necessary when prefix is not a standard location.

This was tested with Python 2.5, 2.6, and 2.7, static and shared, by calling the script with --ldflags, and by verifying the output.
History
Date User Action Args
2010-07-08 23:02:39brobeckesetrecipients: + brobecke, mauger
2010-07-08 23:02:39brobeckesetmessageid: <1278630159.21.0.885298064727.issue7352@psf.upfronthosting.co.za>
2010-07-08 23:02:36brobeckelinkissue7352 messages
2010-07-08 23:02:36brobeckecreate