List versions:
pyenv install --list | grep " 3.[78]"
3.7.0
3.7-dev
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
3.7.6
3.7.7
3.7.8
3.7.9
3.8.0
3.8-dev
3.8.1
3.8.2
3.8.3
3.8.4
3.8.5
3.8.6
Install python:
install 3.7.1
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.1.tar.xz...
-> https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
Installing Python-3.7.1...
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/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124748.73048
Results logged to /var/folders/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124748.73048.log
Last 10 log lines:
checking for python3... python3
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... clang
checking whether the C compiler works... no
configure: error: in `/var/folders/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124748.73048/Python-3.7.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Install python 3.8.6, the same mushrooms:
pyenv install 3.8.6
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.6.tar.xz...
-> https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz
Installing Python-3.8.6...
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/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124910.74631
Results logged to /var/folders/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124910.74631.log
Last 10 log lines:
checking host system type... x86_64-apple-darwin20.2.0
checking for python3.8... python3.8
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/0p/tfnpx69x74z_w4kj6tjkb9tw2v9tpv/T/python-build.20210124124910.74631/Python-3.8.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
Its because you're running on bigsur but have an older xcode version - you need to update xcode.
Related
I need to install ruby 2.7.5 for my react native app but I can't install 2.7.5 through rvm. I tried many things to install any ruby version, I ended up to get this configure error.
Error running './configure --prefix=/Users/myname/.rvm/rubies/ruby-2.1.1 --disable-install-doc --enable-shared',
please read /Users/myname/.rvm/log/1672107647_ruby-2.1.1/configure.log
There has been an error while running configure. Halting the installation.
Here is the configure log
configure: WARNING: you should use --build, --host, --target
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... arm-apple-darwin22.2.0
checking host system type... arm-apple-darwin22.2.0
checking target system type... arm-apple-darwin22.2.0
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... configure: error: in `/Users/myname/.rvm/src/ruby-2.7.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
I tried...
remove rvm and reinstall
rvm install 2.7.5
rvm install ruby-2.7.5
use rbenv
install openssl
brew install openssl
rvm install 2.6.7 --with-openssl-dir=/usr/local/opt/openssl
remove rvm by using rvm implode
all those throw same error message. After trying 4., all ruby versions are removed but still can't install any ruby version.
Please help!!!
Edit
I tried
CFLAGS="-Wno-error=implicit-function-declaration" rvm install 2.7.5
and got this error
Error running './configure --prefix=/Users/myname/.rvm/rubies/ruby-2.7.5 --with-opt-dir=/opt/homebrew/opt/libyaml:/opt/homebrew/opt/libksba:/opt/homebrew/opt/readline:/opt/homebrew/opt/zlib:/opt/homebrew/opt/openssl#1.1 --disable-install-doc --enable-shared',
please read /Users/myname/.rvm/log/1672116807_ruby-2.7.5/configure.log
There has been an error while running configure. Halting the installation.
EDIT-----
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
export RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC
export optflags="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
rvm install 2.7.5
this returns same error
but I got this configure log
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... aarch64-apple-darwin22.2.0
checking host system type... aarch64-apple-darwin22.2.0
checking target system type... aarch64-apple-darwin22.2.0
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... configure: error: in `/Users/myname/.rvm/src/ruby-2.7.5':
configure: error: cannot run C compiled programs. // <---- new!
If you meant to cross compile, use `--host'.
See `config.log' for more details
------ EDIT --------
after 2days, I try to install 2.7.6 and got this message again.
checking for ruby... /Users/myname/.rvm/rubies/ruby-2.7.5/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... aarch64-apple-darwin22.2.0
checking host system type... aarch64-apple-darwin22.2.0
checking target system type... aarch64-apple-darwin22.2.0
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... configure: error: in `/Users/myname/.rvm/src/ruby-2.7.6':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Add Command Line Tools:
Ensure the command line tools are correctly installed. We might need to reinstall Xcode after OS upgrades.
Here are the exact steps to follow assuming we have openssl installed
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
export RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC
export optflags="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
rvm install 2.7.5
Do you have xcode developer tools installed? Run this "xcode-select --install"
xcode-select --install
Once you have developer tools installed you may need to refer to this comment:-
https://github.com/rbenv/ruby-build/discussions/1947#discussioncomment-2317356
When I try to install gcc49, I receive an error
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/gcc49.rb
######################################################################## 100.0%
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc49-4.9.3.tar.bz2
==> ../configure --build=x86_64-apple-darwin14.5.0 --prefix=/usr/local/Cellar/gcc49/4.9.3 --libdir=/usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.9 --w
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
checking for version 0.12 of ISL... no
checking for version 0.14 of ISL... no
configure: error: Unable to find a usable ISL. See config.log for details.
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
READ THIS: https://git.io/brew-troubleshooting
However, I do have ISL:
$ brew info isl
isl: stable 0.14.1 (bottled), HEAD
Integer Set Library for the polyhedral model
http://freecode.com/projects/isl
/usr/local/Cellar/isl/0.14.1 (68 files, 3.2M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/isl.rb
==> Dependencies
Build: xz ✔
Required: gmp ✔
I do not know where is the config.log located.
The correct way to install GCC 4.9 is to use
$ brew install homebrew/versions/gcc49
This way Homebrew will correctly resolve the missing dependencies and install them for you. You can find this version of gcc (or any other) using
$ brew search gcc49
homebrew/versions/gcc49
or
$ brew search gcc
gcc homebrew/versions/gcc47
homebrew/dupes/apple-gcc42 homebrew/versions/gcc48
homebrew/versions/gcc43 homebrew/versions/gcc49
homebrew/versions/gcc44 homebrew/versions/gcc5
homebrew/versions/gcc45 homebrew/versions/llvm-gcc28
homebrew/versions/gcc46
However, the dependency you are missing is not isl but isl011. You can install it with
$ brew install isl011
We can see that this is a dependency of gcc49 with
$ brew info gcc49
==> Dependencies
Required: gmp4 ✔, libmpc08 ✔, mpfr2 ✔, cloog018 ✔, isl011 ✔
The problem is caused by updated Xcode. Need run : "$ xcode-select --install"
My Config log file is -
./configure
current path: /home/username/.rvm/src/ruby-2.1.6
PATH=/usr/local/jdk/bin:/home/username/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home/username/.rvm/bin:/home/username/bin:/home/username/.rvm/bin
command(4): ./configure --prefix=/home/username/.rvm/rubies/ruby-2.1.6 --disable-install-doc --enable-shared
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/username/.rvm/src/ruby-2.1.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
gcc already installed -
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
I guess you do not have the required packages (dependencies) to install ruby via rvm.
Following steps should help you out:
yum install gcc-c++ patch readline readline-devel zlib zlib-devel
yum install libyaml-devel libffi-devel openssl-devel make
yum install bzip2 autoconf automake libtool bison iconv-devel
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm install 2.1.2
rvm use 2.1.2 --default
Now check your ruby version:
ruby --version
Check out http://tecadmin.net/install-ruby-2-1-on-centos-rhel/ for more details
There must be some problem with your host compiler GCC.
Another issue may be binutils.
At any rate, you should first try to see if you can compile other C-based programs.
I also recommend you wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz extract it and have a look what happens if you compile it (you can compile into an /opt prefix for now; you can use rvm lateron anyway; ./configure --prefix=/opt/ruby/2.2.2; make; make install)
This may possibly fail, have a look at config.log then. Often, but not always, config.log will have the specific error.
I assume that your compile toolchain is not complete.
I'm trying to use RVM to install ruby 1.9.2 and 1.9.3. It fails because one of the dependencies seems to be gcc46, and rvm uses brew to install it.
rbanerjee:~ $ sudo brew install gcc46
==> Installing dependencies for gcc46: gmp4, mpfr2, libmpc08, ppl011, cloog-ppl015
==> Installing gcc46 dependency: gmp4
==> Downloading ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gmp4-4.3.2.tar.bz2
==> Patching
==> ./configure --prefix=/usr/local/Cellar/gmp4/4.3.2 --enable-cxx --build=x86_64-apple-darwin
checking ABI=64
checking compiler clang ... no
checking ABI=32
checking compiler clang ... no
configure: error: could not find a working compiler, see config.log for details
but clang is there and working:
rbanerjee:~ $ which clang
/usr/bin/clang
rbanerjee:~ $ clang -v
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
Weird that the version is 4.2, since I have Xcode 4.6.3 and command line tools 4.6.3 installed. xcrun seems to be a problem too. Digging through the gcc46 logs leads to a failure to install gmp4:
in ~/Library/Logs/Homebrew/gmp4/config.log
/usr/local/Library/ENV/4.3/clang:338:in `exec': No such file or directory - xcrun (Errno::ENOENT)
from /usr/local/Library/ENV/4.3/clang:338
Any ideas? Thanks in advance. OSX Lion. Here's all my system info:
https://gist.github.com/anonymous/9e2cdb6c0d0ca0b29eba
I cannot install gcc48 with homebrew. The install fails with
(starting from the last lines in configures output):
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
configure: error: Unable to find a usable ISL. See config.log for details.
==> Formula
Tap: homebrew/versions
Path: /usr/local/Library/Taps/homebrew-versions/gcc48.rb
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: e2b10438666f41366f596fe762b2455f5761bcd8
CPU: 8-core 64-bit sandybridge
OS X: 10.8.4-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
X11: 2.7.4 => /opt/X11
==> ENV
HOMEBREW_CC: clang
MAKEFLAGS: -j1
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /opt/X11/include/freetype2:/usr/include/libxml2:/opt/X11/include
CMAKE_LIBRARY_PATH: /opt/X11/lib
PKG_CONFIG_PATH: /usr/local/opt/isl/lib/pkgconfig:/usr/local/opt/cloog/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8:/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig
HOMEBREW_MAKE_JOBS: 1
ACLOCAL_PATH: /usr/local/share/aclocal:/opt/X11/share/aclocal
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/cloog/bin:/opt/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin
Error: gcc48 did not build
I do have isl installed.
: brew info isl
isl: stable 0.12, HEAD
http://www.kotnet.org/~skimo/isl/
/usr/local/Cellar/isl/0.12 (55 files, 3.2M) *
Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/isl.rb
==> Dependencies
Required: gmp
GCC has imposed a strict requirement about ISL version. At the time being both 4.8 branch and trunk (4.9) requires ISL 0.10 or 0.11. Homebrew has temporarily reverted ISL to 0.11.2 so it should be fine now.
This isn't restricted to Homebrew. There's a problem with the configure script if cloog-0.18.0 uses the bundled sub-package of isl-0.11.1. The VERSION string is not correctly substituted, and is set to "UNKNOWN" in the isl_version() function call - the value that the gcc configure script is testing.
You might have to build (or install) ISL first, and then add --with-isl-prefix=$SOME_DIR to the cloog configure options, so it uses the external ISL installation. I built gcc-4.8.1 for AVR recently from source, and used:
## isl-0.11.1 # ftp://gcc.gnu.org/pub/gcc/infrastructure/
> ../configure --prefix=$CROSSDIR --with-gmp-prefix=$CROSSDIR
> make [check]; make install; rehash
and now build cloog-0.18.0 with the installed 'system' ISL:
> ../configure --prefix=$CROSSDIR --with-isl-prefix=$CROSSDIR \
--with-gmp-prefix=$CROSSDIR
> make [check]; make install; rehash
This also required adding: --with-isl=$CROSSDIR to the gcc configure options.