Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost-build Digest, Vol 49, Issue 27
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-09-30 02:35:58


[Please don't reply to digests. It kinda makes the subject unclear.]

Answers below.

Jim Gallagher wrote:
> Johan,
>
> I'm fine with "alias stage ;". That makes sense.

Ok.

>
> So now I have a different issue. I have situations like this, where I
> would like to stage a given lib to both a client and a server staging
> area:
>
> lib a : a.c ;
> lib b : b.c ;
> lib c : c.c ;
>
> install stage-client
>> a c
>> <location>$(STAGE_CLIENT)
> ;
>
> install stage-server
>> b c
>> <location>$(STAGE_SERVER)
> ;
>
> explicit stage stage-client stage-server ;
> alias stage : stage-client stage-server ;
>
> If I run "bjam stage" at the subproject level, it works fine. If I run
> it at the top level, I get errors like this:
>
> M:\test_20090928\src>bjam stage
> M:/test_20090928/boost-build/build\virtual-target.jam:996: in
> virtual-target.register-actual-name from module virtual-target
> error: Duplicate name of actual target: <pstage>c.exe
> error: previous virtual target { common%common.copy-c.exe.EXE {
> common%common.copy-c.exe.EXE { msvc%msvc.link-c.exe.EXE {
> msvc%msvc.compile.c-c.obj.OBJ { c.c.C } } } } }

[snip]

> M:\test_20090928\devutils\..\boost-build\boost-build.jam:1: in module
> scope from module
>
> I think the errors are telling me that it has a problem with c.exe
> being a target that gets copied to two different places. Any idea how
> to get around this?

First of all, your errors don't look like they're related to the sample
definitions above; c is declared as a library above and the errors indicate
that it's an executable. Could you reproduce the problem with a minimal
Jamroot + needed sources?

Second, the errors seem indicate that the problem is that two targets with
the same name ("c.exe") are being copied to the same place, which could have
different reasons (unless there's a real problem here):

1) Are you by any chance generating both debug and release variants at the
same time? If you do that try invoking bjam using e.g. "bjam ... debug" and
see if you have the same problem. To enable installing both variants with a
single build invocation you need to either tag the exe targets, or specify
different locations for the install targets (e.g.
"<variant>debug:<location>$(STAGE-<whatever>)/debug").

2) STAGE-CLIENT and STAGE-SERVER point to the same directory. Don't do that.

(Please come up with an appropriate subject line for follow-ups)

HTH / Johan


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