New submission from Floris Bruynooghe <floris.bruynoo...@gmail.com>:

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.

----------
assignee: tarek
components: Distutils
messages: 81538
nosy: flub, tarek
severity: normal
status: open
title: Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the 
build
type: compile error
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5201>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to