Opened 15 years ago

Closed 15 years ago

#20728 closed enhancement (fixed)

When building a port for a set of archs, warn if dependencies don't have at least those archs

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:
Port:

Description

When building a port with the universal variant, MacPorts base should print a warning if any of that port's library or runtime dependencies have a universal variant but the dependency is not installed with that variant.

Most ports would fail to build in this case if their dependencies aren't universal. But in some situations the build might silently succeed, but not be usable. Either way, a concrete error message from MacPorts about the issue would be good, e.g.

Warning: Before building fontconfig with the universal variant, you should build libiconv with the universal variant

Change History (6)

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

Ideally there would be a general check that the arch(s) being built for matches what all the deps were installed with, and we would try to add the needed arch(s) if not present.

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

Milestone: MacPorts Future

Replying to jmr@…:

Ideally there would be a general check that the arch(s) being built for matches what all the deps were installed with,

Ah yes. That would be a better generalization. When building for an arch (or archs), bail if dependencies don't have that arch (those archs). This implies we need a way for ports to store in the registry what archs they were built for.

Need an exception for noarch ports: they should record not the build arch but "noarch". This implies we need a way for ports to indicate they are noarch -- #12206, also #20739.

and we would try to add the needed arch(s) if not present.

I would skip that suggestion for now; it adds more complication, and this is already complicated enough. We can do that later, separately. For now it would be fine to bail with a good error message.

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

Summary: When building +universal, warn if dependencies don't have +universalWhen building a port for a set of archs, warn if dependencies don't have at least those archs

Updating title to reflect that what really matters is the set of architectures, regardless of whether that came about through the universal variant or the build_arch setting.

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

I added a new portgroup in r58377 -- "archcheck" -- that can be used by individual ports to detect and warn about this problem. This is no substitute for a proper solution in base that would automatically check all ports.

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

Milestone: MacPorts FutureMacPorts 1.9.0

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

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.