Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-12-01 06:50:14


Vladimir Prus wrote:
>
> lib all-the-sources : .......... : <link>static <parallelism>none ;
> lib your_lib : all-the-sources ;
>
> would work. The idea is that you create auxilliary static lib, which will be
> linked with <parallelism>none (so no duplication of objects), and then your
> top-level link with use it. The top-level link can be built with with real
> and fake mpi.

Clever !!!!

However, the objects inside the 'all-the-sources' library are generated
without '-fPIC'. So it is dangerous to include this library in the
shared library 'your_lib', no ?

Next I modified my Jamfile(see attachment) as you propose above, however
running 'bjam link=static' results in following error (see attachment)

 --------------010208000907020907070202 Content-Type: text/plain;
name="Jamfile"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Jamfile"

import feature : feature ;
feature parallelism : none header fake mpi : composite ;
feature.compose <parallelism>header : <library>/user-config//mpiheaders/<parallelism>none ;
feature.compose <parallelism>mpi : <library>/user-config//libmpi/<parallelism>none ;
feature.compose <parallelism>fake : <library>/home/tk/cvstop/fake_mpi//libfake_mpi/<parallelism>none ;

lib foo_objects : foo.cpp : <link>static <parallelism>header ;
lib libfoo_seq : foo_objects ;

#lib foo_objects : foo.cpp : <parallelism>header ;
#lib libfoo_seq : foo_objects : <parallelism>fake ;
##lib libfoo_mp : foo_objects : <parallelism>mpi ;
 --------------010208000907020907070202 Content-Type: text/plain;
name="error_msg.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="error_msg.txt"

/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:1218: in construct from module object(typed-target)@22
error: unable to construct ./libfoo_seq
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:1082: in object(typed-target)@22.generate from module object(typed-target)@22
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:689: in generate-really from module object(main-target)@2
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:662: in object(main-target)@2.generate from module object(main-target)@2
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:215: in object(project-target)@2.generate from module object(project-target)@2
/home/tk/cvstop/boost/tools/build/v2/build-system.jam:145: in load from module build-system
/home/tk/cvstop/boost/tools/build/v2/kernel/modules.jam:259: in import from module modules
/home/tk/cvstop/boost/tools/build/v2/kernel/bootstrap.jam:120: in boost-build from module
/home/tk/tmp/bjam_test/boost-build.jam:1: in module scope from module

 --------------010208000907020907070202--


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