GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — configure.ac: using $CC to check compiler names may result in erroneous judgements · Issue #96398 · python/cpython

configure.ac: using $CC to check compiler names may result in erroneous judgements #96398

New issue
Copy link
New issue
Copy link
Closed
Closed
configure.ac: using $CC to check compiler names may result in erroneous judgements#96398
Copy link
Assignees
erlend-aasland
Labels
buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@kanavin
kanavin
opened on Aug 29, 2022
Issue body actions

configure.ac contains multiple checks of this kind:

case $CC in

When paths contain "clang"/"gcc"/"icc", they might be part of $CC
for example because of the "--sysroot" parameter. That could cause
judgement error about clang/gcc/icc compilers. e.g.

when "icc" is containded in working path, below errors are reported when compiling python3:

x86_64-wrs-linux-gcc: error: strict: No such file or directory
x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'

Linked PRs

  • gh-96398: Improve accuracy of compiler checks in configure.ac #117815
  • gh-96398: Detect emcc and mpicc in compiler names in configure #117819
  • gh-96398: Detect GCC compatible compilers in configure #117825
  • gh-96398: Purge Emscripten code from configure.ac #117836
  • gh-96398: Fix mpicc check in configure.ac #117857

Activity

  1. kanavin
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Aug 29, 2022
  2. tiran commented on Aug 29, 2022

    @tiran
    tiran
    on Aug 29, 2022
    Member
    More actions

    We are aware that the checks are problematic have already plans to replace $CC checks with $ac_cv_cc_name. It's a new variable that I introduced a short while ago.

    Reacted by Erlend E. Aasland and Michael Droettboom
  3. tiran commented on Aug 29, 2022

    @tiran
    tiran
    on Aug 29, 2022
    Member
    More actions

    CC @erlend-aasland @mdboom

  4. iritkatriel
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Nov 23, 2023
  5. erlend-aasland
    self-assigned this
    on Apr 12, 2024
  6. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    erlend-aasland
    on Apr 12, 2024
    Contributor
    More actions

    cc. @corona10

  7. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    erlend-aasland
    on Apr 12, 2024
    Contributor
    More actions

    A quick summary:

    #110034 points out that we've got various attempts to detect the compiler version in configure. There's the $CC variable, there's $cc_is_clang, $ac_cv_cc_name, and $GCC. All four of them are used.

    #110577 points out that the compiler selection check on macOS is at least partly obsolete. Perhaps that issue deserves to be re-opened and investigated on its own.

    $ac_cv_cc_name was introduced by Christian in 3124d9a (PR: #93492, issue: #93491).

  8. erlend-aasland
    added a commit that references this issue on Apr 12, 2024

    pythongh-96398: Consistently use $ac_cv_cc_name for compiler checks i…

    4a55006
  9. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    erlend-aasland
    on Apr 12, 2024
    Contributor
    More actions

    #117815 adapts most relevant checks to use $ac_cv_cc_name. Reviews welcome!

  10. erlend-aasland
    added 10 commits that reference this issue on Apr 12, 2024

    pythongh-96398: Detect emcc and mpicc in compiler names in configure

    5e0ab50

    pythongh-96398: Detect emcc and mpicc in compiler names in configure

    6a6f585

    gh-96398: Detect emcc and mpicc in compiler names in configure (#117819)

    4ce10da

    pythongh-96398: Detect GCC compatible compilers in configure

    4f32f64

    pythongh-96398: Detect GCC compatible compilers in configure

    1077ec3

    gh-96398: Detect GCC compatible compilers in configure (#117825)

    c2a551a

    pythongh-96398: Purge Emscripten code from configure.ac

    ad44734

    pythongh-96398: Fix mpicc check in configure.ac

    15ffdac

    pythongh-96398: Fix mpicc check in configure.ac

    f327791

    gh-96398: Fix mpicc check in configure.ac (#117857)

    3095d02
  11. diegorusso
    added 3 commits that reference this issue on Apr 17, 2024

    pythongh-96398: Detect emcc and mpicc in compiler names in configure (p…

    8d5c40b

    pythongh-96398: Detect GCC compatible compilers in configure (python#…

    a790834

    pythongh-96398: Fix mpicc check in configure.ac (python#117857)

    c43ad26
  12. erlend-aasland
    added a commit that references this issue on Nov 7, 2024

    gh-96398: Improve accuracy of compiler checks in configure.ac (#117815)

    a5b94d0
  13. erlend-aasland commented on Nov 7, 2024

    @erlend-aasland
    erlend-aasland
    on Nov 7, 2024
    Contributor
    More actions

    This should now be resolved. Please shout out if you still encounter problems.

  14. erlend-aasland
    closed this as completedon Nov 7, 2024
  15. picnixz
    added a commit that references this issue on Dec 8, 2024

    pythongh-96398: Improve accuracy of compiler checks in configure.ac (p…

    205fe56
  16. ebonnal
    added a commit that references this issue on Jan 12, 2025

    pythongh-96398: Improve accuracy of compiler checks in configure.ac (p…

    dbc3143
  17. encukou
    marked Flaky detection of compiler vendor #83142 as a duplicate of this issue on Oct 15, 2026
  18. hugovk
    marked Default CC is "gcc" on Mac, but should be "clang" #110577 as a duplicate of this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @erlend-aasland
    erlend-aasland

Labels

buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.