I was trying to install ruby-llvm.
I could install llvm with brew install llvm -shared
, and I also could install ruby-llvm
with sudo gem install ruby-llvm
command.
However, when I tried to run the examples, I got these error messages.
/Users/smcho/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.1.5/lib/ffi/library.rb:121:in `block in ffi_lib':
Could not open library '/DIR/.rvm/gems/ruby-1.9.3-p194/gems/ruby-llvm-3.0.0/lib/libRubyLLVMSupport-3.0.0.dylib':
dlopen(/DIR/.rvm/gems/ruby-1.9.3-p194/gems/ruby-llvm-3.0.0/lib/libRubyLLVMSupport-3.0.0.dylib, 5): no suitable image found. Did find: (LoadError)
/DIR/.rvm/gems/ruby-1.9.3-p194/gems/ruby-llvm-3.0.0/lib/libRubyLLVMSupport-3.0.0.dylib: mach-o, but wrong architecture
I checked that the dynamic library is 64bit.
file /DIR/.rvm/gems/ruby-1.9.3-p194/gems/ruby-llvm-3.0.0/lib/libRubyLLVMSupport-3.0.0.dylib
libRubyLLVMSupport-3.0.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64
And it seems that ruby is running in 32bit mode. ruby 1.9.3p194 (2012-04-20 revision 35410) [i386-darwin11.4.0]
.
How can I resolve this issue? Is there a way to download 32bit version of ruby-llvm
or 64bit version of ruby
?