Reputation: 3890
I'm on Lion, I've installed xcode 4.1, and rvm version is 1.6.31 head
Here's what I did:
$ rvm install 1.9.2-p290 --with-iconv-dir=/usr/local/Cellar/libiconv/1.13.1
The iconv dir points to the Brew install.
Here is the output
Here is the make.log
The error at the bottom of the make.log looks like it's trying to use the native libiconv instead of the one I specified:
ld: in /Developer/SDKs/MacOSX10.7.sdk/usr/local/lib/libiconv.2.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64
Any ideas?
Upvotes: 1
Views: 2974
Reputation: 166
Remove RVM, thus making for a cleaner install later:
$ RVM implode
Remove XCode:
$ sudo /Developer/Library/uninstall-devtools –mode=all
XCode is removed since in 4.2, at least, all references to gcc are linked to llvm-gcc (Apple's) own fork of gcc. llvm will NOT compile ruby.
(One can always re-install from the AppStore later)
This will install just the bare-bones GCC compiler. It can safely be overwritten by XCode if you decide to reinstall it, or simple removed using the same command as that used for removing XCode.
reinstall RVM: http://beginrescueend.com/rvm/install/
Install the package manager "homebrew" from Link and with it install libiconv.
$ brew install libiconv
This will install several files to homebrew's home directory "/usr/local/cellar"
At this point you should have everything in place to install ruby 1.9.2 using RVM:
CC=gcc-4.2 rvm install 1.9.2-p290 --with-iconv-dir=/usr/local/Cellar/libiconv/1.14.1
(RVM does not actually support --with-iconv-dir, if you check the config.log file, but it might someday... in which case the copying of libiconv will be unnecessary)
Now go install gems and rails and anything else you might need.
Upvotes: 2
Reputation: 2048
I find this incredibly difficult and prohibiting adoption of ruby 1.9. Surely the ruby guys can make this a no-brainer install?
Upvotes: 0
Reputation: 3589
Ruby won't install with llvm, and gcc is now sym-linked to llvm. The simple fix is to use
CC=gcc-4.2 rvm install 1.9.2-p290 --with-iconv-dir=/usr/local/Cellar/libiconv/1.13.1
to force it to build with the real gcc.
Upvotes: 0
Reputation: 211540
When upgrading from 10.5 to 10.6 I had to nuke out all my installed source-built libraries and start over to fully resolve the 32-bit to 64-bit conversion issues. You may find you need to force-rebuild all of your brew packages.
Under MacPorts you just remove the /opt
directory, salvaging any database files that might be in there first, and re-install everything again. I'm sure there's a similar procedure for Brew.
There's a way to alter the library load path, too, to set priority, but MacPorts does seem to handle this for you. otool
can help diagnose which libraries are being loaded:
otool -L `which ruby`
Upvotes: 2