Compilation of 1.9.3-p392 fails #297

Closed
jimmycuadra opened this Issue Feb 22, 2013 · 9 comments

Projects

None yet

7 participants

@jimmycuadra

ruby-build 20130222
Mac OS X 10.8.2

$ rbenv install 1.9.3-p392
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /usr/local/opt/rbenv/versions/1.9.3-p392

Downloading ruby-1.9.3-p392.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
Installing ruby-1.9.3-p392...

BUILD FAILED

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:
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
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....
@sferik
Collaborator
sferik commented Feb 22, 2013

See #281, #285, #286, or #287.

@sferik sferik closed this Feb 22, 2013
@EnriqueVidal

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.

@jimmycuadra

@EnriqueVidal I don't have apple-gcc42 installed. I just did export CC=gcc before doing the install and it worked.

@EnriqueVidal

@jimmycuadra yeah I just got it working too, thanks 😄

@paulschreiber

@sstephenson Can you not have rbenv set CC=gcc automatically?

@Atalanta Atalanta referenced this issue in sous-chefs/ruby_rbenv Feb 25, 2013
Closed

ruby-1.9.3-p392 fails to build #34

@tadman
tadman commented Feb 26, 2013

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.

@jeremy
Collaborator
jeremy commented Feb 26, 2013

@paulschreiber

Can you not have rbenv set CC=gcc automatically?

It could, but then it'd require GCC. Clang is the default toolchain in Xcode.

@jeremy
Collaborator
jeremy commented Feb 26, 2013

@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!

@dideler
dideler commented May 20, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment