Boost logo

Boost :

From: Daniel Lord (daniel_at_[hidden])
Date: 2007-11-12 09:50:39


John, thanks for the tips.
I figured it out and got it to work (partially--only compiles for OS X i386
and not the ppc700 needed for a universal 'fat' binary).

I then discovered there is an another way though a bit less direct--Adobe
has a patch you can get by going to Source Forge and downloading the Adobe
Source Libraries (ASL). It adds options for architecture (fat, i386,
ppc700), SDK version of OS X gong back to 10.2 (which is moot as Leopard
support only 10.5 and 10.4 now), and deployment option like stripping etc.

Is it worth submitting a patch? I'll read up on how to submit a patch and
documentation and then I'll submit. If anyone cares I will, otherwise I'll
just put more detail in the wiki which I just now realized might already
have this answer although Google didn't find it.

In the meantime, here is what I did.
1. to make bjam build for the Intel platform on Intel Macs:

Modify darwin.jam by addling the following lines in the init rule:
flags darwin CFLAGS : -arch i386 -arch ppc ;
flags darwin LINKFLAGS : -arch i386 -arch ppc ;
flags darwin LINKFLAGS <runtime-link>static : -static-libgcc ;
flags darwin CFLAGS <debug-symbols>on : -g ;
flags darwin LINKFLAGS <debug-symbols>on : -g ;

This results in static and dynamic libraries built for the i386 architecture
but not universal binaries because the ar tool cannot build those.

2. So I tried libtool which can build them by again modifying the
darwin.jamfile:
    #ar -c -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"
    libtool -static -dynamic -o "$(<:T)" $(ARFLAGS) "$(>:T)"

But so far, although Boost now build the libraries for the right
architecture, it doesn't build universal binaries which can run on either
architecture, ppc or i386.
I'll keep trying here and there since universal is better than
platform-specific.
But at least Boost is useable on an Intel Mac now. I guess I should
eventually get 64-bit working for both platfroms for a 'quad' universal
binary ;-).

On 11/10/07, John Maddock < john_at_[hidden] > wrote:
>
> Daniel Lord wrote:
> > I already tried the users list for Boost so I am cross-posting this.
> > When I perform an "out-of-the-box" build on my Macbook Pro (Intel
> > dual core) on Leopard (10.5) i get a motley collection of ppc and
> > intel binaries that are useless on my Intel-based system unless I
> > want to use the dynamic libraries only.
>
> Daniel, I don't know anything about Darwin, but if you add -d2 to the bjam
> invocation then it'll print the actual command lines used and give you a
> chance to diagnose what's going on (if you're building via configure/make
> then you'll have to edit the makefile to do this). Actually if you just
> extract the bjam invocation from the makefile and then add the
> options: -d2 -n -a it'll print all the command lines without actually
> building anything.
>
> Also remember that the regex library is "just a bunch of sources", you can
> build it anyway you want using any tool you want (or add the source
> directly
> to your project if you'd rather). The source is in libs/regex/src BTW.
> Most other Boost libraries are the same too.
>
> HTH, John.
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk