PyEnv BUILD FAILED installing Python on MacOS Ventura 13.2.1 - xcode

I'm working on a project from https://github.com/luigifreda/pyslam which uses only python 3.6.9, so I tried to install it:
pyenv install 3.6.9
and encountered a build failed:
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.9.tar.xz...
-> https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz
Installing Python-3.6.9...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 13.2.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/01/bx2q2rbn099ch5d1gr1zm5fc0000gn/T/python-build.20230216230654.91605
Results logged to /var/folders/01/bx2q2rbn099ch5d1gr1zm5fc0000gn/T/python-build.20230216230654.91605.log
Last 10 log lines:
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -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 the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report
make: *** No targets specified and no makefile found. Stop.
MacOS Venture 13.2.1
Pyenv: 2.3.13
Home brew 4.0.1
Available python versions: 3.6.8
I have tried uninstalling and reinstalling and followed the installation from https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv, but it's still not working. Any suggestions?

Related

C compiler can't create executables

I'm trying to install the elastic beanstalk cli, like so:
./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
But I'm getting the following error:
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 11.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557
Results logged to /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557.log
Last 10 log lines:
checking for python3.7... python3.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557/Python-3.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
Exiting due to failure
For some reason, the installation script isn't detecting the C compiler. Of course, both the gcc and the cc commands work in the terminal. I'm using macOS 11.1. How do I fix this?
You need to run the commands using Roseta, and arch command can be used to run commands via Rosetta:
arch -x86_64 ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer

Installing valgrind on Mac OS X Catalina [duplicate]

I tried to install Valgrind with the command "brew install valgrind" and I get a message that says:
"valgrind: This formula either does not compile or function as expected on macOS versions newer than Sierra due to an upstream incompatibility. Error: An unsatisfied requirement failed this build."
I also tried to "brew edit valgrind" and replace "sourceware.org/git/valgrind.git" with "git://sourceware.org/git/valgrind.git" in head section of the code, then wrote on Iterm "brew install --HEAD valgrind" but it gives me:
Last 15 lines from /Users/m/Library/Logs/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... yes
checking for a 32-bit only build... no
checking for a supported OS... ok (darwin)
checking for the kernel version... unsupported (19.0.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)
READ THIS: https://docs.brew.sh/Troubleshooting
See https://github.com/LouisBrunner/valgrind-macos/.
Either try
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
Or compile it from the source, if the above method doesn't work. (But they should have fixed the above method just recently.)
git clone https://github.com/LouisBrunner/valgrind-macos.git
cd valgrind-macos
./autogen.sh
./configure --prefix=/where/you/want/it/installed --enable-only64bit
make
sudo make install
Enjoy!
https://github.com/sowson/valgrind
brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb
MacOS Catalina (10.15.4), I was able to confirm the operation.

How to install specific version of ruby (1.8.6) with rbenv?

I have some old source code that runs on ruby 1.8 and rails 2.3 . I have rbenv on my system. How can I install exactly this version of ruby (v1.8.6) with rbenv?
$ rbenv install 1.8.6
Downloading ruby-1.8.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
Installing ruby-1.8.6...
WARNING: ruby-1.8.6 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: use readline from homebrew
BUILD FAILED (OS X 10.14.2 using ruby-build 20190423)
Inspect or clean up the working tree at /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412
Results logged to /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412.log
Last 10 log lines:
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412/ruby-1.8.6 /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
checking build system type... i686-apple-darwin18.2.0
checking host system type... i686-apple-darwin18.2.0
checking target system type... i686-apple-darwin18.2.0
checking for gcc... /usr/local/bin/gcc-4.2
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** No targets specified and no makefile found. Stop.
I've tried this solution but it does not work for me...
https://github.com/rbenv/ruby-build/issues/999
Any ideas?

"configure: error: C compiler cannot create executables" pecl extensions build fail on macos High Sierra

I'm building my web development IDE on Macos High Sierra 10.13.6 and following this tutorial. I'm at the step where I need to install PHP extensions (scpecially xDebug), but here is the error I get whenever I pecl any extension : checking whether the C compiler works... no
The whole log :
pecl install xdebug
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading xdebug-2.7.0.tgz ...
Starting to download xdebug-2.7.0.tgz (230,326 bytes)
.................................................done: 230,326 bytes
69 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
building in /private/tmp/pear/temp/pear-build-fredericsBTF0Y/xdebug-2.7.0
running: /private/tmp/pear/temp/xdebug/configure --with-php-config=/Applications/MAMP/bin/php/php7.0.15/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C compiler works... no
configure: error: in `/private/tmp/pear/temp/pear-build-fredericsBTF0Y/xdebug-2.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: `/private/tmp/pear/temp/xdebug/configure --with-php-config=/Applications/MAMP/bin/php/php7.0.15/bin/php-config' failed
I read everywhere to check command that line tools are installed, indeed they are (I even deleted them and reinstalled them). Now I have Xcode Version 10.1 and : xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Gcc works outside of pecl :
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
which gcc
/usr/bin/gcc
However, here is something strange: Clang installed directory is in my python Conda manager !!
clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Users/frederic/miniconda3/bin
which clang
/Users/frederic/miniconda3/bin/clang
Although, when I check via Xcode :
xcodebuild -find gcc
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
xcodebuild -find clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Can miniconda cause trouble with his own clang ? Or is it something else ?
Thanks

Installing image pgk on Octave on Mac OS X

I installed GNU Octave, version 4.2.0-rc2 on my Mac[0] using Homebrew[1].
But now I tried to install the image pkg[2].
I tried downloading it and then using this line:
"pkg install image-2.6.0.tar.gz"
Then I tried installing it with this line of code:
"pkg install -forge image"
Both resulted in the following output:
configure: error: *** A compiler with support for C++11 is required
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for octave... /usr/local/Cellar/octave/4.2.0-rc2/bin/octave-4.2.0-rc2
checking for mkoctfile... /usr/local/Cellar/octave/4.2.0-rc2/bin/mkoctfile-4.2.0-rc2
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 clang++ -std=gnu++11 accepts -g... yes
checking for clang++ -std=gnu++11 option to enable C++11 features... unsupported
pkg: error running the configure script for image.
error: called from
install at line 200 column 5
pkg at line 392 column 9
But I think I installed GCC correctly:
gcc -v
Has the following output:
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/6.2.0/lto-wrapper
Ziel: x86_64-apple-darwin15.6.0
Konfiguriert mit: ../gcc-6.2.0/configure --enable-languages=c++,fortran --with-gmp=/usr/local
Thread-Modell: posix
gcc-Version 6.2.0 (GCC)
What is my mistake? Or what have i done wrong?
[1] http://wiki.octave.org/Octave_for_MacOS_X#Homebrew
[2] http://octave.sourceforge.net/image/index.html
[0] Macbook Specifications:
MacBook Pro (13-inch, Mid 2012)
2,5 GHz Intel Core i5
16 GB 1600 MHz DDR3
macOS Sierra (Version 10.12)
I had the exact same problem. Just download the older version 2.4.1 of image and installation should work as expected.
Download Link:
https://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.4.1.tar.gz/download

Resources