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: ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages
Type: compile error Stage: resolved
Components: macOS Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: BMinas, barry, jmr, m_python, ned.deily, ronaldoussoren, terry.reedy, tthoma24, yan12125
Priority: normal Keywords:

Created on 2019-09-03 02:33 by m_python, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (9)
msg351049 - (view) Author: Daniel (m_python) Date: 2019-09-03 02:33
Hi, I use macOS Catalina 10.15. I use Xcode 10 and Xcode 11, but with that configuration, compiling Python 3.7.14 does not work for me. Any idea whats causing this issue?

user@Users-MacBook-Pro Python-3.7.4 % ./configure --with-framework-name=python36 --with-universal-archs=64-bit --enable-universalsdk=/ --enable-optimizations --enable-framework=/Users/user/Desktop/Python-3.7 
checking build system type... x86_64-apple-darwin19.0.0
checking host system type... x86_64-apple-darwin19.0.0
checking for python3.7... python3.7
checking for --enable-universalsdk... /
checking for --with-universal-archs... 64-bit
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
Configured with: --prefix=/Applications/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
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
checking for -Wl,--no-as-needed... no
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for the Android API level... not Android
checking for --with-suffix... 
checking for case-insensitive build directory... yes
checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for GNU ld... no
checking for --enable-shared... no
checking for --enable-profiling... no
checking LDLIBRARY... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
checking for ar... ar
checking for readelf... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for --with-pydebug... no
checking for --with-assertions... no
checking for --enable-optimizations... yes
checking for --with-lto... no
checking for -llvm-profdata... no
configure: llvm-profdata found via xcrun: /usr/bin/xcrun llvm-profdata
checking for -Wextra... yes
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn off gcc unused result warning... yes
checking if we can turn off gcc unused parameter warning... yes
checking if we can turn off gcc missing field initializers warning... yes
checking if we can turn off gcc invalid function cast warning... no
checking if we can turn on gcc mixed sign comparison warning... yes
checking if we can turn on gcc unreachable code warning... yes
checking if we can turn on gcc strict-prototypes warning... yes
checking if we can make implicit function declaration an error in gcc... yes
checking which compiler should be used... gcc
checking which MACOSX_DEPLOYMENT_TARGET to use... 10.15
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking whether gcc accepts -pthread... no
checking whether g++ also accepts flags for thread support... no
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... no
checking asm/types.h presence... no
checking for asm/types.h... no
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... no
checking dlfcn.h presence... yes
configure: WARNING: dlfcn.h: present but cannot be compiled
configure: WARNING: dlfcn.h:     check for missing prerequisite headers?
configure: WARNING: dlfcn.h: see the Autoconf documentation
configure: WARNING: dlfcn.h:     section "Present But Cannot Be Compiled"
configure: WARNING: dlfcn.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for dlfcn.h... no
checking errno.h usability... no
checking errno.h presence... yes
configure: WARNING: errno.h: present but cannot be compiled
configure: WARNING: errno.h:     check for missing prerequisite headers?
configure: WARNING: errno.h: see the Autoconf documentation
configure: WARNING: errno.h:     section "Present But Cannot Be Compiled"
configure: WARNING: errno.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for errno.h... no
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h:     check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for fcntl.h... no
checking grp.h usability... no
checking grp.h presence... yes
configure: WARNING: grp.h: present but cannot be compiled
configure: WARNING: grp.h:     check for missing prerequisite headers?
configure: WARNING: grp.h: see the Autoconf documentation
configure: WARNING: grp.h:     section "Present But Cannot Be Compiled"
configure: WARNING: grp.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for grp.h... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... no
checking langinfo.h presence... yes
configure: WARNING: langinfo.h: present but cannot be compiled
configure: WARNING: langinfo.h:     check for missing prerequisite headers?
configure: WARNING: langinfo.h: see the Autoconf documentation
configure: WARNING: langinfo.h:     section "Present But Cannot Be Compiled"
configure: WARNING: langinfo.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for langinfo.h... no
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... no
checking pthread.h presence... yes
configure: WARNING: pthread.h: present but cannot be compiled
configure: WARNING: pthread.h:     check for missing prerequisite headers?
configure: WARNING: pthread.h: see the Autoconf documentation
configure: WARNING: pthread.h:     section "Present But Cannot Be Compiled"
configure: WARNING: pthread.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for pthread.h... no
checking sched.h usability... no
checking sched.h presence... yes
configure: WARNING: sched.h: present but cannot be compiled
configure: WARNING: sched.h:     check for missing prerequisite headers?
configure: WARNING: sched.h: see the Autoconf documentation
configure: WARNING: sched.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sched.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sched.h... no
checking shadow.h usability... no
checking shadow.h presence... no
checking for shadow.h... no
checking signal.h usability... no
checking signal.h presence... yes
configure: WARNING: signal.h: present but cannot be compiled
configure: WARNING: signal.h:     check for missing prerequisite headers?
configure: WARNING: signal.h: see the Autoconf documentation
configure: WARNING: signal.h:     section "Present But Cannot Be Compiled"
configure: WARNING: signal.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for signal.h... no
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking termios.h usability... no
checking termios.h presence... yes
configure: WARNING: termios.h: present but cannot be compiled
configure: WARNING: termios.h:     check for missing prerequisite headers?
configure: WARNING: termios.h: see the Autoconf documentation
configure: WARNING: termios.h:     section "Present But Cannot Be Compiled"
configure: WARNING: termios.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for termios.h... no
checking for unistd.h... (cached) yes
checking utime.h usability... no
checking utime.h presence... yes
configure: WARNING: utime.h: present but cannot be compiled
configure: WARNING: utime.h:     check for missing prerequisite headers?
configure: WARNING: utime.h: see the Autoconf documentation
configure: WARNING: utime.h:     section "Present But Cannot Be Compiled"
configure: WARNING: utime.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for utime.h... no
checking poll.h usability... no
checking poll.h presence... yes
configure: WARNING: poll.h: present but cannot be compiled
configure: WARNING: poll.h:     check for missing prerequisite headers?
configure: WARNING: poll.h: see the Autoconf documentation
configure: WARNING: poll.h:     section "Present But Cannot Be Compiled"
configure: WARNING: poll.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for poll.h... no
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/epoll.h usability... no
checking sys/epoll.h presence... no
checking for sys/epoll.h... no
checking sys/poll.h usability... no
checking sys/poll.h presence... yes
configure: WARNING: sys/poll.h: present but cannot be compiled
configure: WARNING: sys/poll.h:     check for missing prerequisite headers?
configure: WARNING: sys/poll.h: see the Autoconf documentation
configure: WARNING: sys/poll.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/poll.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/poll.h... no
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/xattr.h usability... no
checking sys/xattr.h presence... yes
configure: WARNING: sys/xattr.h: present but cannot be compiled
configure: WARNING: sys/xattr.h:     check for missing prerequisite headers?
configure: WARNING: sys/xattr.h: see the Autoconf documentation
configure: WARNING: sys/xattr.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/xattr.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/xattr.h... no
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/event.h usability... no
checking sys/event.h presence... yes
configure: WARNING: sys/event.h: present but cannot be compiled
configure: WARNING: sys/event.h:     check for missing prerequisite headers?
configure: WARNING: sys/event.h: see the Autoconf documentation
configure: WARNING: sys/event.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/event.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/event.h... no
checking sys/file.h usability... no
checking sys/file.h presence... yes
configure: WARNING: sys/file.h: present but cannot be compiled
configure: WARNING: sys/file.h:     check for missing prerequisite headers?
configure: WARNING: sys/file.h: see the Autoconf documentation
configure: WARNING: sys/file.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/file.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/file.h... no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h:     check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/ioctl.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/ioctl.h... no
checking sys/kern_control.h usability... no
checking sys/kern_control.h presence... yes
configure: WARNING: sys/kern_control.h: present but cannot be compiled
configure: WARNING: sys/kern_control.h:     check for missing prerequisite headers?
configure: WARNING: sys/kern_control.h: see the Autoconf documentation
configure: WARNING: sys/kern_control.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/kern_control.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/kern_control.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... yes
configure: WARNING: sys/lock.h: present but cannot be compiled
configure: WARNING: sys/lock.h:     check for missing prerequisite headers?
configure: WARNING: sys/lock.h: see the Autoconf documentation
configure: WARNING: sys/lock.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/lock.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/param.h usability... no
checking sys/param.h presence... yes
configure: WARNING: sys/param.h: present but cannot be compiled
configure: WARNING: sys/param.h:     check for missing prerequisite headers?
configure: WARNING: sys/param.h: see the Autoconf documentation
configure: WARNING: sys/param.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/param.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/param.h... no
checking sys/random.h usability... no
checking sys/random.h presence... yes
configure: WARNING: sys/random.h: present but cannot be compiled
configure: WARNING: sys/random.h:     check for missing prerequisite headers?
configure: WARNING: sys/random.h: see the Autoconf documentation
configure: WARNING: sys/random.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/random.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/random.h... no
checking sys/select.h usability... no
checking sys/select.h presence... yes
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h:     check for missing prerequisite headers?
configure: WARNING: sys/select.h: see the Autoconf documentation
configure: WARNING: sys/select.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/select.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/select.h... no
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h:     check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/socket.h... no
checking sys/statvfs.h usability... no
checking sys/statvfs.h presence... yes
configure: WARNING: sys/statvfs.h: present but cannot be compiled
configure: WARNING: sys/statvfs.h:     check for missing prerequisite headers?
configure: WARNING: sys/statvfs.h: see the Autoconf documentation
configure: WARNING: sys/statvfs.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/statvfs.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/statvfs.h... no
checking for sys/stat.h... (cached) yes
checking sys/syscall.h usability... no
checking sys/syscall.h presence... yes
configure: WARNING: sys/syscall.h: present but cannot be compiled
configure: WARNING: sys/syscall.h:     check for missing prerequisite headers?
configure: WARNING: sys/syscall.h: see the Autoconf documentation
configure: WARNING: sys/syscall.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/syscall.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/syscall.h... no
checking sys/sys_domain.h usability... no
checking sys/sys_domain.h presence... yes
configure: WARNING: sys/sys_domain.h: present but cannot be compiled
configure: WARNING: sys/sys_domain.h:     check for missing prerequisite headers?
configure: WARNING: sys/sys_domain.h: see the Autoconf documentation
configure: WARNING: sys/sys_domain.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/sys_domain.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/sys_domain.h... no
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking sys/time.h usability... no
checking sys/time.h presence... yes
configure: WARNING: sys/time.h: present but cannot be compiled
configure: WARNING: sys/time.h:     check for missing prerequisite headers?
configure: WARNING: sys/time.h: see the Autoconf documentation
configure: WARNING: sys/time.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/time.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/time.h... no
checking sys/times.h usability... no
checking sys/times.h presence... yes
configure: WARNING: sys/times.h: present but cannot be compiled
configure: WARNING: sys/times.h:     check for missing prerequisite headers?
configure: WARNING: sys/times.h: see the Autoconf documentation
configure: WARNING: sys/times.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/times.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/times.h... no
checking for sys/types.h... (cached) yes
checking sys/uio.h usability... no
checking sys/uio.h presence... yes
configure: WARNING: sys/uio.h: present but cannot be compiled
configure: WARNING: sys/uio.h:     check for missing prerequisite headers?
configure: WARNING: sys/uio.h: see the Autoconf documentation
configure: WARNING: sys/uio.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/uio.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/uio.h... no
checking sys/un.h usability... no
checking sys/un.h presence... yes
configure: WARNING: sys/un.h: present but cannot be compiled
configure: WARNING: sys/un.h:     check for missing prerequisite headers?
configure: WARNING: sys/un.h: see the Autoconf documentation
configure: WARNING: sys/un.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/un.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/un.h... no
checking sys/utsname.h usability... no
checking sys/utsname.h presence... yes
configure: WARNING: sys/utsname.h: present but cannot be compiled
configure: WARNING: sys/utsname.h:     check for missing prerequisite headers?
configure: WARNING: sys/utsname.h: see the Autoconf documentation
configure: WARNING: sys/utsname.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/utsname.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/utsname.h... no
checking sys/wait.h usability... no
checking sys/wait.h presence... yes
configure: WARNING: sys/wait.h: present but cannot be compiled
configure: WARNING: sys/wait.h:     check for missing prerequisite headers?
configure: WARNING: sys/wait.h: see the Autoconf documentation
configure: WARNING: sys/wait.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/wait.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/wait.h... no
checking pty.h usability... no
checking pty.h presence... no
checking for pty.h... no
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking sys/resource.h usability... no
checking sys/resource.h presence... yes
configure: WARNING: sys/resource.h: present but cannot be compiled
configure: WARNING: sys/resource.h:     check for missing prerequisite headers?
configure: WARNING: sys/resource.h: see the Autoconf documentation
configure: WARNING: sys/resource.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/resource.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sys/resource.h... no
checking netpacket/packet.h usability... no
checking netpacket/packet.h presence... no
checking for netpacket/packet.h... no
checking sysexits.h usability... no
checking sysexits.h presence... yes
configure: WARNING: sysexits.h: present but cannot be compiled
configure: WARNING: sysexits.h:     check for missing prerequisite headers?
configure: WARNING: sysexits.h: see the Autoconf documentation
configure: WARNING: sysexits.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sysexits.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for sysexits.h... no
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking linux/tipc.h usability... no
checking linux/tipc.h presence... no
checking for linux/tipc.h... no
checking linux/random.h usability... no
checking linux/random.h presence... no
checking for linux/random.h... no
checking spawn.h usability... no
checking spawn.h presence... yes
configure: WARNING: spawn.h: present but cannot be compiled
configure: WARNING: spawn.h:     check for missing prerequisite headers?
configure: WARNING: spawn.h: see the Autoconf documentation
configure: WARNING: spawn.h:     section "Present But Cannot Be Compiled"
configure: WARNING: spawn.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for spawn.h... no
checking util.h usability... no
checking util.h presence... yes
configure: WARNING: util.h: present but cannot be compiled
configure: WARNING: util.h:     check for missing prerequisite headers?
configure: WARNING: util.h: see the Autoconf documentation
configure: WARNING: util.h:     section "Present But Cannot Be Compiled"
configure: WARNING: util.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for util.h... no
checking alloca.h usability... no
checking alloca.h presence... yes
configure: WARNING: alloca.h: present but cannot be compiled
configure: WARNING: alloca.h:     check for missing prerequisite headers?
configure: WARNING: alloca.h: see the Autoconf documentation
configure: WARNING: alloca.h:     section "Present But Cannot Be Compiled"
configure: WARNING: alloca.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for alloca.h... no
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/sysmacros.h usability... no
checking sys/sysmacros.h presence... no
checking for sys/sysmacros.h... no
checking for dirent.h that defines DIR... no
checking for sys/ndir.h that defines DIR... no
checking for sys/dir.h that defines DIR... no
checking for ndir.h that defines DIR... no
checking for library containing opendir... no
checking whether sys/types.h defines makedev... no
checking for sys/mkdev.h... (cached) no
checking for sys/sysmacros.h... (cached) no
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking for net/if.h... no
checking for linux/netlink.h... no
checking for linux/vm_sockets.h... no
checking for linux/can.h... no
checking for linux/can/raw.h... no
checking for linux/can/bcm.h... no
checking for clock_t in time.h... yes
checking for makedev... no
checking for le64toh... no
checking for mode_t... no
checking for off_t... no
checking for pid_t... no
checking for size_t... no
checking for uid_t in sys/types.h... yes
checking for ssize_t... no
checking for __uint128_t... no
checking size of int... 0
checking size of long... 0
checking size of long long... 0
checking size of void *... 0
checking size of short... 0
checking size of float... 0
checking size of double... 0
checking size of fpos_t... 0
checking size of size_t... 0
checking size of pid_t... 0
checking size of uintptr_t... 0
checking for long double support... no
checking size of _Bool... 0
checking size of off_t... 0
checking whether to enable large file support... no
checking size of time_t... 0
checking for pthread_t... no
checking size of pthread_key_t... 0
checking whether pthread_key_t is compatible with int... no
checking for --enable-framework... yes
checking for dyld... always on for Darwin
checking the extension of shared libraries... .so
checking LDSHARED... $(CC) -bundle -undefined dynamic_lookup
checking CCSHARED... 
checking LINKFORSHARED... -Wl,-stack_size,1000000  -framework CoreFoundation $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
checking CFLAGSFORSHARED... $(CCSHARED)
checking SHLIBS... $(LIBS)
checking for sendfile in -lsendfile... no
checking for dlopen in -ldl... no
checking for shl_load in -ldld... no
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... yes
configure: WARNING: uuid/uuid.h: present but cannot be compiled
configure: WARNING: uuid/uuid.h:     check for missing prerequisite headers?
configure: WARNING: uuid/uuid.h: see the Autoconf documentation
configure: WARNING: uuid/uuid.h:     section "Present But Cannot Be Compiled"
configure: WARNING: uuid/uuid.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.python.org/ ##
configure: WARNING:     ## --------------------------------------- ##
checking for uuid/uuid.h... no
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
checking for uuid_generate_time_safe... no
checking for uuid_create... no
checking for uuid_enc_be... no
checking for library containing sem_init... no
checking for textdomain in -lintl... no
checking aligned memory access is required... yes
checking for --with-hash-algorithm... default
checking for --with-address-sanitizer... no
checking for --with-memory-sanitizer... no
checking for --with-undefined-behavior-sanitizer... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... no
checking for --with-system-expat... no
checking for --with-system-ffi... no
checking for --with-system-libmpdec... no
checking for --enable-loadable-sqlite-extensions... no
checking for --with-tcltk-includes... default
checking for --with-tcltk-libs... default
checking for --with-dbmliborder... 
checking for _POSIX_THREADS in unistd.h... yes
checking for pthread_create in -lpthread... checking for pthread_detach... no
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lc_r... no
checking for __pthread_create_system in -lpthread... no
checking for pthread_create in -lcma... no
configure: error: could not find pthreads on your system
user@Users-MacBook-Pro Python-3.7.4 %
msg351051 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-09-03 04:01
When building a default 64-bit-only Python on current MacOS systems, don't use the --enable-universalsdk (and --with-universal-arch) options to ./configure since system header files are no longer installed in /usr/include.

