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

Xcode 4.6 breaks rvm #1480

Closed
lifeiscontent opened this Issue Jan 29, 2013 · 15 comments

Comments

Projects
None yet
10 participants
@lifeiscontent
Copy link

lifeiscontent commented Jan 29, 2013

when trying to install a version of ruby with xcode 4.6 installed I get this error.

Aarons-MacBook-Pro:Workspace lifeiscontent$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p374.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/lifeiscontent/.rvm/archives
Extracting yaml to /Users/lifeiscontent/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/lifeiscontent/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/lifeiscontent/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/lifeiscontent/.rvm/usr
Installing Ruby from source to: /Users/lifeiscontent/.rvm/rubies/ruby-1.9.3-p374, this may take a while depending on your cpu(s)...
ruby-1.9.3-p374 - #downloading ruby-1.9.3-p374, this may take a while depending on your connection...
ruby-1.9.3-p374 - #extracted to /Users/lifeiscontent/.rvm/src/ruby-1.9.3-p374 (already extracted)
ruby-1.9.3-p374 - #configuring
ruby-1.9.3-p374 - #compiling
Error running 'make', please read /Users/lifeiscontent/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.```
@cwgem

This comment has been minimized.

Copy link
Contributor

cwgem commented Jan 29, 2013

Can you try again and post the output of /Users/lifeiscontent/.rvm/log/ruby-1.9.3-p374/make.log?

@lifeiscontent

This comment has been minimized.

Copy link
Author

lifeiscontent commented Jan 29, 2013

yep, 1 sec. Also if it matters here is my brew config since it gives some useful specs.

HOMEBREW_VERSION: 0.9.3
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 7486ff25e065819a2adacae915a8a5e3e9c44f81
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.8.2-x86_64
Xcode: 4.6
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: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

and here is the make.log

[2013-01-28 18:02:15] make
    CC = clang
    LD = ld
    LDSHARED = clang -dynamic -bundle
    CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration  -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/Users/lifeiscontent/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.1 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace  
    SOLIBS = 
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
@mpapis

This comment has been minimized.

Copy link
Member

mpapis commented Jan 29, 2013

you are using clang according to this ticket http://bugs.ruby-lang.org/issues/5883 - it's not "fully" supported - you need to try using gcc-4.2, you get instructions for homebrew with running rvm requirements.

@lifeiscontent

This comment has been minimized.

Copy link
Author

lifeiscontent commented Jan 29, 2013

awesome, this fixed it. thanks @mpapis

@ghost ghost assigned mpapis Jan 29, 2013

@eshustrov

This comment has been minimized.

Copy link

eshustrov commented Jan 31, 2013

I would like to get Ruby source code to be fixed instead. ruby-1.9.3-p327 compiles with Xcode 4.6 just fine. The problem start just with ruby-1.9.3-p362.

@richo

This comment has been minimized.

Copy link
Member

richo commented Jan 31, 2013

This is not the place to report issues with ruby.
On 31/01/2013 11:31 PM, "Eduard Shustrov" notifications@github.com wrote:

I would like to get Ruby source code to be fixed instead. ruby-1.9.3-p327
compiles with Xcode 4.6 just fine. The problem start just with
ruby-1.9.3-p362.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1480#issuecomment-12940315.

@mpapis

This comment has been minimized.

Copy link
Member

mpapis commented Jan 31, 2013

@eshustrov you can report bugs for Ruby here: http://bugs.ruby-lang.org/

@cliffrowley

This comment has been minimized.

Copy link

cliffrowley commented Feb 1, 2013

I feel silly not reading the documentation. rvm requirements is indeed all you need.

@briankulp

This comment has been minimized.

Copy link

briankulp commented Feb 2, 2013

For the record, since it wasn't explicitly stated, once you add all of the rvm requirements that are listed, running rvm install 1.9.3 --with-gcc-4.2 will do the trick! Thanks for the help!

@mpapis

This comment has been minimized.

Copy link
Member

mpapis commented Feb 2, 2013

@briankulp RVM will detect gcc-4.2 from different sources and prefer it over clang - so it is not required to specify --with-gcc-4.2 - also this is not a flag in RVM or Ruby so it most likely has no effect, the valid flag is --with-gcc=gcc-4.2.

@cliffrowley

This comment has been minimized.

Copy link

cliffrowley commented Feb 2, 2013

Yep, just installing the requirements is enough. Built and installed fine. Runs fine.

@crosson

This comment has been minimized.

Copy link

crosson commented Mar 5, 2013

--with-gcc=gcc-4.2 didn't work for me. (Not in PATH) --with-gcc=gcc did

@mpapis

This comment has been minimized.

Copy link
Member

mpapis commented Mar 5, 2013

@crosson gcc as the LLVM compiler should work fine with ruby 2.0.0 and newer, for older rubies it was preferred to use gcc-4.2 which was producing more stable binary and avoided compilation warnings which you would get with clang. basically rvm get head should work in most cases, there are two new tickets to improve error detection especially #1650 and #1651

@aespaldi

This comment has been minimized.

Copy link

aespaldi commented Jun 24, 2013

I upgraded to XCode 4.6 and then could not install ruby-1.9.3-p357. I tried installing rvm requirements without success, but after running rvm get head and then rvm requirements I was able to install just fine.

@tuxmea

This comment has been minimized.

Copy link

tuxmea commented Jun 26, 2014

I had the same problem.
My solution: --with-ggc=gcc-apple-4.2
Using gcc-apple-4.2 from macports.

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