Mac OS X 10.8.2
$ rbenv install 1.9.3-p392
Installed yaml-0.1.4 to /usr/local/opt/rbenv/versions/1.9.3-p392
Inspect or clean up the working tree at /var/folders/mx/mfxgb8450d97ssnd588_bg980000gn/T/ruby-build.20130222110749.98264
Results logged to /var/folders/mx/mfxgb8450d97ssnd588_bg980000gn/T/ruby-build.20130222110749.98264.log
Last 10 log lines:
st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
i = table->num_entries++;
1 error generated.
make: *** [st.o] Error 1
make: *** Waiting for unfinished jobs....
See #281, #285, #286, or #287.
It keeps failing for me, and I have apple-gcc42 installed via homebrew, in fact I've had it for a while I have p385 installed, but p392 is failing.
@EnriqueVidal I don't have apple-gcc42 installed. I just did export CC=gcc before doing the install and it worked.
@jimmycuadra yeah I just got it working too, thanks 😄
@sstephenson Can you not have rbenv set CC=gcc automatically?
If the clang compiler doesn't work for 1.9.3 that's fine, but it shouldn't be so oblivious to use it by default. Forcing gcc is the only way this will work, so a warning on non-compliant compilers is better than barfing on a C error.
Can you not have rbenv set CC=gcc automatically?
It could, but then it'd require GCC. Clang is the default toolchain in Xcode.
@tadman, clang does work on 1.9.3. When a new Xcode released, it included a new clang that introduced new kinds of warnings, which Ruby treats as errors by default. Ruby tripped one of the new warnings, which made a new error appear. Nothing's being oblivious here. We'll get it worked out!
FYI, using CC=gcc may still fail for you if it points to /usr/bin/gcc since that uses Clang on OS X.
The fix is to brew install gcc and use the GCC version it installed. E.g. CC=gcc-5
brew install gcc