Opened 15 years ago

Closed 15 years ago

#20739 closed enhancement (fixed)

Allow ports to indicate supported architectures

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.9.0
Component: base Version: 1.7.1
Keywords: Cc: njbutko@…, skymoo (Adam Mercer)
Port:

Description

Ports are assumed to be able to build on all architectures, but not all do. Those ports that don't need a way to indicate what architectures they do support. The muniversal variant has this, but we need it in MacPorts base, and it needs to be available all the time, not just in universal.

For example, wine needs to be able to indicate that it supports the i386 arch only (not x86_64, not ppc or ppc64).

Change History (9)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

See also #12206, #15712.

comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Suggestion: new port keyword "archs". By default, any arch is supported. A port like wine (which only works i386) would write "archs i386". A port like autoconf (which doesn't install any binaries) would write "archs noarch". A port like pango (which currently can't build 64-bit on Tiger) could write "platforms darwin 8 { archs i386 ppc }".

"universal_variant no" should automatically happen if archs contains only one item.

comment:3 Changed 15 years ago by njbutko@…

As a MacPorts user (not developer), I think this is critical. It would have headed off the majority of these Snow Leopard issues before they even started.

By default, I would like to see all dependencies built universally with the maximum amount of available architectures (including arm6/arm7 if applicable). This would allow for maximum flexibility -- if I want to install OpenCV, which links to Carbon and old Quicktime libraries and must be built in 32-bit mode, I still want the dependency libpng to be installed in the most flexible way. That way, later if I want to develop an iphone program that links to graphviz, which links to libpng, I'll be all set.

It's really unfortunate that "port install foo" tries to only compile the default system architecture, and not something appropriate for foo.

comment:4 Changed 15 years ago by njbutko@…

Cc: njbutko@… added

Cc Me!

comment:5 in reply to:  3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to njbutko@…:

As a MacPorts user (not developer), I think this is critical. It would have headed off the majority of these Snow Leopard issues before they even started.

Unfortunately, nobody wrote any code to do this yet.

By default, I would like to see all dependencies built universally with the maximum amount of available architectures (including arm6/arm7 if applicable). This would allow for maximum flexibility -- if I want to install OpenCV, which links to Carbon and old Quicktime libraries and must be built in 32-bit mode, I still want the dependency libpng to be installed in the most flexible way. That way, later if I want to develop an iphone program that links to graphviz, which links to libpng, I'll be all set.

It's really unfortunate that "port install foo" tries to only compile the default system architecture, and not something appropriate for foo.

You can put "+universal" in your variants.conf if you want everything built universal. I suggested yesterday on the mailing list that we should do this by default on Snow Leopard. You can indicate what architectures you want in macports.conf. However, on Snow Leopard there's no point to specifying anything more than i386/x86_64, since Snow Leopard doesn't run on PowerPC.

I would expect nothing but problems by attempting to build ports for arm6, arm7, or any architecture other than i386/x86_64/ppc/ppc64 in MacPorts, so I would recommend not trying that.

comment:6 Changed 15 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:7 Changed 15 years ago by jmroot (Joshua Root)

Option added in r64372.

comment:8 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.9.0

comment:9 Changed 15 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

The default configure.universal_archs and configure.build_arch values take supported_archs into account as of r64945. An explanation about being unable to install a port because a dependency does not support the required archs is also being printed as of r65087.

Note: See TracTickets for help on using tickets.