difficulty cross-compiling on Leopard for Tiger
Zachary Fine
zach at zachfine.com
Thu May 22 12:55:49 PDT 2008
Greetings all,
I'm trying to cross-compile php5, lighttpd, and mysql5 on a MacBook
Pro running OS X 10.5.2, and I plan to transfer the resulting binaries
over to run on my AppleTV box. The AppleTV runs a slimmed-down version
of OS 10.4 Tiger, and seems to run <10.4.8 binaries just fine. Running
'uname -a' on my AppleTV box results in the following output:
Darwin AppleTV.local 8.8.2 Darwin Kernel Version 8.8.2: Mon Jan 29
18:57:29 PST 2007; root:xnu-792.94.18~1/RELEASE_I386 i386 i386
I first tried just copying the lighttpd and php5 that I'd compiled on
my Leopard MacBook Pro over to the AppleTV and running them, but the
binaries are incompatible:
> bash-2.05b$ ./php-cgi
> dyld: unknown required load command 0x8000001C
> Trace/BPT trap
Through a process of research, trial and error, I made the following
adjustments to macports.conf and variants.conf.
I added the following lines to 'macports.conf':
universal_target 10.4
universal_sysroot /Developer/SDKs/MacOSX10.4u.sdk
mmacosx-version-min 10.4
and the following to variants.conf:
+darwin_8 +i386 +universal
I uninstalled all ports, and was able to get my lighttpd and mysql5 to
install (using the command "sudo port install lighttpd +cml +davprops
+mysql5 +ssl") but php refuses to compile:
> [zachmbp:~] zach% sudo port install php5 +fastcgi +imap +macosx
> +mysql5 +pcntl +pear +sqlite +tidy
> Error: Error executing universal: Default universal variant only
> works with ports based on configure
> Error: Unable to execute port: Error evaluating variants
I'm tempted to just give up on my cross-compilation effort, set up
10.4.8 on a partition on a firewire drive, and compile using macports
on that. But it feels like it should be possible to get this working,
and I don't really want to have to keep 10.4.8 around any time I need
to compile something for an older system.
Thanks for any help or information.
-Zach Fine
zach at zachfine.com
More information about the macports-dev
mailing list