compile for x64 on the Mac Pro?

Daniel Llorens del Río daniel.llorens at bluewin.ch
Sun Sep 10 08:30:40 PDT 2006


Hello,

I have MacPorts on my Mac Pro and all the packages that I've  
installed are being compiled in 32-bit mode. For example, I installed  
gcc42 and the result doesn't take -m64. Or, some of my code compiles  
fine with g++-4.0 -m64 but then I can't link with libraries installed  
by MacPorts, because they are 32-bit [the (expected) error is 'ld64  
warning : in xxx, file is not of required architecture', plus lots of  
'Undefined symbols: ...'].

These are exclusively Unix-style/command line applications. I've  
tried compiling some packages on my own and I noticed that  
config.guess reports i686-apple-darwin8.7.3 or i386-apple-darwin8.7.3  
(same as uname, in fact) so that packages just go the 32-bit route.  
In particular, I hacked the config.guess of libgmp to return x86- 
unknown-darwin8.7.3 and it compiled fine, but then failed to compile  
the tests and I gave up.

This isn't covered on the FAQ (that I see), so I thought I'd ask  
here. How can I make MacPorts compile for x64? Even better, is there  
a way to compile and install both versions of the libraries?

Thanks,

	Daniel.



More information about the macports-users mailing list