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: Flaky detection of compiler vendor
Type: compile error Stage:
Components: Build Versions: Python 3.9, Python 3.8, Python 3.7, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jmaargh
Priority: normal Keywords:

Created on 2019-12-03 16:40 by jmaargh, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg357755 - (view) Author: John-Mark (jmaargh) Date: 2019-12-03 16:40
The `configure` script for building what appears to be any version of python (I've manually checked 2.7, 3.6.6, and master) uses simple substring-in-path checks to determine the compiler vendor. This is problematic because it is very easy for it to produce very confusing false-positives.

This appeared for me when compiling with a custom version of `clang` located at 
`/home/riccardo/some/path`, which caused this line

https://github.com/python/cpython/blob/894331838b256412c95d54051ec46a1cb96f52e7/configure#L7546

to mistakenly assume an ICC configuration (because `icc` is a substring of `riccardo`). A quick check through the script reveals that compiler vendor detection in the script doesn't appear to be unified and are mostly similarly flaky.

Other projects compile a small program that checks for defines, or parses the output of `$CC --version` or similar.
History
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 83142
2019-12-06 22:18:24terry.reedysetversions: - Python 3.5, Python 3.6
2019-12-03 16:40:39jmaarghcreate