Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby-1.9.3-p327 build fails #285

Closed
reneruiz opened this issue Feb 12, 2013 · 3 comments
Closed

ruby-1.9.3-p327 build fails #285

reneruiz opened this issue Feb 12, 2013 · 3 comments

Comments

@reneruiz
Copy link

$  brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 30cfe7f1c6a6c2becf75c2739f152d13c69c1c65
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.2-x86_64
CLT: 4.6.0.0.1.1358221012
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /Users/reneruiz/.rbenv/shims/ruby

I installed readline before ruby-build as the Wiki suggested:

brew install readline ruby-build
env CONFIGURE_OPTS=--with-readline-dir=`brew --prefix readline` rbenv install 1.9.3-p327

but the build continues to fail

Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/reneruiz/.rbenv/versions/1.9.3-p327

Downloading ruby-1.9.3-p327.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/96118e856b502b5d7b3a4398e6c6e98c
Installing ruby-1.9.3-p327...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/gr/tcmj3sp50tsdx86_9x83vws00000gn/T/ruby-build.20130211194333.48765
Results logged to /var/folders/gr/tcmj3sp50tsdx86_9x83vws00000gn/T/ruby-build.20130211194333.48765.log

Last 10 log lines:
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    return t->num_entries;
    ~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
make: *** Waiting for unfinished jobs....

Seeing same error when running

CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 1.9.3-p327
@jvrmaia
Copy link

jvrmaia commented Feb 12, 2013

@reneruiz look this #286

@jeremy
Copy link
Member

jeremy commented Feb 12, 2013

Problem is that Ruby tries to be helpful and pick a compiler for you. It looks for gcc-4.2 first, which Apple provides as a symlink to its LLVM-backed compiler. Not GCC at all! Try adding --with-clang or --without-gcc to your CONFIGURE_OPTS to work around.

@timurvafin
Copy link

Guys,

Same for me on fresh osx 10.8.2, command line tools, brew's apple-gcc42.
Work around is: CC=gcc rbenv install 1.9.3-p385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants