ruby-install
ruby-install copied to clipboard
Fails with yosemite unless CC=clang
I found that hint elsewhere but I could not build ruby without setting that on yosemite
I think I've been hit by the same (or at least a similar) issue. When running ruby-install ruby 2.1.4
on Yosemite, I receive the following error:
$ ruby-install ruby 2.1.4
>>> Installing ruby 2.1.4 into /Users/mathias/.rubies/ruby-2.1.4 ...
>>> Installing dependencies for ruby 2.1.4 ...
Warning: openssl-1.0.1j already installed
Warning: readline-6.3.8 already installed
Warning: libyaml-0.1.6 already installed
Warning: gdbm-1.11 already installed
Warning: libffi-3.0.13 already installed
>>> Downloading http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.bz2 into /Users/mathias/src ...
>>> Verifying ruby-2.1.4.tar.bz2 ...
*** No md5 checksum for /Users/mathias/src/ruby-2.1.4.tar.bz2
*** No sha1 checksum for /Users/mathias/src/ruby-2.1.4.tar.bz2
*** No sha256 checksum for /Users/mathias/src/ruby-2.1.4.tar.bz2
*** No sha512 checksum for /Users/mathias/src/ruby-2.1.4.tar.bz2
>>> Extracting ruby-2.1.4.tar.bz2 to /Users/mathias/src/ruby-2.1.4 ...
>>> Configuring ruby 2.1.4 ...
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
checking target system type... x86_64-apple-darwin14.0.0
checking for gcc-4.2... gcc-4.2
couldn't understand kern.osversion `14.0.0'
checking for gcc... (cached) gcc-4.2
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 gcc-4.2 accepts -g... yes
checking for gcc-4.2 option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc-4.2 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc-4.2 needs -traditional... no
checking for ld... ld
couldn't understand kern.osversion `14.0.0'
checking whether the linker is GNU ld... no
checking whether gcc-4.2 -E accepts -o... yes
checking for real target cpu... x86_64
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... no
checking for gobjdump... no
checking for objcopy... no
checking for gobjcopy... no
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... -d
use 'mkdir -p' as MKDIR_P
checking for dtrace... dtrace
checking for dot... no
checking for doxygen... no
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS="-g -O2 "
!!! Configuration of ruby 2.1.4 failed!
Yes it's the same issue. Just do this
CC=clang ruby-install .....
Yosemite has the LLVM version of gcc.
Thanks!
I'm having a similar issue when I try to install rubinius 2.3.0.
When I run CC=clang ruby-install rbx 2.3.0
it fails with this:
>>> Configuring rubinius 2.3.0 ...
Checking clang: found
Checking g++: found
Checking bison: found
Detected old configuration settings, forcing a clean build
Checking for 'llvm-config': not found
ABORT: unable to set up LLVM
Running 'configure' failed. Please check configure.log for more details.
!!! Configuration of rbx 2.3.0 failed!
I couldn't find the configure.log
mentioned, or I would post it. Any ideas what could be wrong here?
@willcosgrove that's a rubinius/LLVM issue. Could you open a separate issue for your failure. configure.log
should be in ~/src/rubinius-2.3.0/...
.
CC=clang
by itself doesn't seem to resolve this with MacPorts. The following worked for me with Yosemite and MacPorts, though:
CC=clang ruby-install rbx 2.4.1 -- --llvm-config /opt/local/bin/llvm-config-mp-3.3
Your mileage may vary.
@timuckun Are you still having issues with this? I have made changes to RBX upstream that should have resolved this. Please advise whether you're still having issues, or whether this ticket can be closed. Thanks!