8000 Cannot install Python 3.10.12 under CLT for XCode 16, but can install under CLT for XCode 15 · Issue #3068 · pyenv/pyenv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot install Python 3.10.12 under CLT for XCode 16, but can install under CLT for XCode 15 #3068

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

Open
11 tasks done
combacsa opened this issue Sep 20, 2024 · 5 comments
Open
11 tasks done
Labels
third-party the problem is in third-party software

Comments

@combacsa
Copy link
combacsa commented Sep 20, 2024

Prerequisite

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv issues. You should look for closed issues, too.
  • Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from plugins.
    • This repository is maintaining pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.

Description

  • Platform information (e.g. Ubuntu Linux 16.04): macOS 14.5
  • OS architecture (e.g. amd64): aarch64-apple-darwin23.5.0
  • pyenv version: pyenv 2.4.13
  • Python version: 3.10.12
  • C Compiler information (e.g. gcc 7.3): Apple clang version 16.0.0 (clang-1600.0.26.3) - Target: arm64-apple-darwin23.6.0
  • If you have a problem with installing Python, please also attach config.log from the build directory

With Command Line Tools for XCode 15.3 I have no problem with installing python using pyenv, but with Command Line Tools for XCode 16 I'm facing strange problem. That XCode 16 release was just 3 days ago.

~ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin~ ls
Applications (Parallels) Library                  Pictures
Desktop                  Movies                   Public
Documents                Music                    work
Downloads                Parallels~ env SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk \
  MACOSX_DEPLOYMENT_TARGET=13.3 \
  PYTHON_CONFIGURE_OPTS="--enable-framework" \
  pyenv install 3.10.12
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.12.tar.xz...
-> https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tar.xz
Installing Python-3.10.12...
python-build: use readline from homebrew

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

Inspect or clean up the working tree at /var/folders/tv/dppw7cs50hx9j9t0t9wvrts80004x3/T/python-build.20240920210953.40316
Results logged to /var/folders/tv/dppw7cs50hx9j9t0t9wvrts80004x3/T/python-build.20240920210953.40316.log

Last 10 log lines:
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/var/folders/tv/dppw7cs50hx9j9t0t9wvrts80004x3/T/python-build.20240920210953.40316/Python-3.10.12':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

I installed older Command Line Tools for XCode 15.3 then it just went very well.

➜  ~ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
➜  ~ env SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk \
  MACOSX_DEPLOYMENT_TARGET=13.3 \
  PYTHON_CONFIGURE_OPTS="--enable-framework" \
  pyenv install 3.10.12
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.12.tar.xz...
-> https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tar.xz
Installing Python-3.10.12...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.10.12 to /Users/khbyun/.pyenv/versions/3.10.12

It may seems to be a duplicate of #2983 but just re-installing CLT for XCode 16 didn't help.

@native-api
Copy link
Member
native-api commented Sep 26, 2024

It may seems to be a duplicate of #2983 but just re-installing CLT for XCode 16 didn't help.

The error ld: library 'System' not found unambiguously means that your toolchain is broken.

Check if you have any compiler-affecting envvars (I don't see any in config.log but just in case).

Look though other posts in #2983. In particular, see if you have selected the right one with xcode-select and if there are any other bits on the system that shadow Apple's tools (see "common build problems" on the wiki for known offenders). Try removing everything compiler-related and doing a clean install of the Command-Line Tools.

@native-api native-api added the third-party the problem is in third-party software label Sep 26, 2024
@combacsa
Copy link
Author

It may seems to be a duplicate of #2983 but just re-installing CLT for XCode 16 didn't help.

The error ld: library 'System' not found unambiguously means that your toolchain is broken.
Try removing everything compiler-related and doing a clean install of the Command-Line Tools.

Doing a clean install of the Command-Line Tools for XCode 15.3 perfectly work, while a clean install of the Command-Line Tools for XCode 16 do not work. (It's newly purchased M3 Mac Pro and hadn't installed any Command-Line Tools for XCode before.)

Yet I hadn't try with other versions of Python, because I specifically need 3.10.12. Maybe I should try installing different versions?

@native-api
Copy link
Member

Others have also reported problems with XCode 16.

We add it to compiler flags to use ZLib from there. Maybe that breaks XCode 16 due to structural changes.

Try applying this change:

--- a/plugins/python-build/bin/python-build
+++ b/plugins/python-build/bin/python-build
@@ -818,7 +818,7 @@ build_package_standard_build() {
     use_homebrew_readline || use_freebsd_pkg || true
     use_homebrew_ncurses || true
     if is_mac -ge 1014; then
-      use_xcode_sdk_zlib || use_homebrew_zlib || true
+      use_homebrew_zlib || true
     else
       use_homebrew_zlib || true
     fi

@villagab4
Copy link

Having the same problem, any solutions here?

@native-api
Copy link
Member
native-api commented Dec 1, 2024

@joshfriend @anton-petrov Could you try to diagnose this issue on your hardware? Hopefully, it's able to run MacOS 14, unlike mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
third-party the problem is in third-party software
Projects
None yet
Development

No branches or pull requests

3 participants
0