Opened 12 years ago

Closed 12 years ago

#34744 closed defect (worksforme)

glib2: libxml2.2.dylib, file was built for i386 which is not the architecture being linked (ppc)

Reported by: macnwhite@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: tiger Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: glib2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Mac OS X 10.4.11
Xcode 2.5

Submitted build error information to the macports-users-mailing-list. Long story-short, they advised me to open a ticket.

Attached is main.log

Attachments (1)

main.log.zip (14.6 KB) - added by macnwhite@… 12 years ago.
org-server build-error main-log

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by macnwhite@…

Attachment: main.log.zip added

org-server build-error main-log

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: tiger added; xorg-server removed
Owner: changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: newclosed

1.8.1 is ancient...

sudo port selfupdate

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Also, your log has nothing to do with xorg-server:

:info:build ld: in /opt/local/lib/libxml2.2.dylib, file was built for i386 which is not the architecture being linked (ppc)
:info:build /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
:info:build lipo: can't figure out the architecture type of: /var/tmp//ccOmwzaH.out
:info:build make[4]: *** [libglib-2.0.la] Error 1
:info:build make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_glib2/glib2/work/glib-2.32.3/glib'

glib is failing to build because of an architecture mismatch. It looks like you tried building some ports for ppc and others for i386...

comment:4 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Port: xorg-server removed

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Port: glib2 added
Resolution: worksforme
Status: closedreopened
Summary: xorg-server @1.8.1_1 build Failedglib2: libxml2.2.dylib, file was built for i386 which is not the architecture being linked (ppc)

Jeremy, the error Daniel wrote to the mailing list about was about xorg-server; that's not what he ended up filing this ticket about however.

It looks like Daniel is trying to build glib2 universal, and glib2 is using libxml2, and libxml2 is not installed universal. However it is a surprise to me that glib2 is using libxml2 at all. You added a dependency on libxml2 to glib2 in r93908 but I still can't find evidence that glib2 is using libxml2, and Joshua said the same on the mailing list. I've grepped the glib2 sources for "libxml" and "lxml" and the only mention of libxml2 is in reference to Windows. I've grepped the main.log for "xml". I've used "otool -L" on everything in the work directory and nothing links with libxml2. So I am inclined to agree with Joshua and revert r93908.

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… added
Owner: changed from jeremyhu@… to ryandesign@…
Status: reopenednew

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

Done in r95596.

Daniel, that leaves us at a loss to explain the build failure you encountered. However, the workaround is to either clean glib2 and build it non-universal, or if you really want to build it universal, then install libxml2 universal first.

When upgrading from such an old MacPorts version you're bound to run into other problems as well. It may save you time to uninstall all ports, then reinstall the ports you actually want. This will ensure you don't have any remaining ports installed that were originally built with that old MacPorts version.

In the future, keep your MacPorts installation up to date to minimize problems. Run "sudo port selfupdate" and "sudo port upgrade outdated" regularly—at least yearly, hopefully much more frequently. However, note that Tiger is a very old OS X version and is not well supported anymore. Consider upgrading to a newer version of OS X if possible. According to your log, you are on an Intel Mac, and all Intel Macs can be upgraded to at least Snow Leopard.

Note: See TracTickets for help on using tickets.