Be aware that you may have to supply some third-party libraries which are no longer or have never been shipped by Apple with macOS, most notably OpenSSL libraries and libzma.  The Python Developer's Guide gives some help on how to use versions of these libraries from third-party disrbutors Homebrew or MacPorts.

https://devguide.python.org/setup/#macos-and-os-x

Also suggest you first try building and installing without using --enable-optimizations as that option greatly lengthens and complicates the build process.

And you probably want to change --with-framework-name to python37 if you continue to use it.

The Python build information for current macOS systems is somewhat out-of-date; it should be getting updated in the next few weeks.
msg351312 - (view) Author: Bill Minasian (BMinas) Date: 2019-09-07 23:19
Under OSX 10.15 beta and Xcode 11.0 beta the following does not work:
./configure --enable-framework

DYLD_FRAMEWORK_PATH=/Users/bill/cpython ./python.exe -E -S -m sysconfig --generate-posix-vars ;\
	if test $? -ne 0 ; then \
		echo "generate-posix-vars failed" ; \
		rm -f ./pybuilddir.txt ; \
		exit 1 ; \
	fi
/bin/sh: line 1: 78734 Segmentation fault: 11  DYLD_FRAMEWORK_PATH=/Users/bill/cpython ./python.exe -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed

The following seems to work:
./configure --disable-framework

