Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

configure.ac assumes -std=c11 rather than checking it, which causes make failures on old compilers #131093

Labels
buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error
@CS-cwhite

Description

@CS-cwhite

Bug report

Bug description:

Repro

Steps:

  1. Run a container having agcc that does not support the C11 standard (e.g., gcc 4.4.7)
  2. tar xvJf Python-3.13.2.tar.xz && cd Python-3.13.2
  3. ./configure && make

Expected:configure reports an error like "your compiler doesn't support C11"

Observed:configure succeeds, only formake to fail.

...configure: creating Makefileconfigure:If you want a release build with all stable optimizations active (PGO, etc),please run ./configure --enable-optimizationsconfigure: Your compiler or platform does have a working C11 stdatomic.h. A future version of Python may require stdatomic.h.sh-4.1# makegcc -std=gnu99 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include    -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.ccc1: error: unrecognized command line option "-std=c11"make: *** [Programs/python.o] Error 1

Suggestion

I think this can be fixed by changingconfigure.achere:

-    CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"+    AX_CHECK_COMPILE_FLAG([-std=c11],[+        CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"+    ], [+        AC_MSG_ERROR([Python requires -std=c11 on gcc])+    ], [-Werror])

Related issues

#91731

CPython versions tested on:

3.12.9, 3.13.2

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp