build_arch
Ryan Schmidt
ryandesign at macports.org
Wed Sep 30 14:22:47 PDT 2009
On Sep 30, 2009, at 14:28, Scott Haneda wrote:
> On Sep 30, 2009, at 12:18 PM, Scott Haneda wrote:
>
>> I do not see build_arch in macports.conf
That option was added to macports.conf in 1.8.0. If you originally
installed MacPorts before that version, your conf will not have that
value. You can compare your macports.conf with the
macports.conf.default in the same directory to see what other changes
have occurred which you might want to merge into your conf file.
MacPorts does not update your conf file for you.
>> I am trying to go all 64 on a PowerMac Dual PPC G5
>>
>> If I set universal_archs to ppc ppc64 does that means that default
>> will build ppc, and a flag will tell it to be ppc64?
The compiler default build arch is ppc on PowerPC Macs, with 10.4 and
less, ppc7400 on PowerPC Macs with 10.5, i386 on Intel Macs with 10.5
and less, and x86_64 on 10.6.
The build_arch setting in MacPorts defaults to ppc or i386 on 10.5 and
less and x86_64 on 10.6.
You can change the build_arch setting, but if you want to build one
port with a particular arch, all its library and runtime dependencies
must have the same arch, and MacPorts does not check this for you. I
just created the archcheck portgroup a few days ago, to alert users
who try to install ports with one arch when their dependencies are not
built with that arch, as a crutch to get us through this situation
until MacPorts base does these checks, but individual ports would have
to be updated to use the archcheck portgroup for this to be of any
use. So far I have only updated a handful of my ports to do this, so
you must be alert for this yourself.
>> I would like to default to ppc64,
You can set build_arch to ppc64. It would then probably be best to
uninstall all ports and reinstall them. Note that not all ports
support changing the build_arch. In particular all those specifying
"use_configure no" will have to have their portfiles specially altered
to allow this (just as they have to be specially altered to support a
universal build).
>> if that does not work, how do I tell MP to go back to the usual way?
To go back, you would set build_arch back to ppc, and again uninstall
and reinstall all ports.
> Also, if I do not want to edit the conf file, is there a way for me
> to just hand pick which will get 64 bit? Can I simply sudo port
> install php5 +universal? Or are most ports not ready for that type
> of variant?
You can compile individual ports universal if you want. You could set
universal_archs to ppc ppc64 to get 32-bit/64-bit PowerPC builds.
Again, any dependencies of the port you're installing that way need to
be built the same way. ppc/ppc64 universal builds have never been the
default for any version of MacPorts so you may encounter ports that
don't work that way.
> If I have php as a 32 bit now, and would like to just rebuild that
> one and maintain all my configs and settings, but have it be 64 bit,
> what is the procedure?
sudo port upgrade --enforce-variants php5 +universal
will rebuild php5 and all its dependencies with the universal variant.
Set universal_archs first.
If instead of universal you really want only 64-bit, then you'll
change build_conf and force a rebuild.
sudo port upgrade --force php5
More information about the macports-users
mailing list