8000 Python build fails if the path to the compiler includes strings common with the compiler names (icc, gcc, etc) · Issue #108465 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Python build fails if the path to the compiler includes strings common with the compiler names (icc, gcc, etc) #108465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
jmicco opened this issue Aug 25, 2023 · 0 comments · Fixed by #108392
Closed
2 tasks done
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@jmicco
Copy link
Contributor
jmicco commented Aug 25, 2023

Bug report

Checklist

  • I am confident this is a bug in CPython, not a bug in a third-party project
  • I have searched the CPython issue tracker,
    and am confident this bug has not been reported before

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

|Python 3.11.4 (main, Jun 6 2023, 22:16:46) [GCC 12.2.0]

A clear and concise description of the bug:

My home directory includes the string "icc" because that is my userid (jmicco).

When using GCC installed into my home directory, incorrect options were passed to the compiler that were invalid because the code uses icc to determine when to add the flags. This causes the build to fail immediately with an illegal compiler option for GCC:

case "$CC" in
*mpicc*)
    CFLAGS_NODIST="$CFLAGS_NODIST"
    ;;
*icc*)
    # ICC needs -fp-model strict or floats behave badly
    CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
    ;;
*xlc*)
    CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
    ;;
esac

The -fp-model strict option was passed to GCC when running the compiler from my sandbox - this caused the build to completely fail

Linked PRs

@jmicco jmicco added the type-bug An unexpected behavior, bug, or error label Aug 25, 2023
@hugovk hugovk added the build The build process and cross-build label Aug 25, 2023
erlend-aasland added a commit that referenced this issue Aug 27, 2023
…8392)

Note:
GNU Autoconf discourages the use of 'basename', and recommends 'expr' instead.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0