Ticket #23091 (closed defect: fixed)
InsightToolkit +universal is not universal
| Reported by: | ryandesign@… | Owned by: | dweber@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.1 |
| Keywords: | Cc: | ||
| Port: | InsightToolkit |
Description
Building InsightToolkit with the +universal variant on Snow Leopard with universal_archs set for x86_64 i386, I only get files compiled for x86_64. Please either fix the universal variant or disable it.
$ port provides /opt/local/lib/InsightToolkit-3.16/libITKCommon.dylib /opt/local/lib/InsightToolkit-3.16/libITKCommon.dylib is provided by: InsightToolkit
$ port installed InsightToolkit The following ports are currently installed: InsightToolkit @3.16.0_1+doc+py25+shared+universal+wrap (active)
$ lipo -info /opt/local/lib/InsightToolkit-3.16/libITKCommon.dylib Non-fat file: /opt/local/lib/InsightToolkit-3.16/libITKCommon.dylib is architecture: x86_64
Change History
comment:1 follow-up: ↓ 2 Changed 3 years ago by dweber@…
- Status changed from new to closed
- Resolution set to wontfix
comment:2 in reply to: ↑ 1 Changed 3 years ago by ryandesign@…
- Status changed from closed to reopened
- Resolution wontfix deleted
Replying to dweber@…:
Perhaps this ticket should be targeted elsewhere?
No, it should not. MacPorts defines a default universal variant that works for many ports. For those like insightToolkit where it does not, the individual port should override it and make it work. Or, if that's not possible, the port should disable the universal variant.
comment:3 follow-up: ↓ 4 Changed 3 years ago by dweber@…
I wonder what it is about the universal variant that does not work with InsightToolkit. Is it that InsightToolkit is using cmake for the build and the universal variant does not set the right options for cmake (or cmake does not accommodate a universal build)?
Are there specific examples of other ports where the universal variant does not work and they override it to get it working?
comment:4 in reply to: ↑ 3 Changed 3 years ago by ryandesign@…
Replying to dweber@…:
I wonder what it is about the universal variant that does not work with InsightToolkit. Is it that InsightToolkit is using cmake for the build and the universal variant does not set the right options for cmake (or cmake does not accommodate a universal build)?
Absolutely. The default universal variant is designed for software that uses autotools-type configure scripts. For software that uses cmake, we have the cmake portgroup which takes care of the differences in the cmake build system and includes its own universal variant.
Are there specific examples of other ports where the universal variant does not work and they override it to get it working?
Sure, lots. You can grep the dports directory for "variant universal" to see many of them. But I'd try using the cmake portgroup first as it may "just work".
comment:5 Changed 3 years ago by jmr@…
If it's too hard to get universal working, all you need to do to fulfil Ryan's request is add universal_variant no.


$ port variants InsightToolkit InsightToolkit has the variants: brainweb: provide ITK BrainWeb data in /opt/local/share/InsightToolkit-3.16/data [+]doc: provide doxygen documentation in /opt/local/share/InsightToolkit-3.16/doc examples: provide ITK examples in /opt/local/share/InsightToolkit-3.16/examples py24: python 2.4 wrapper (includes wrap) * conflicts with py25 * requires wrap [+]py25: python 2.5 wrapper (includes wrap) * conflicts with py24 * requires wrap shared: build shared libraries testing: provide ITK testing in /opt/local/share/InsightToolkit-3.16/testing universal: Build for multiple architectures wrap: USE_WRAP_ITK for external language support (includes shared) * requires sharedSo, you see, there is no explicit definition for the universal variant in the Portfile for the InsightToolkit port. This variant is defined by the port system. Perhaps this ticket should be targeted elsewhere?
Take care, Darren