Boost logo

Boost-Build :

From: Brad Howes (howes_at_[hidden])
Date: 2006-02-16 13:09:46


With a CVS snapshot of boost.build, I am unable to use the <file> tag
for a lib target. Here's the target declaration:

     lib ACE : : <file>ACE_Wrappers/lib/libACE.dylib ;

When I run bjam, this is what I get:

   Error: ambiguity found when searching for best transformation
   Trying to produce type 'LIB' from:
     - builtin.prebuilt
     - darwin.prebuilt
   First generator produced:
    - { ACE_Wrappers/lib/libACE.dylib.SHARED_LIB }
   Second generator produced:
    - { ACE_Wrappers/lib/libACE.dylib.SHARED_LIB }

Mucking thru darwin.jam, gcc.jam, unix.jam, and generators.jam, I
think the problem is that the generators.override calls in darwin.jam
are not correct (and perhaps gcc.jam as well). Currently, darwin.jam
has:

   generators.override builtin.lib-generator : darwin.prebuilt ;
   generators.override darwin.searched-lib-generator : searched-lib-
generator ;

If I change these to *just* this one line:

   generators.override darwin.prebuilt : builtin.lib-generator ;

then all works just fine. Also, it appears that the link action in
darwin.jam is invoked instead of link.dll for shared libraries, at
least for release builds. The linker fails because the -s option
removes relocation information (I think). The gcc.jam file has a hack
when running on darwin which puts the '-s' flag into ST_OPTIONS,
presumably for static linking, and the link.dll action in darwin.jam
indeed does not use this flag. However, link.dll is not invoked for
shared libraries - the link action is and it does use ST_OPTIONS.
Right now I've simply removed ST_OPTIONS from the link action so I
can create release libraries.

Regards,

Brad

  --
Brad Howes
Desk: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420
MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173



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