Title: test_sysconfig when LDFLAGS defined in the user's environment
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.2
Status: closed Resolution: duplicate
Dependencies: Superseder: can't build extensions with non-default ldflags (e.g. -m32)
View: 9437
Assigned To: Nosy List: brett.cannon, pitrou
Priority: deferred blocker Keywords:

Created on 2010-09-27 22:26 by brett.cannon, last changed 2010-09-29 15:21 by pitrou. This issue is now closed.

Messages (2)
msg117484 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-27 22:26
test_sysconfig.test_ldshared_value is failing for me on Mac because my LDFLAGS environment variable is being defined twice in what sysconfig.get_config_var('LDFLAGS') returns. This fails in a comparison against sysconfig.get_config_var('LDSHARED') as the values are only set once::

AssertionError: '-L/Users/brett/.slash/_/lib -L/Users/brett/.local/lib  -L/Users/brett/.slash/_/lib -L/Users/brett/.local/lib' not found in 'clang  -L/Users/brett/.slash/_/lib -L/Users/brett/.local/lib -bundle -undefined dynamic_lookup'

I suspect what is happening is sysconfig is using PY_LDFLAGS, which uses both CONFIGURE_LDFLAGS *and* LDFLAGS when the Makefile is run. This leads to LDFLAGS being set twice if it was pulled from the user's environment variable
msg117621 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-29 15:21
Looks like a duplicate of #9437, and there's a patch you can review there :)
Date User Action Args
2010-09-29 15:21:55pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg117621

superseder: can't build extensions with non-default ldflags (e.g. -m32)
resolution: duplicate
2010-09-27 22:26:33brett.cannoncreate