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 flub
Recipients flub, tarek
Date 2009-02-10.11:44:48
SpamBayes Score 3.2660645e-07
Marked as misclassified No
Message-id <1234266292.13.0.602157766238.issue5201@psf.upfronthosting.co.za>
In-reply-to
Content
When specifying an RPATH with -rpath or -R you can use the special
tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as
"normal search path" and "relative to current sofile" respectively.  To
get these correctly to the gcc command line you need to specify this in
LDFLAGS as `\$$LIB' to work around escapes of both the makefile and
shell, so in the Python Makefile this will appear somewhere as (this is
on one line):

CONFIG_ARGS=	 '--prefix=/opt/example.com/python25'
'LDFLAGS=-Wl,-rpath=\$$LIB:/opt/example.com/lib,--enable-new-dtags'

This works for compiling the main python binary.  But when the extension
modules get compiled distutils chokes on this. 
distutils.sysconfig.parse_makefile() does think that any value of a
variable that contains `$' in it refers to an other variable in the
makefile.  It will fail to find the value and CONFIG_ARGS will not be
defined.  This then fails in setup.py for the _ctypes extension:

if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
            return

Where `None' is returned instead of a list by .get_config_var().

It seems that distutils.sysconfig.parse_makefile() needs to understand
more of the makefile synatax to deal with this.
History
Date User Action Args
2009-02-10 11:44:52flubsetrecipients: + flub, tarek
2009-02-10 11:44:52flubsetmessageid: <1234266292.13.0.602157766238.issue5201@psf.upfronthosting.co.za>
2009-02-10 11:44:50flublinkissue5201 messages
2009-02-10 11:44:48flubcreate