Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-04-20 03:58:25


On Tuesday 15 April 2008 05:19:32 Jeremy Pack wrote:
> Hi!

Hi Jeremy,

[CC for convenience]

> Getting an error from Boost.Build. Here's the important part:
>
> /Developer/boost/tools/build/v2/build/virtual-target.jam:1002: in
> virtual-target.register-actual-name from module virtual-target
> error: Duplicate name of actual target: <pbin/darwin/debug>c.o
> error: previous virtual target { darwin%darwin.compile.c++-c.o.OBJ {
> c.cpp.CPP } }
> error: created from ./ide_server
> error: another virtual target { darwin%darwin.compile.c++-c.o.OBJ {
> c.cpp.CPP } }
> error: created from ./ide_server
> error: added properties: <python-debugging>off <python>2.5
> <threadapi>pthread
> error: removed properties: none
>
> I've looked up some of the information on problems with duplicate target,
> but still can't see why I'm having a problem. I've attached a test case that
> reproduces the problem.
>
> I've tried to make the test case relatively minimal. Here are some caveats
> about it:
>
> - Boost.Thread is not the problem.
> - If I remove the "install" target, it works.
> - c.cpp is not the problem - it's empty.
> - <link>static is not the problem. I've tried different combinations.
> - The fact that boost_threads is in the sources instead of
> requirements or something makes no difference.
> - Tested on Goobuntu and OS X.
>
> It really seems to be a strange limitation.

I think that in least in 50% of cases, the "duplicate target" error catches
the real problem when Jamfile asks to generate the same file in several ways.

> I've run into it before, but
> figured I'd try to get an answer for it this time. For now, I overcome this
> by writing scripts to manually copy all of my install dependencies. That can
> be a bit of a pain when using as many shared libraries as I am...
>
> For those who hate opening attachments, here's the Jamfile (the rest of the
> files are basically empty).
>
> import os ;
> local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
> exe ide_server
> :
> c.cpp
> $(BOOST_ROOT)libs/thread/build//boost_thread/<link>static ;
> install bin_out : ide_server ;

Does adding <threading>multi to requirements help? That's what should
be done if you are trying to use threads.

I'm not sure about those python-related properties differences -- the error
message I get don't mention them. If the problem persist, can you send me the
output of "bjam --debug-building" as well as you user-config.jam

- Volodya


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