Adventures in 64-bit computing

Emil Lundberg Emil.Lundberg at bmc.uu.se
Sat Mar 29 15:36:53 PDT 2008


Hi all,

Kudos to all who work on this most valuable project. Now, back to  
whining... :-)

Still failing to get 64-bit MacPorts to work properly, I though I'd  
relay my progress so far. The short story is some ports do not compile  
properly as ppc64. Others do, but don't compile properly on x86_64.  
I'm prepared, of course, to notify the individual maintainers of these  
ports, but first I'd like your opinion on whether my general strategy  
is sound.

Note: I've given up the "universal" strategy using MacPorts 1.7  
(trunk) for the time being, as I can't even get '+universal' to work  
on Leopard (see this post: http://lists.macosforge.org/pipermail/macports-dev/2008-March/004704.html) 
. But maybe this is a known issue?


* Case 1: Installing ppc and ppc64 binaries in separate directories

Environment: OS X Server 10.5.2, MacPorts 1.6, Dual G5 PM.
	
- Installing from disk image to /opt/local produces a working MacPorts  
installation. I use this to install 32-bit binaries and libraries.

- Installing a second 1.6 MacPorts from source to /opt/local-64/,  
following the instructions in the MacPorts Guide also works fine,  
configured as follows:
	# ./configure --prefix=/opt/local-64 --with-tclpackage=/Library/Tcl/ 
macports-64

- I then edit /opt/local-64/share/macports/Tcl/port1.0/ 
portconfigure.tcl:
	default configure.m64 yes
	default configure.mtune {"G5"}

- The following ports (prerequisites) now produce ppc64 binaries and  
libraries. Manual compilation of ppc64 binaries depending on these  
libraries also work fine.
	expat, libiconv, gettext (w/ deps), popt

- Trying to install 64-bit "R", I fail on some dependencies:
	"gmp" builds, but needs to be edited as follows:
		configure.env ABI=mode64
	"mpfr" builds.
	"gcc42" (for some reason a library and compiler dependency) I cannot  
get it to to compile on 64-bit. Some stages produce ppc64 object files  
but some ignore the -m64 flag and build ppc object files. Needless to  
say, the linker is not happy.


* Case 2: Installing i386 and x86_64 "universal" binaries.

Environment: OS X 10.5.2, MacPorts 1.6, CoreDuo MBP (32-bit machine, I  
know!)

- Installed MacPorts 1.6 from disk image into /opt/local, then editing  
the following files:
	variants.conf:
		added +universal
	portconfigure.tcl
		set/added "-arch i386 -arch x86_64" in default variables:
			configure.universal_cflags, configure.universal_cxxflags,  
configure.universal_ldflags
	
- Trying to install 64-bit "R", I fail on some dependencies:
	"gmp" builds, but needs to be edited as follows. This is reasonable,  
as this port does not have a universal variant, plus I'm on a 32-bit  
machine:
		configure.cflags-append -m64
	"mpfr" fails in the configure stage: "configure: error: libgmp not  
found or uses a different ABI". I suspect this is due to the configure  
script trying to compile and run a 64-bit code snippet, which of  
course will fail on the CoreDuo. I will try to get my hands on a  
proper x86_64 machine and let you know how it turns out.
	"gcc42" depends on mpfr, so this has not been tested yet.


Any feedback is appreciated. A 64-bit clean MacPorts would (in my  
view) be a significant improvement to an already great tool.

TIA,

/Emil






More information about the macports-users mailing list