Prev: C Extension rb_block_call Weirdness
Next: instructor solution manual for Cost Accounting-A Managerial Emphasis 13th Ed by Charles Horngren
From: Mr zengr on 10 Jul 2010 07:00 Hello, I have downloaded ruby-1.9.2-rc1.tar.gz from here: ftp://ftp.ruby-lang.org/pub/ruby/ I am trying to build it on 64bit mac osx, 10.6 in 32 bit kernel mode. (uname -m gives i386) I do the following: 1. ./configure --with-arch=x86_64,i386 ---> a universal build 2. Make ---> gives error .................. ld: warning: in utf_8.o, file was built for i386 which is not the architecture being linked (x86_64) ld: warning: in newline.o, file was built for i386 which is not the architecture being linked (x86_64) Undefined symbols: "_main", referenced from: start in crt1.10.6.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [miniruby] Error 1 Any idea why? Thanks Reference: http://stackoverflow.com/questions/3137840/how-to-manually-build-a-universal-ruby-on-mac-os-x-how-about-with-rvm -- Posted via http://www.ruby-forum.com/.
From: Jason Roelofs on 10 Jul 2010 11:11
It's because the step that builds libruby.dylib doesn't care about your -arch flag settings. I use this patch: http://github.com/jameskilton/rvm/blob/7753bcc7c3b6da8d61900efb41f538824b0dc3c0/patches/ruby/1.8.7/osx-arch-fix.patch to allow me to specify what architecture to built. If this works for a universal binary I'd love to know, but last I checked I could still only build for a single arch. Jason On Jul 10, 2010, at 7:00 AM, Mr zengr wrote: > Hello, > I have downloaded ruby-1.9.2-rc1.tar.gz from here: > ftp://ftp.ruby-lang.org/pub/ruby/ > > > I am trying to build it on 64bit mac osx, 10.6 in 32 bit kernel mode. > (uname -m gives i386) > > I do the following: > > 1. ./configure --with-arch=x86_64,i386 ---> a universal build > 2. Make ---> gives error > > .................. > ld: warning: in utf_8.o, file was built for i386 which is not the > architecture being linked (x86_64) > ld: warning: in newline.o, file was built for i386 which is not the > architecture being linked (x86_64) > Undefined symbols: > "_main", referenced from: > start in crt1.10.6.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > make: *** [miniruby] Error 1 > > Any idea why? > > Thanks > > > Reference: > http://stackoverflow.com/questions/3137840/how-to-manually-build-a-universal-ruby-on-mac-os-x-how-about-with-rvm > -- > Posted via http://www.ruby-forum.com/. > |