Reputation: 21
Trying to install python 3.12.0 using pyenv install. I have a couple older versions installed already.
The install fails while loading python part.
Note the errors in the config.log file (note "-version" or "-V" are not valid gcc-13 options)
some output from config.log:
> gcc version 13.2.0 (Homebrew GCC 13.2.0)
> configure:5079: $? = 0
> **configure:5068: /usr/local/bin/gcc-13 -V >&5
> gcc-13: error: unrecognized command-line option '-V'
> gcc-13: fatal error: no input files**
> compilation terminated.
> configure:5079: $? = 1
> **configure:5068: /usr/local/bin/gcc-13 -qversion >&5
> gcc-13: error: unrecognized command-line option '-qversion'; did you mean '--version'?
> gcc-13: fatal error: no input files**
> compilation terminated.
> configure:5079: $? = 1
> **configure:5068: /usr/local/bin/gcc-13 -version >&5
> gcc-13: error: unrecognized command-line option '-version'
> gcc-13: fatal error: no input files**
> compilation terminated.
> configure:5079: $? = 1
> configure:5099: checking whether the C compiler works
> configure:5121: /usr/local/bin/gcc-13 -I/Users/mattblake/.pyenv/versions/3.12.0/readline/include -I/Users/mattblake/.pyenv/versions/3.12.0/include -I/usr/local/opt/[email protected]/include -IShell level: 4
> /usr/local/include -L/Users/mattblake/.pyenv/versions/3.12.0/readline/lib -L/Users/mattblake/.pyenv/versions/3.12.0/lib -Wl,-rpath,/Users/mattblake/.pyenv/versions/3.12.0/lib -L/usr/local/opt/[email protected]/lib -LShell level: 4
> /usr/local/lib -Wl,-rpath,Shell level: 4
> /usr/local/lib conftest.c -LShell level: 4
> /usr/local/lib -Wl,-rpath,Shell level: 4
> /usr/local/lib >&5
> ld: warning: duplicate -rpath 'Shell' ignored
> ld: warning: search path '/Users/mattblake/.pyenv/versions/3.12.0/lib' not found
> ld: warning: search path 'Shell' not found
> ld: warning: search path 'Shell' not found
> ld: multiple errors: file cannot be open()ed, errno=2 path=level: in 'level:'; file cannot be open()ed, errno=2 path=4 in '4'; file cannot be open()ed, errno=2 path=4 in '4'; file cannot be mmap()ed, errno=22 path=/usr/local/lib in '/usr/local/lib'; file cannot be mmap()ed, errno=22 path=/usr/local/include in '/usr/local/include'; file cannot be open()ed, errno=2 path=level: in 'level:'; file cannot be open()ed, errno=2 path=4 in '4'; file cannot be open()ed, errno=2 path=4 in '4'; file cannot be open()ed, errno=2 path=level: in 'level:'; file cannot be mmap()ed, errno=22 path=/usr/local/lib in '/usr/local/lib'; file cannot be open()ed, errno=2 path=level: in 'level:'; file cannot be open()ed, errno=2 path=4 in '4'; file cannot be mmap()ed, errno=22 path=/usr/local/lib in '/usr/local/lib'; file cannot be open()ed, errno=2 path=level: in 'level:'; file cannot be mmap()ed, errno=22 path=/usr/local/lib in '/usr/local/lib'
> collect2: error: ld returned 1 exit status
> configure:5125: $? = 1
> configure:5165: result: no
> configure: failed program was:
> confdefs.h */
> | #define _NETBSD_SOURCE 1
> | #define __BSD_VISIBLE 1
> | #define _DARWIN_C_SOURCE 1
> | #define _PYTHONFRAMEWORK ""
> end confdefs.h. */
>
> int
> main (void)
> | {
>
> | ;
> return 0;
> | }
> configure:5170: error: in `/var/folders/5g/c6hfdcxd7tzf4c7ck1fztm640000gn/T/python-build.20231005083309.2171/Python-3.12.0':
> configure:5172: error: C compiler cannot create executables
> See `config.log' for more details
...
pyenv install 3.12.0
Expected it to work.
> Last 10 log lines:
> checking macOS SDKROOT... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
> checking for gcc... /usr/local/bin/gcc-13
> checking whether the C compiler works... no
> configure: error: in `/var/folders/5g/c6hfdcxd7tzf4c7ck1fztm640000gn/T/python-build.20231005083309.2171/Python-3.12.0':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> configure: WARNING: cache variable ac_cv_env_CPPFLAGS_value contains a newline
> configure: WARNING: cache variable ac_cv_env_LDFLAGS_value contains a newline
> configure: WARNING: cache variable ac_cv_env_LIBS_value contains a newline
> make: *** No targets specified and no makefile found. Stop.
Upvotes: 2
Views: 3735
Reputation: 304
For pyenv installed via homebrew on Mac OS, there appears to be a known issue with pyenv failing to build python 3.12.0 due to the incorrect version of openssl from homebrew being used. See this thread for details and suggested workarounds.
One suggested workaround is to first uninstall openssl from homebrew and to re-install it after you've successfully installed python 3.12.0 with pyenv:
brew uninstall --ignore-dependencies [email protected]
env CONFIGURE_OPTS='--enable-optimizations' pyenv install 3.12.0
brew install [email protected]
Upvotes: 6
Reputation: 21
Got the pyenv install to work. Stumbled about and found a couple local configuration settings were confusing the pyenv build script.
Upvotes: 0