Boost logo

Boost-Build :

From: Alo Sarv (alo.sarv_at_[hidden])
Date: 2005-08-05 19:01:53


Hi

As I see from the list archive, this topic has been raised before, but
only partially. The thread dated 27March 2005 (also on 27/12/2004)
mentioned bundles in the sense of specific directory structure,
so-called installation package. There is extensive documentation about
these bundles here:
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html

Frankly, I'm not sure if this falls in the scope of BB - afterall, BB
doesn't generate tarballs or zip / exe installers either for other
platforms, and this is no different. Is packaging a part of BB's job,
or is it strictly oriented at building and installing software?

The second place, however, where this keyword is used, is plugins. The
documentation is found here:
http://developer.apple.com/technotes/tn2002/tn2071.html#Section6
http://www.metapkg.org/wiki/12

As one can see, Darwin handles "loadable libraries" differently from
standard "shared libraries". You cannot dlopen/dlsym a normal .dylib
(e.g. the one linked with -dynamiclib). Instead, you must link your
plugins with -bundle flag. Such bundles have the standard extension of
.bundle, and can be loaded on runtime (but cannot be linked against,
to the best of my knowledge).

Now, there are a number of problems with such bundles ("plugins" from
here on, to avoid confusion) - namely, symbols resolution. For Mac OS
10.3 and later (MACOSX_DEPLOYMENT_TARGET environment variable must be
set to 10.3 or higher), you can use "-bundle -undefined
dynamic_lookup" combination. If you want your plugins to be usable on
older versions, you must use either -bundle_loader <exefile>, or
"-flat_namespace -undefined suppress" (not recommended).

BBv1 seems to support -bundle flag, but that's about it. BBv2 should,
IMHO, support at least "-bundle -undefined dynamic_lookup" flags.
Which brings us to the question - how is the best way to implement it
into BBv2?

I have access to a Mac box, so if someone can give me some pointers on
how to implement it into BBv2, I'd be happy to write, test, and submit
a patch on it.

Alo Sarv

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk