Stumbled right now. This is the error I keep getting (I have recently upgraded my OSX from Leopard to Snow Leopard):
redacted's Mac[~]$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/redacted/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/redacted/.rvm/src
Configuring yaml in /Users/redacted/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/redacted/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/redacted/.rvm/usr
Installing Ruby from source to: /Users/redacted/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/redacted/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 - #configuring
ruby-1.9.3-p125 - #compiling
Error running 'make ', please read /Users/redacted/.rvm/log/ruby-1.9.3-p125/make.log
There has been an error while running make. Halting the installation.
Looking into the log, there is this:
ld: in /usr/local/lib/libxml2.2.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Googled and also searched this site, followed some recommendations including:
1) updating XCode to 3.2.6 (I am on Snow Leopard). This is not the same version as the Xcode on install DVD.
2) completely removing all traces of MacPorts (per procedures here http://www.libertypages.com/clarktech/?p=743), including deleting /opt/local where my MacPort stuff were previously
3) Completely removing all traces of RVM (per procedures here How can I remove RVM (Ruby Version Manager) from my system?)
4) Installing MacPorts for Snow Leopard, and running sudo port -v selfupdate
5) sudo port install libxml2 libxslt (I confirm that it appears to be using x86_64 architecture - here's what it looked like for libxml2:
---> Computing dependencies for libxml2
---> Dependencies to be installed: zlib
---> Fetching archive for zlib
---> Attempting to fetch zlib-1.2.6_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/zlib
---> Attempting to fetch zlib-1.2.6_0.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/zlib
---> Installing zlib @1.2.6_0
---> Activating zlib @1.2.6_0
---> Cleaning zlib
---> Fetching archive for libxml2
---> Attempting to fetch libxml2-2.7.8_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/libxml2
---> Attempting to fetch libxml2-2.7.8_0.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/libxml2
---> Installing libxml2 @2.7.8_0
---> Activating libxml2 @2.7.8_0
---> Cleaning libxml2
6) installing RVM
7) At this point, my library files, RVM, MacPorts, XCode seem to be the latest and correct architecture
8) rvm install 1.8.7 was successful
9) rvm install 1.9.2 and 1.9.3 fails, with the error messages shown at beginning of this question.
Any ideas what I've missed? I noticed this while poking around trying various things from reading articles:
file /usr/local/lib/libxml2.2.dylib
/usr/local/lib/libxml2.2.dylib: Mach-O dynamically linked shared library i386
Not sure if this is significant.. Odd that it still thinks libxml2 is i386 when MacPorts seem to have installed the x86_64 version.
-> edit about 21 mins after I posted this - actually, I'm seeing the macport file as 64 bit I believe, so is it possible the library file path is set up wrong while rvm tries to install 1.9.2/1.9.3? (see below)
file /opt/local/lib/libxml2.2.dylib
/opt/local/lib/libxml2.2.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Here's my PATH:
redacted's Mac[~]$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Users/redacted/.rvm/bin
rvm info:
system:
system:
uname: "Darwin redacted-macbook-pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]"
updated: "3 hours 26 minutes 47 seconds ago"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/local/bin/ruby"
irb: "/usr/local/bin/irb"
gem: "/usr/local/bin/gem"
rake: "/usr/local/bin/rake"
environment:
PATH: "/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Users/redacted/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
No idea how to proceed at this point; I've basically uninstalled and reinstalled everything twice to no avail.
-> edit: adding this for steve
[2012-02-24 22:54:41] make
CC = /usr/bin/gcc-4.2
LD = ld
LDSHARED = /usr/bin/gcc-4.2 -dynamiclib
CFLAGS = -O3 -ggdb -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 -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/craigflannagan/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
linking miniruby
rbconfig.rb unchanged
generating enc.mk
generating prelude.c
compiling prelude.c
linking static-library libruby.1.9.1-static.a
linking shared-library libruby.1.9.1.dylib
generating encdb.h
encdb.h unchanged
making enc
make[1]: Nothing to be done for `enc'.
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
making trans
make[1]: Nothing to be done for `./enc/trans'.
making encs
installing default bug libraries
installing default resize libraries
installing default bug libraries
installing default bug libraries
installing default funcall libraries
installing default dot.dot libraries
installing default old_thread_select libraries
installing default numhash libraries
installing default string libraries
installing default wait_for_single_fd libraries
installing default bigdecimal libraries
installing default continuation libraries
installing default coverage libraries
installing default curses libraries
installing default date_core libraries
make[2]: Nothing to be done for `all'.
installing digest libraries
installing default digest libraries
installing default bubblebabble libraries
installing default md5 libraries
installing default rmd160 libraries
installing default sha1 libraries
installing default sha2 libraries
installing dl libraries
installing default dl libraries
installing default callback libraries
make[2]: Nothing to be done for `all'.
installing default etc libraries
installing default fcntl libraries
installing default fiber libraries
installing default fiddle libraries
make[2]: Nothing to be done for `all'.
installing default iconv libraries
installing default console libraries
installing default nonblock libraries
installing default wait libraries
installing default libraries
installing default generator libraries
installing default parser libraries
installing default complex libraries
installing default rational libraries
installing default nkf libraries
installing default objspace libraries
installing default openssl libraries
installing default pathname libraries
installing default psych libraries
installing default pty libraries
installing default cparse libraries
installing default readline libraries
installing default ripper libraries
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
installing default sdbm libraries
installing default socket libraries
installing default stringio libraries
installing default strscan libraries
installing default syck libraries
installing default syslog libraries
linking shared-object tcltklib.bundle
ld: in /usr/local/lib/libxml2.2.dylib, file was built for i386 which is not the architecture being linked (x86_64)
collect2: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-darwin10.8.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2