I recently upgrated to Snow Leopard and (in order to avoid a lot of problems) I'm running it on 32-bits mode. In spite of this, as almost all SL native applications are 64-bits, it seems to run on a kind of mixed mode (64-bit applications running in parallel with 32-bit apps).

But my problem is with MacPorts. As I'm running the Snow Leopard, I think it is compiling all ports to 64-bits versions. It would be fine, if I haven't had to install some Ruby Gems, that uses the libraries to compile native extensions. All the problems occur because Apple decided to ship Snow Leopard with a 32-bit version of ruby.

This way, when I try to install Cairo, for instance, MacPorts installs the 64-bit version, but when Ruby Gems tries to compile the native extensions for RCairo gem (the Cairo binding for Ruby), I naturally get an error. So, is there any way to install 32-bit versions of MacPorts ports on Snow Leopard? And BTW, how can I find out if some port is 32- or 64-bit?

PS: Please, don't tell me to install the 64-bit port of Ruby. I have many gems installed and would not like to reinstall them all (especially with this 32/64-bit headache).


You should edit your macports.conf file (in /opt/local/etc/macports/). Activate the build_arch line, setting it to:

build_arch i386

This will force i386 (32-bit) builds rather than the default for your architecture, which is x86_64 (64-bit).

| improve this answer | |
  • Yes, I tried that, but still did not work. I was wrong: the Ruby version that comes with Snow Leopard is in fact 64 bits. Installed all in 64-mode worked. Thanks for your reply. – Lailson Bandeira Nov 17 '09 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.