views:

1146

answers:

2

Hello
I've got some problems to get Ruby 1.9.2 compiling with rvm (Ruby Version Manger) under Snow Leopard.
I want everything possibly to be 64-Bit so I already added

ARCHFLAGS="-arch x86_64"

to my .bash_profile.

Then, when running:

rvm install 1.9.2 -C --enable-shared

I get an error during compiling. Here is the make.error.log:

[2010-01-20 10:03:00] make 
ld: in /usr/local/lib/libxml2.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/i386-darwin10.2.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

Hope someone can help me with this.

EDIT:

Installed readline form source and tried to install like this:

rvm install 1.9.2 -C --enable-shared,--with-readline-dir=/usr/local 

which change anything

the path of the rcltklib.bundle file is:

/usr/local/lib/ruby/1.8/i686-darwin9.7.0/tcltklib.bundle  

It seems that this is a part of the rubyosx installation

A: 

You are setting ARCHFLAGS to two different architectures. Why? Try with only -arch -x86_64 (which as far as I know, is the default in snow leopard).

hgimenez
Thanks for the hint. Copied this line somewhere, but the i386 seems in fact unnecessary. Didn't solve the problem though.
Jonas
OK. For me it "just works" on snow leopard. Next thing to make sure is that you have all the latest and greatest xCode http://developer.apple.com/tools/xcode/
hgimenez
Did that already. No luck.
Jonas
+3  A: 

Now, finally I figured it out.
I did install ruby 1.8.7 from rubyosx and there seemed to be some broken libraries, which rvm used to compile its rubies.

The solution is to remove the rubyosx ruby from /usr/local.

The less drastic solution is to just rename the /usr/local folder during compiling with rvm. Afterwards you can name it back and it works as expected.

Glad it works now.

Jonas
Had this same problem without the changes you made to the .bash_profile...thanks for the post!
Sam