Ticket #29611 (closed defect: invalid)
multiple ports: mach-o, but wrong architecture
| Reported by: | eklypse@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | jwa@… | |
| Port: | pkgconfig wine |
Description (last modified by jmr@…) (diff)
I installed wine some time ago and it's worked before, but most recently it didn't, so I thought I would try to reinstall it. That failed, so I thought I might reinstall MacPorts (since it's been a while and maybe things are out of date). So I tried again and got the following:
---> Configuring pkgconfig Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details) Log for pkgconfig is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/main.log Error: Unable to upgrade port: 1 Error: Unable to execute port: upgrade pkgconfig failed
I tried wine anyway (just to see) and got the following:
dyld: Library not loaded: /opt/local/lib/libz.1.dylib Referenced from: /opt/local/libexec/wine/wine Reason: no suitable image found. Did find: /opt/local/lib/libz.1.dylib: mach-o, but wrong architecture /opt/local/lib/libz.1.dylib: mach-o, but wrong architecture /opt/local/bin/wine: line 5: 87992 Trace/BPT trap DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib" "/opt/local/libexec/wine/wine" "$@"
Attachments
Change History
comment:1 Changed 2 years ago by jmr@…
- Owner changed from macports-tickets@… to ryandesign@…
- Cc jwa@… added
- Port set to pkgconfig wine
- Keywords wine removed
- Description modified (diff)
Please remember to preview and use WikiFormatting, fill in the Port field, and cc the maintainer.
This is two different problems with different ports that should really be reported separately, but they do happen to share a maintainer in this case so I'll just assign to him.
comment:2 Changed 2 years ago by ryandesign@…
There are multiple ports involved, but there appears to be a common cause.
When configuring pkgconfig, it ran into problems running gsed:
checking for a sed that does not truncate output... ./configure: line 3952: 86407 Trace/BPT trap "$ac_path_SED" -f conftest.sed < "conftest.nl" > "conftest.out" 2> /dev/null
It doesn't say why, but then it has problems running gawk because libintl (from the gettext port) was not the right architecture, and we can assume that's also the reason gsed couldn't run, as it also depends on gettext.
dyld: Library not loaded: /opt/local/lib/libintl.8.dylib Referenced from: /opt/local/bin/gawk Reason: no suitable image found. Did find: /opt/local/lib/libintl.8.dylib: mach-o, but wrong architecture
When running wine, it cannot use libz (from the zlib port) because it is not the right architecture:
dyld: Library not loaded: /opt/local/lib/libz.1.dylib Referenced from: /opt/local/libexec/wine/wine Reason: no suitable image found. Did find: /opt/local/lib/libz.1.dylib: mach-o, but wrong architecture
All of this suggests that some of your MacPorts libraries have been replaced with ones that are not the right architecture. One way this can happen is if you install third-party software, not using MacPorts, whose installer was itself built using MacPorts configured for its default prefix, and built for a different architecture than the one you're now using. Read ProblemHotlist for more on this problem, and the solution, which is unfortunately to uninstall MacPorts and all ports and start over, and do not install such third-party software outside of MacPorts in the future, if it is available in MacPorts.
Another reason for architecture mismatches is if you upgrade Mac OS X (typically, upgrade from Leopard or earlier to Snow Leopard or later) or switch to a new Mac (from a PowerPC Mac to an Intel Mac, or from a 32-bit Intel Mac to a 64-bit Intel Mac) and use Migration Assistant to migrate your data (including MacPorts) to the new machine. This is discussed further in Migration along with an automated port reinstallation script you might find helpful.

