#58 Archives created on Mac lack architecture specification
Closed 10 months ago by RJVB. Opened 10 months ago by RJVB.

This is a bit of an icing-on-the-cake issue, but here goes:

One of the quirks with building on Mac is that you often end up building binaries for multiple architectures, so-called fat binaries. Initially introduced during the PowerPC-to-Intel transition it was then used to create binaries that could run on 32bit and 64bit hosts and is still being used to create x864+aarch64 binaries.

The simple way is to pass all desired architectures to the compiler and linker drivers but more complex cross-platform projects often require doing separate builds and then merging them using the lipo command.

That's what I do with my dbus build already referenced in issues #55 and #57 :

/usr/bin/lipo -create "dbus-mp9-work/destroot-i386/opt/local/lib/libdbus-1.a" "dbus-mp9-work/destroot-x86_64/opt/local/lib/libdbus-1.a" -output "dbus-mp9-work/destroot-intel/opt/local/lib/libdbus-1.a"fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: archive with no architecture specification: dbus-mp9-work/destroot-i386/opt/local/lib/libdbus-1.a (can't determine architecture for it)

The icing on the cake aspect comes from the fact that newer versions of lipo than the one that comes with my system can handle the merged through slibtool. What would you need if you want to have a look anyway?


The icing on the cake aspect comes from the fact that newer versions of lipo than the one that comes with my system can handle the merged through slibtool. What would you need if you want to have a look anyway?

Happy to take a look. Can you upload all .a archives that you're trying to merge?

OOps, sorry, this was a false alarm. The problem existed (and had nothing to do with slibtool) but my "meta build system" usually worked around it. Sorry for the noise!

Metadata Update from @RJVB:
- Issue status updated to: Closed (was: Open)

10 months ago

That was easy, thanks for the update!

Login to comment on this ticket.

Metadata