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: configure GCC version detection fix for Darwin
Type: behavior Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: grobian, ronaldoussoren
Priority: normal Keywords: needs review, patch

Created on 2010-01-16 16:25 by grobian, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.5.1-darwin-gcc-version.patch grobian, 2010-01-16 16:25 proposed patch to fix gcc version detection
Messages (4)
msg97883 - (view) Author: Fabian Groffen (grobian) Date: 2010-01-16 16:25
configure.in contains a check for the compiler in use for Darwin like this:

gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`

This yields in a wrong answer if the output of gcc -v has "version" in another place as well, such as when --enable-version-specific-runtime-libs is enabled.  A better way to retrieve the compiler version is to use GCC's -dumpversion argument, which works with Apple's GCC 3.3, 4.0.1 and 4.2.1 and doesn't need additional grepping/cutting, etc.

The attached patch uses -dumpversion to retrieve the GCC version, which allows a successful configure run.
msg97937 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-17 11:45
Thanks for the patch, I didn't know of the -dumpversion flag.
msg97954 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-17 16:26
I've committed this in 77585 (trunk) and will port this to the other branches soon.
msg98993 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-02-07 11:54
Ported to 2.6 (r78065),  3.x (r78066) and 3.1 (r78068)
History
Date User Action Args
2022-04-11 14:56:56adminsetgithub: 51963
2010-02-07 11:54:11ronaldoussorensetstatus: open -> closed

messages: + msg98993
2010-01-17 16:27:03ronaldoussorensetassignee: ronaldoussoren
2010-01-17 16:26:49ronaldoussorensetresolution: fixed
messages: + msg97954
stage: patch review -> resolved
2010-01-17 11:45:21ronaldoussorensetmessages: + msg97937
2010-01-16 22:04:16r.david.murraysetnosy: + ronaldoussoren
2010-01-16 21:16:59brian.curtinsetpriority: normal
keywords: + needs review
stage: patch review
versions: - Python 2.5
2010-01-16 16:25:10grobiancreate