Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question
up vote 6 down vote accepted

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).

share|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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .