New submission from Benedikt Morbach:

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

----------
assignee: eric.araujo
components: Cross-Build, Distutils, Extension Modules, Library (Lib)
files: 0001-make-sure-to-pass-L.-when-building-standard-extensio.patch
keywords: patch
messages: 197277
nosy: Benedikt.Morbach, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: distutils/command/build_ext passes wrong linker flags
type: compile error
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5
Added file: 
http://bugs.python.org/file31674/0001-make-sure-to-pass-L.-when-building-standard-extensio.patch

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

Reply via email to