compile Boost as static Universal binary lib

Posted by Albert on Stack Overflow See other posts from Stack Overflow or by Albert
Published on 2010-05-13T18:41:59Z Indexed on 2010/05/13 20:24 UTC
Read the original article Hit count: 296

Filed under:
|
|

I want to have a static Universal binary lib of Boost. (Preferable the latest stable version, that is 1.43.0, or newer.)

I found many Google hits with similar problems and possible solutions. However, most of them seems outdated. Also none of them really worked.

Right now, I am trying

sudo ./bjam --toolset=darwin --link=static --threading=multi \
--architecture=combined --address-model=32_64 \
--macosx-version=10.4 --macosx-version-min=10.4 \
install

That compiles and install fine. However, the produced binaries seems broken.

az@ip245 47 (openlierox) %file /usr/local/lib/libboost_signals.a
/usr/local/lib/libboost_signals.a: current ar archive random library

az@ip245 49 (openlierox) %lipo -info  /usr/local/lib/libboost_signals.a
input file /usr/local/lib/libboost_signals.a is not a fat file
Non-fat file: /usr/local/lib/libboost_signals.a is architecture: x86_64

az@ip245 48 (openlierox) %otool -hv /usr/local/lib/libboost_signals.a
Archive : /usr/local/lib/libboost_signals.a
/usr/local/lib/libboost_signals.a(trackable.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3       1536 SUBSECTIONS_VIA_SYMBOLS
/usr/local/lib/libboost_signals.a(connection.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3       1776 SUBSECTIONS_VIA_SYMBOLS
/usr/local/lib/libboost_signals.a(named_slot_map.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3       1856 SUBSECTIONS_VIA_SYMBOLS
/usr/local/lib/libboost_signals.a(signal_base.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3       1776 SUBSECTIONS_VIA_SYMBOLS
/usr/local/lib/libboost_signals.a(slot.o):
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00      OBJECT     3       1616 SUBSECTIONS_VIA_SYMBOLS

Any suggestion how to get that correct?

© Stack Overflow or respective owner

Related posts about boost

Related posts about macosx