Skip to content

./configure and make failed on macOS Monterey #99337

@addlistener

Description

@addlistener

Bug report

When using ./configure it let me file a bug report

./configure                                                                                                                                         ✔ │ 23:31:36 

checking build system type... x86_64-apple-darwin21.4.0
checking host system type... x86_64-apple-darwin21.4.0
checking for python3.10... python3.10
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report

When I used brew install gcc-11 & CC=gcc-11 ./configure the configure passed but the make failed.

Which I believe the GNU gcc is missing the HAVE_BUILTIN_AVAILABLE macro?

make                                                                                                                                     ✔ │ 1m 20s  │ 23:35:40 

gcc-11 -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
gcc-11 -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Parser/token.o Parser/token.c

....
--- a lot of normal logs ---
....

gcc-11 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE_BUILTIN  -DPy_BUILD_CORE_BUILTIN -I./Include/internal -c ./Modules/posixmodule.c -o Modules/posixmodule.o
./Modules/posixmodule.c: In function 'utime_dir_fd':
./Modules/posixmodule.c:5165:9: error: 'HAVE_UTIMENSAT_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_FACCESSAT_RUNTIME'?
 5165 |     if (HAVE_UTIMENSAT_RUNTIME) {
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         HAVE_FACCESSAT_RUNTIME
./Modules/posixmodule.c:5165:9: note: each undeclared identifier is reported only once for each function it appears in
./Modules/posixmodule.c: In function 'utime_fd':
./Modules/posixmodule.c:5201:9: error: 'HAVE_FUTIMENS_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_RENAMEAT_RUNTIME'?
 5201 |     if (HAVE_FUTIMENS_RUNTIME) {
      |         ^~~~~~~~~~~~~~~~~~~~~
      |         HAVE_RENAMEAT_RUNTIME
./Modules/posixmodule.c: In function 'utime_nofollow_symlinks':
./Modules/posixmodule.c:5242:9: error: 'HAVE_UTIMENSAT_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_FACCESSAT_RUNTIME'?
 5242 |     if (HAVE_UTIMENSAT_RUNTIME) {
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         HAVE_FACCESSAT_RUNTIME
./Modules/posixmodule.c: In function 'utime_default':
./Modules/posixmodule.c:5274:9: error: 'HAVE_UTIMENSAT_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_FACCESSAT_RUNTIME'?
 5274 |     if (HAVE_UTIMENSAT_RUNTIME) {
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         HAVE_FACCESSAT_RUNTIME
./Modules/posixmodule.c: In function 'os_preadv_impl':
./Modules/posixmodule.c:9706: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
 9706 | #pragma clang diagnostic push
      |
./Modules/posixmodule.c:9707: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
 9707 | #pragma clang diagnostic ignored "-Wunguarded-availability"
      |
./Modules/posixmodule.c:9708: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
 9708 | #pragma clang diagnostic ignored "-Wunguarded-availability-new"
      |
./Modules/posixmodule.c:9718: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
 9718 | #pragma clang diagnostic pop
      |
./Modules/posixmodule.c: In function 'os_pwritev_impl':
./Modules/posixmodule.c:10346: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
10346 | #pragma clang diagnostic push
      |
./Modules/posixmodule.c:10347: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
10347 | #pragma clang diagnostic ignored "-Wunguarded-availability"
      |
./Modules/posixmodule.c:10348: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
10348 | #pragma clang diagnostic ignored "-Wunguarded-availability-new"
      |
./Modules/posixmodule.c:10359: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
10359 | #pragma clang diagnostic pop
      |
./Modules/posixmodule.c: In function 'probe_futimens':
./Modules/posixmodule.c:15466:23: error: 'HAVE_FUTIMENS_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_RENAMEAT_RUNTIME'?
15466 | PROBE(probe_futimens, HAVE_FUTIMENS_RUNTIME)
      |                       ^~~~~~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:15410:11: note: in definition of macro 'PROBE'
15410 |       if (test) {        \
      |           ^~~~
./Modules/posixmodule.c: In function 'probe_utimensat':
./Modules/posixmodule.c:15470:24: error: 'HAVE_UTIMENSAT_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_FACCESSAT_RUNTIME'?
15470 | PROBE(probe_utimensat, HAVE_UTIMENSAT_RUNTIME)
      |                        ^~~~~~~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:15410:11: note: in definition of macro 'PROBE'
15410 |       if (test) {        \
      |           ^~~~
./Modules/posixmodule.c: In function 'posixmodule_exec':
./Modules/posixmodule.c:15623:9: error: 'HAVE_PWRITEV_RUNTIME' undeclared (first use in this function); did you mean 'HAVE_OPENAT_RUNTIME'?
15623 |     if (HAVE_PWRITEV_RUNTIME) {} else {
      |         ^~~~~~~~~~~~~~~~~~~~
      |         HAVE_OPENAT_RUNTIME
./Modules/posixmodule.c: In function 'probe_utimensat':
./Modules/posixmodule.c:15415:4: warning: control reaches end of non-void function [-Wreturn-type]
15415 |    }
      |    ^
./Modules/posixmodule.c:15470:1: note: in expansion of macro 'PROBE'
15470 | PROBE(probe_utimensat, HAVE_UTIMENSAT_RUNTIME)
      | ^~~~~
./Modules/posixmodule.c: In function 'probe_futimens':
./Modules/posixmodule.c:15415:4: warning: control reaches end of non-void function [-Wreturn-type]
15415 |    }
      |    ^
./Modules/posixmodule.c:15466:1: note: in expansion of macro 'PROBE'
15466 | PROBE(probe_futimens, HAVE_FUTIMENS_RUNTIME)
      | ^~~~~
./Modules/posixmodule.c: In function 'utime_nofollow_symlinks':
./Modules/posixmodule.c:5264:1: warning: control reaches end of non-void function [-Wreturn-type]
 5264 | }
      | ^
./Modules/posixmodule.c: In function 'utime_dir_fd':
./Modules/posixmodule.c:5187:1: warning: control reaches end of non-void function [-Wreturn-type]
 5187 | }
      | ^
./Modules/posixmodule.c: In function 'utime_fd':
./Modules/posixmodule.c:5225:1: warning: control reaches end of non-void function [-Wreturn-type]
 5225 | }
      | ^
./Modules/posixmodule.c: In function 'utime_default':
./Modules/posixmodule.c:5294:1: warning: control reaches end of non-void function [-Wreturn-type]
 5294 | }
      | ^
make: *** [Modules/posixmodule.o] Error 1

Your environment

  • CPython versions tested on: 3.10.0
  • Operating system and architecture: Darwin 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64

image

gcc -v                                                                                                                                   ✔ │ 3m 14s  │ 23:50:52 
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

gcc-11 -v                                                                                                                                           ✔ │ 23:50:54 
Using built-in specs.
COLLECT_GCC=gcc-11
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-apple-darwin21/11/lto-wrapper
Target: x86_64-apple-darwin21
Configured with: ../configure --prefix=/usr/local/opt/gcc@11 --libdir=/usr/local/opt/gcc@11/lib/gcc/11 --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran,d --program-suffix=-11 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-zstd=/usr/local/opt/zstd --with-pkgversion='Homebrew GCC 11.3.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --enable-libphobos --build=x86_64-apple-darwin21 --with-system-zlib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Homebrew GCC 11.3.0)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy