From: Wade Williams Date: 2011-09-08T05:12:43+09:00 Subject: [ruby-core:39348] [Ruby 1.8 - Bug #5295][Open] Ruby 1.8.7p352 install fails under rvm on OS X 10.6 Issue #5295 has been reported by Wade Williams. ---------------------------------------- Bug #5295: Ruby 1.8.7p352 install fails under rvm on OS X 10.6 http://redmine.ruby-lang.org/issues/5295 Author: Wade Williams Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: 1.8.7p352 Install of 1.8.7 under RVM fails on OS X, 10.6.8. Machine running in 32-bit mode. Problem: The generated Makefile correctly specifies "-arch i386 -arch x86_64" for the CFLAGS and LDFLAGS, but does not specify any architectures for LDSHARED, as evidenced by this line: cc -dynamiclib -undefined suppress -flat_namespace -install_name /Users/wwilliam/.rvm/rubies/ruby-1.8.7-p352/lib/libruby.dylib -current_version 1.8.7 -compatibility_version 1.8 array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o dmyext.o -o libruby.1.8.7.dylib This causes the built dynamic library to contain only the architecture currently in use. The error is caused by line 48 in the generated Makefile: LDSHARED = cc -dynamiclib -undefined suppress -flat_namespace LDSHARED needs to include the architecture flags. Error: ERROR: Error running 'make ', please read /Users/wwilliam/.rvm/log/ruby-1.8.7-p352/make.log ERROR: There has been an error while running make. Halting the installation. making ruby /usr/bin/gcc-4.2 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -fno-common -pipe -fno-common -DRUBY_EXPORT -L. -arch i386 -arch x86_64 -bind_at_load main.o -lruby -ldl -lobjc -o ruby ld: warning: ignoring file ./libruby.dylib, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_ruby_init_stack", referenced from: _main in main.o "_ruby_init", referenced from: _main in main.o "_ruby_options", referenced from: _main in main.o "_ruby_run", referenced from: _main in main.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/rp/rprVpkCiGbKvS3sirOXX9k+++TI/-Tmp-//ccoGzQBh.out (No such file or directory) make[1]: *** [ruby] Error 1 make: *** [all] Error 2 -- http://redmine.ruby-lang.org