Closed sturma closed 11 years ago
ok, solved!
I came across this issue while searching because I was experiencing the exact same issue while using rvm
to install ruby-1.9.3-p385.
You do not need to uninstall Xcode. If you have Xcode installed, and you are using Homebrew, you can just do the following:
$ brew tap homebrew/dupes
$ brew install apple-gcc42
This does look like an error in Ruby's onig_number_of_names function. The num_entries field in the st_table of type st_index_t which is ultimately unsigned long, but onig_number_of_names returns int.
Without uninstalling Xcode or installing apple-gcc42, just turning off the -Werror will do: CFLAGS="-Wno-error=shorten-64-to-32" rvm install ...
Just do this: export CC=gcc
It solves my error.
export CC=gcc
It solved my problem too.
It is said that gcc
shipped with Xcode 4.x (which is actually llvm-gcc
) is buggy: https://github.com/sstephenson/ruby-build/issues/290#issuecomment-14013057
Maybe it's not right to do export CC=gcc
.
export CC=gcc just sets it for that terminal session. if you want to just even use it for this use case only:
CC=gcc rvm install 1.9.3
which worked for me. no need to un-install xcode
While installing ruby on Mac Mountain Lion, I get the following error:
Looking at the make.log file:
I have installed latest Xcode 4, and also tried the workaround of issue #168; no success.