# \[rubyosx\] can't build extensions as universal binaries

**URL:** <https://www.ruby-forum.com/t/rubyosx-cant-build-extensions-as-universal-binaries/113895>\
**Category:** Ruby\
**Created:** [September 5, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/rubyosx-cant-build-extensions-as-universal-binaries/113895 "2007-09-05T23:44:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![has](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/da6949/32.png) [@has](https://www.ruby-forum.com/u/has)\
**Post date:** [September 5, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/rubyosx-cant-build-extensions-as-universal-binaries/113895/1 "2007-09-05T23:44:51Z")

</div>

Hi all,

I recently installed Ruby 1.8.6 on my PPC and i386 Macs using the Ruby  
One-Click Installer for OSX ([http://rubyosx.rubyforge.org/](http://rubyosx.rubyforge.org/)), replacing  
my previous manually built architecture-specific Ruby 1.8.5  
installations with rubyosx’s universal binary Ruby 1.8.6. However, when  
I try to install appscript ([http://rb-appscript.rubyforge.org](http://rb-appscript.rubyforge.org)),  
appscript’s ae.bundle extension appears to build as i386-only on both  
platforms. Here’s what gcc says on the PPC system:

% make  
gcc -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0  
-I/usr/local/lib/ruby/1.8/universal-darwin8.0 -Isrc -fno-common -g -O2  
-fno-common -pipe -fno-common -Wall -arch i386 -c src/rbae.c  
gcc -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0  
-I/usr/local/lib/ruby/1.8/universal-darwin8.0 -Isrc -fno-common -g -O2  
-fno-common -pipe -fno-common -Wall -arch i386 -c src/SendThreadSafe.c  
cc -dynamic -bundle -undefined suppress -flat\_namespace -framework  
Carbon -arch i386 -L"/usr/local/lib" -o ae.bundle rbae.o  
SendThreadSafe.o -lruby -lpthread -ldl -lobjc  
/usr/bin/ld: warning /System/Library/Frameworks/Carbon.framework/Carbon  
cputype (18, architecture ppc) does not match cputype (7) for specified  
-arch flag: i386 (file not loaded)  
/usr/bin/ld: warning fat file:  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libpthread.dylib does not  
contain an architecture that matches the specified -arch flag: i386  
(file ignored)  
/usr/bin/ld: warning fat file:  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libdl.dylib does not  
contain an architecture that matches the specified -arch flag: i386  
(file ignored)  
/usr/bin/ld: warning  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libobjc.dylib cputype  
(18, architecture ppc) does not match cputype (7) for specified -arch  
flag: i386 (file not loaded)  
/usr/bin/ld: warning fat file:  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libSystem.dylib does not  
contain an architecture that matches the specified -arch flag: i386  
(file ignored)  
/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not  
contain an architecture that matches the specified -arch flag: i386  
(file ignored)

On i386 it seems to build and work ok (though it’s not universal, as I  
say), although I do get the following warning:

has% make  
gcc -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0  
-I/usr/local/lib/ruby/1.8/universal-darwin8.0 -Isrc -fno-common -g -O2  
-fno-common -pipe -fno-common -Wall -arch i386 -c src/rbae.c  
gcc -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0  
-I/usr/local/lib/ruby/1.8/universal-darwin8.0 -Isrc -fno-common -g -O2  
-fno-common -pipe -fno-common -Wall -arch i386 -c src/SendThreadSafe.c  
cc -dynamic -bundle -undefined suppress -flat\_namespace -framework  
Carbon -arch i386 -L"/usr/local/lib" -o ae.bundle rbae.o  
SendThreadSafe.o -lruby -lpthread -ldl -lobjc  
/usr/bin/ld: warning multiple definitions of symbol \_setregid  
/usr/local/lib/libruby.dylib(process.o) definition of \_setregid  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libpthread.dylib(setregid.So)  
definition of \_setregid  
/usr/bin/ld: warning multiple definitions of symbol \_setreuid  
/usr/local/lib/libruby.dylib(process.o) definition of \_setreuid  
/usr/lib/gcc/i686-apple-darwin8/4.0.1/…/…/…/libpthread.dylib(setreuid.So)  
definition of \_setreuid

I’d really appreciate any advice or suggestions anyone might have. As  
you can imagine, it’s a tad embarrassing not being able to use my own  
software on my own machines :p, although at this point I don’t know if  
the problem lies with appscript, rubyosx, or some combination of the  
two.

Many thanks,

## has

[http://appscript.sourceforge.net](http://appscript.sourceforge.net)  
[http://rb-appscript.rubyforge.org](http://rb-appscript.rubyforge.org)
