homepage

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.

classification
Title: python should inherit the library search path from the compiler for stdlib extensions
Type: behavior Stage:
Components: Build Versions: Python 3.3
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, doko, eric.araujo, vorlon
Priority: normal Keywords:

Created on 2011年06月27日 12:02 by vorlon, last changed 2022年04月11日 14:57 by admin.

Messages (4)
msg139259 - (view) Author: Steve Langasek (vorlon) Date: 2011年06月27日 12:02
related to http://bugs.python.org/issue11715
python 2.7 and 3.1 now include a patch for behavior specific to Ubuntu and Debian to search in multiarch directories for libraries needed for building stdlib extensions.
This distro-specific patch is unnecessary if instead python could just query and use the default search path from the compiler.
With gcc, it's possible to query the list of built-in library directories with:
$ gcc -print-search-dirs | sed -n -e's/libraries: =//p' | sed -e's/:/\n/g' | xargs -n1 readlink -f
and the include directories with:
$ gcc -v -E - < /dev/null 2>&1 | awk '/^#include/,/^End of search/ {i=1} i==1 && /^ / {print}'
(additional filtering, to exclude compiler-internal directories, may be sensible.)
Having python query and use these directories when searching for libraries would make the build system more robust in a variety of circumstances.
msg139653 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011年07月02日 14:02
Do you know if all compilers supported by CPython have a similar option?
msg140060 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2011年07月09日 13:18
I don't think so. But maybe it would be enough to special case GCC as a unix compiler? At least there are already autoconf checks trying to detect gcc.
msg140136 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011年07月11日 15:53
> But maybe it would be enough to special case GCC as a unix compiler?
> At least there are already autoconf checks trying to detect gcc.
Yes, we could try that. Steve, would you like to propose a patch?
History
Date User Action Args
2022年04月11日 14:57:19adminsetgithub: 56627
2011年07月11日 15:53:57eric.araujosetnosy: + barry

messages: + msg140136
versions: + Python 3.3
2011年07月09日 13:18:11dokosetnosy: + doko
messages: + msg140060
2011年07月02日 14:02:36eric.araujosetnosy: + eric.araujo
messages: + msg139653
2011年06月27日 12:02:18vorloncreate

AltStyle によって変換されたページ (->オリジナル) /