Discussion:
build_arch
Scott Haneda
2009-09-30 19:18:03 UTC
Permalink
I do not see build_arch in macports.conf
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?

I would like to default to ppc64, if that does not work, how do I tell
MP to go back to the usual way?
--
Scott * If you contact me off list replace talklists@ with scott@ *
Scott Haneda
2009-09-30 19:28:09 UTC
Permalink
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?

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?
--
Post by Scott Haneda
I do not see build_arch in macports.conf
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?
I would like to default to ppc64, if that does not work, how do I
tell MP to go back to the usual way?
Ryan Schmidt
2009-09-30 21:22:47 UTC
Permalink
Post by Scott Haneda
Post by Scott Haneda
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.
Post by Scott Haneda
Post by Scott Haneda
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.
Post by Scott Haneda
Post by Scott Haneda
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).
Post by Scott Haneda
Post by Scott Haneda
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.
Post by Scott Haneda
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.
Post by Scott Haneda
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
Joshua Root
2009-09-30 21:31:43 UTC
Permalink
Post by Scott Haneda
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 choose which ports will build universal with the variant. Check
`port variants php5`. Note that universal_archs does not include ppc64
unless you edit macports.conf. Also note that all dependencies of a port
installed with +universal must also be +universal.
Post by Scott Haneda
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?
Sounds like you want something like
`sudo port upgrade --enforce-variants php5 +universal`.

- Josh

Joshua Root
2009-09-30 21:27:55 UTC
Permalink
Post by Scott Haneda
I do not see build_arch in macports.conf
It was added in 1.8.0, and we don't change pre-existing config files.
You can diff against macports.conf.default to see what's new/changed.
Post by Scott Haneda
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 usual behaviour will be to build for $build_arch, which defaults to
ppc on all PowerPC machines. If you select the universal variant (which
not all ports have), then the port will be built for $universal_archs
instead.
Post by Scott Haneda
I would like to default to ppc64, if that does not work, how do I tell
MP to go back to the usual way?
You should really only change build_arch when nothing is installed,
since dependencies have to have the arch(s) used by their dependents. If
you want to change it again later, you should uninstall all ports first
(or at least all those that are not installed with +universal).

- Josh
Continue reading on narkive:
Loading...