Issue 18976: distutils/command/build_ext passes wrong linker flags (original) (raw)

Issue18976

Created on 2013-09-08 16:20 by Benedikt.Morbach, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
0001-make-sure-to-pass-L.-when-building-standard-extensio.patch Benedikt.Morbach,2013-09-08 16:20
Messages (4)
msg197277 - (view) Author: Benedikt Morbach (Benedikt.Morbach) * Date: 2013-09-08 16:20
At http://hg.python.org/cpython/file/1043cc2cb0ff/Lib/distutils/command/build_ext.py#l247 build_ext.py compares sys.executable against sys.exec_prefix. When cross compiling cpython, it notices that the interpreter running the build is located at exec_prefix and concludes that it is building a third-party module. Thus, it passes '-L{HOST_LIBDIR}', instead of '-L.', which breaks the build. The attached patch reverses the logic, checking if sys.executable resides in ${PWD} and assuming a third-party module otherwise. This should also fix http://bugs.python.org/issue16326
msg225038 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-08-07 20:23
@Eric what do you make of the attached patch?
msg225042 - (view) Author: Roumen Petrov (rpetrov) * Date: 2014-08-07 21:55
more simple correction is attached to
msg229710 - (view) Author: Benedikt Morbach (Benedikt.Morbach) * Date: 2014-10-20 03:03
fixed with
History
Date User Action Args
2022-04-11 14:57:50 admin set github: 63176
2014-10-20 03:03:29 Benedikt.Morbach set status: open -> closedresolution: fixedmessages: +
2014-08-07 21:55:36 rpetrov set nosy: + rpetrovmessages: +
2014-08-07 20:23:23 BreamoreBoy set nosy: + BreamoreBoymessages: + versions: - Python 2.6, Python 3.1, Python 3.2, Python 3.3
2013-09-08 16:20:20 Benedikt.Morbach create