My guess is that this is an Xcode 11 beta issue.
msg353409 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-09-27 20:34
#38295 gives error reports for test_py_compile with 3.8, which implies that Python was compiled well enough to run and fail a test.
msg353771 - (view) Author: Matej Cepl (mcepl) * Date: 2019-10-02 21:04
Isn’t https://bugzilla.suse.com/1152793 (removal of stropts.h from glibc) cause of this?
msg353773 - (view) Author: Matej Cepl (mcepl) * Date: 2019-10-02 21:06
Sorry, got confused. My openSUSE bug has nothing to do with it.
msg354432 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-10-11 08:21
Going back and looking closer at the original failure, I see now that the root cause of the configure failures *is* using --with-universal-archs=64-bit.  As noted in the Mac/README file, "64-bit" means compile for both "ppc64" and "x86_64" architectures; the configure tests fail because the Apple-supplied build tools (via Xcode or the Command Line Tools) have not supported either ppc or ppc64 for many years (since 10.7, I believe).  In more recent releases prior to macOS 10.15 Catalina, macOS still supported running programs in either intel-32 (i386) or intel-64 (x86_64) so there was still some use for --with-universal-archs=intel, which compiles for both x64_64 and i386.  But 10.15 Catalina no longer includes 32-bit libraries and frameworks, so it is not possible to run 32-bit executables natively anymore.  Thus the only architecture option that is of use on 10.15 is the default, x86_64.  So my original suggestion, to remove the --enable-universalsdk and --with-universal-arch options from your ./configure command should solve the problems you are seeing.  I also verified that --enable-optimizations without --wiht-universal-arch and --enable-universalsdk resulted in a successful build (after following the Devguide's recommendations to install missing libraries using Homebrew).

That said, ./configure should be less cryptic about these kinds of problems.  I've opened Issue38443 to suggest that ./configure be enhanced to give better error messages when a CPU arch is not available to build.

I was unable to reproduce the different failure reported by Bill Minasian in msg351312.  If that problem can be reproduced with the stable release of 10.15 and Xcode 11, please open a new issue for it with details on how to reproduce.
msg354580 - (view) Author: Joshua Root (jmr) * Date: 2019-10-13 13:09
The crash reported by BMinas is reputedly related to the -fstack-check option, which is said to be on by default when MACOSX_DEPLOYMENT_TARGET=10.15. I've been unable to confirm whether there was just a bug in the beta, or if it's still a problem on the final Catalina release.
msg354598 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-10-13 18:27
Thanks for the input, @jmr!  I realize that what I wrote was ambiguous so to clarify I *have* tested that example with the final release versions of Catalina and Xcode 11.1 and could not reproduce.  Just for fun, I've also tested with the latest developer previews of 10.15.1 and 11.2 with and without adding -fstack-check via 'OPT=' again without failure.  (Not being familiar with the stack-check option, I don't know if just adding it to the compiler command lines is sufficient.)  So if anyone *can* reproduce with current releases, please open a new issue about it.
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82195
2019-10-13 18:27:47ned.deilysetmessages: + msg354598
2019-10-13 13:09:19jmrsetnosy: + jmr
messages: + msg354580
2019-10-11 08:22:07ned.deilysetmessages: - msg354431
2019-10-11 08:21:54ned.deilysetmessages: + msg354432
2019-10-11 08:20:55ned.deilysetstatus: open -> closed
title: Python 3.7 does not compile -> ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages
messages: + msg354431

resolution: not a bug
stage: resolved
2019-10-11 05:11:44mceplsetnosy: - mcepl
2019-10-11 00:18:53tthoma24setnosy: + tthoma24
2019-10-10 17:11:00yan12125setnosy: + yan12125
2019-10-02 21:06:23mceplsetmessages: + msg353773
2019-10-02 21:04:37mceplsetnosy: + mcepl
messages: + msg353771
2019-09-27 20:34:55terry.reedysetnosy: + terry.reedy
messages: + msg353409
2019-09-27 20:33:24terry.reedyunlinkissue38295 superseder
2019-09-27 20:28:47terry.reedylinkissue38295 superseder
2019-09-07 23:19:29BMinassetnosy: + BMinas
messages: + msg351312
2019-09-04 17:53:07barrysetnosy: + barry
2019-09-03 04:01:40ned.deilysetmessages: + msg351051
2019-09-03 02:33:07m_pythoncreate