Skip to content

Unable to build Python on macOS Big Sur with Xcode 12 beta #1643

@Sjors

Description

@Sjors

I installed macOS Big Sur beta 1, Xcode 12.0 beta (12A6159) on an old Mac to see what breaks. I'm able to install PyEnv via Homebrew, but I'm not able to build any Python version.

Apple clang version 12.0.0

% pyenv install 3.8.3
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.3.tar.xz...
-> https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tar.xz
Installing Python-3.8.3...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 10.16 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/sl/5j1zvmtj0gb8qpgkklkf38dh0000gr/T/python-build.20200626170507.14625
Results logged to /var/folders/sl/5j1zvmtj0gb8qpgkklkf38dh0000gr/T/python-build.20200626170507.14625.log

Last 10 log lines:
./Modules/posixmodule.c:9141:12: note: forward declaration of 'struct sf_hdtr'
    struct sf_hdtr sf;
           ^
./Modules/posixmodule.c:9221:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(in, out, offset, &sbytes, &sf, flags);
              ^
2 errors generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.

pyenv_install.log

Note that MacOSX.sdk is symlinked to MacOSX10.16.sdk. Pointing the symlink to MacOSX10.15.sdk doesn't help.

I didn't try switching to Xcode 11 yet, though that will probably help, if it's indeed a clang problem.

Downloading and installing Python 3.8.3 from the website works fine (python3 executable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions