Ticket #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@… | 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
comment:2 in reply to: ↑ 1 Changed 4 years ago by ryandesign@…
- Milestone set to 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 4 years ago by ryandesign@…
- Summary changed from When building +universal, warn if dependencies don't have +universal to When 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.


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.