MacPorts recorded graphviz-oldgui was installed with arch i386 but it actually installed arch ppc

Joshua Root jmr at macports.org
Sat Jun 12 13:38:23 PDT 2010


On 2010-6-13 05:33 , Ryan Schmidt wrote:
> On Jun 12, 2010, at 13:54, Joshua Root wrote:
>> On 2010-6-13 04:34 , Ryan Schmidt wrote:
>>> graphviz-oldgui installs a pre-compiled binary; source is not available. The binary is ppc-only so in r68725 I added "supported_archs ppc". I was surprised then to see that on my Snow Leopard Mac MacPorts recorded in the registry that this port was installed with the arch i386:
>>>
>>> $ port -v installed graphviz-oldgui
>>> The following ports are currently installed:
>>>  graphviz-oldgui @16_0 (active) platform='darwin 10' archs='i386'
>>>
>>> I had expected to see "archs='ppc'" not "archs='i386'".
>>>
>>> I filed this as #25219 but Joshua closed it as invalid, saying I should write "configure.build_arch ppc".
>>>
>>> I don't understand why the value MacPorts automatically set configure.build_arch to was not one of the archs supported by the port nor why this is not considered a bug.
>>
>> If the user has configured i386 in macports.conf, why should they get
>> ppc? You are making unfounded assumptions about the value of
>> configure.build_arch; try printing it. If there's a bug, it's that we
>> don't error out when the chosen build arch is unsupported.
> 
> The user has not configured i386 in macports.conf; he has configured x86_64. But neither x86_64 nor i386 are available for this port; only ppc is, as indicated in supported_archs.

Well either way, it's an unsupported arch, so configure.build_arch is empty.

> My understanding was that the supported_archs option was supposed to make unnecessary manual setting of configure.build_arch. For example, to force a 32-bit build we used to write:

No, it's meant to indicate what archs the port supports.

> if {$build_arch == "x86_64"} {
>     configure.build_arch i386
> } elseif {$build_arch == "ppc64"} {
>     configure.build_arch ppc
> }
> 
> And now we can replace that with:
> 
> supported_archs ppc i386

I might come to regret putting in that side effect if it causes
confusion like this. Those happen to be the only cases in which changing
the arch will (almost) always work.

> MacPorts knows about acceptable fallback architectures in case the one the user requested in macports.conf is not available. For example it correctly knows that i386 is a fallback for x86_64 and that ppc is a fallback for ppc64. I would say it just needs to be taught that ppc is a fallback for i386 and then everything's happy, no?

If you know it's safe to override the build arch, you can do that.
That's by no means always the case.

- Josh


More information about the macports-dev mailing list