Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-10 03:48:45

On Friday 10 December 2004 02:32, muchacho_30 wrote:

Hi Alain,

> error: Duplicate name of actual target:
> <p../../../generic/apps/rf/bin/icc/debug/link-static>main.lis
> error: previous virtual target { {
> icc%icc.compile.c-vectors.OBJ { vectors.C } } {
> error: created from ../../../generic/apps/rf/Jamfile:93
> error: another virtual target { icc%icc.compile.c-main.LIS { main.C } }
> error: created from ../../../generic/apps/rf/Jamfile:93
> error: added properties: none
> error: removed properties: <find-static-library>os&&c12&&c12p

The message says there's a conflict between two targets. Both are named "main"
and have type "LIS", but one is created from main.C by compiling and another
is created from many object files by linking.

> ### Target Binary File ###

FWIW, it's much more convenient if you sent testcases as archive, that I can
unpack in no time.

> exe main : # Sources
> vectors.c
> reset.c
> hook.c
> cpu_stop.c
> ../../hc12_e128/sys_timer.c
> main.c

Here's main.c which causes the problem.

> generators.register-c-compiler icc.compile.c : C : OBJ LIS
> : <toolset>icc ;

This informs V2 that compiling main.c produces main.obj and main.lis.

> # The librarian needs libraries to start with the prefix 'lib'
> generators.register-composing icc.archive : OBJ :
> STATIC_LIB(lib%) : <toolset>icc ;
> generators.register-linker : LIB OBJ : EXE LIS DBG
> LST MAP MP : <toolset>icc ;

This says that when linking main.EXE the linker also produces main.lis.

I believe that V2 correctly informs you that a file with the same name will be
created twice -- during compiling main.c and during linking main.exe.

If you can convince either linker or compiler to use a different name for LIS
file, you can use the same trick that you are using for icc.archive:

generators.register-linker : LIB OBJ : EXE LIS(link%) DBG
LST MAP MP : <toolset>icc ;

would tell V2 that the name of lis file has "link" prepended. If you can't
change the name, you can either:

- avoid using the same name for main target and a source file
- don't tell V2 that LIS file is created. That however, will mean that
main.lis is silently overwritten by the linker and won't be deleted during
"bjam clean".

You choose ;-)

> Please reply to:
> js at simplytech dot com

I cc this address, but please not that we strongly prefer to keep all general
discussion on this list. Discussion on list will help other users, and it can
be considered a non-monetary price for using Boost.Build ;-)

Especially given NNTP interface, reading the list is not that hard.

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at