Boost logo

Boost-Build :

From: muchacho_30 (aachkar_at_[hidden])
Date: 2004-12-09 18:32:38


Please refer to previous messages: 7588, 7595, 7597, 7602, if needed.

I was using Boost Build 2.0-m9.1

bjam
...found 14 targets...
...updating 2 targets...
warning: using independent target
<..!..!..!generic!libs!bqueue/icc/debug/link-static_at_../../../generic/libs/bqueue/bin/icc/debug/link-static@>bqueue.lis
icc.compile.c
../../../generic/libs/bqueue/bin/icc/debug/link-static/bqueue.o
../../../generic/libs/bqueue/bin/icc/debug/link-static/bqueue.lis
icc.archive
../../../generic/libs/bqueue/bin/icc/debug/link-static/libbqueue.a
...updated 2 targets...

I followed Vladimir's suggestion (see below),
so now I'm using Boost Build 2.0-m10

The warning is gone, but now I have an error:

bjam
/usr/local/apps/boost-build/build/virtual-target.jam:829: in
virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target:
<p../../../generic/apps/rf/bin/icc/debug/link-static>main.lis
error: previous virtual target { icc%icc.link-main.LIS {
icc%icc.compile.c-vectors.OBJ { vectors.C } } {
icc%icc.compile.c-reset.OBJ { reset.C } } { icc%icc.compile.c-hook.OBJ
{ hook.C } } { icc%icc.compile.c-cpu_stop.OBJ { cpu_stop.C } } {
icc%icc.compile.c-sys_timer.OBJ { ../../hc12_e128/sys_timer.C } } {
icc%icc.compile.c-main.OBJ { main.C } } { icc%icc.compile.c-cfg.OBJ {
cfg.C } } { icc%icc.compile.c-globals.OBJ { globals.C } } {
icc%icc.compile.c-regexp.OBJ { regexp.C } } {
icc%icc.compile.c-rf_sym.OBJ { rf_sym.C } } {
icc%icc.archive-libtask.STATIC_LIB { icc%icc.compile.c-task_vars.OBJ {
task_vars.C } } { icc%icc.compile.c-task_console.OBJ { task_console.C
} } { icc%icc.compile.c-task_rf_mobile.OBJ { task_rf_mobile.C } } {
icc%icc.compile.c-task_rf_station.OBJ { task_rf_station.C } } } {
icc%icc.archive-libcmd.STATIC_LIB { icc%icc.compile.c-con_cmd_vars.OBJ
{ con_cmd_vars.C } } { icc%icc.compile.c-con_cmd_interpreter.OBJ {
con_cmd_interpreter.C } } { icc%icc.compile.c-con_cmd_parsers.OBJ {
con_cmd_parsers.C } } { icc%icc.compile.c-con_cmd_misc.OBJ {
con_cmd_misc.C } } { icc%icc.compile.c-con_cmd_load.OBJ {
con_cmd_load.C } } { icc%icc.compile.c-con_cmd_save.OBJ {
con_cmd_save.C } } { icc%icc.compile.c-con_cmd_reset.OBJ {
con_cmd_reset.C } } { icc%icc.compile.c-con_cmd_edit.OBJ {
con_cmd_edit.C } } { icc%icc.compile.c-con_cmd_ping.OBJ {
con_cmd_ping.C } } { icc%icc.compile.c-con_cmd_help.OBJ {
con_cmd_help.C } } { icc%icc.compile.c-rf_cmd_cfg.OBJ { rf_cmd_cfg.C }
} { icc%icc.compile.c-rf_cmd_ping.OBJ { rf_cmd_ping.C } } {
icc%icc.compile.c-rf_cmd_misc.OBJ { rf_cmd_misc.C } } {
icc%icc.compile.c-rf_cmd_resp_ping.OBJ { rf_cmd_resp_ping.C } } } {
icc%icc.archive-libiic.STATIC_LIB {
icc%icc.compile.c-iic_E128_vars.OBJ { iic_E128_vars.C } } {
icc%icc.compile.c-iic_E128_init.OBJ { iic_E128_init.C } } {
icc%icc.compile.c-iic_E128_irq.OBJ { iic_E128_irq.C } } {
icc%icc.compile.c-iic_E128_execute.OBJ { iic_E128_execute.C } } } {
icc%icc.archive-libsio.STATIC_LIB { icc%icc.compile.c-sio_vars.OBJ {
../sio_vars.C } } { icc%icc.compile.c-sio_tx.OBJ { ../sio_tx.C } } {
icc%icc.compile.c-sio_tx_utils.OBJ { ../sio_tx_utils.C } } {
icc%icc.compile.c-sio_rx.OBJ { ../sio_rx.C } } {
icc%icc.compile.c-sio_rx_tf.OBJ { ../sio_rx_tf.C } } {
icc%icc.compile.c-sio_rx_line.OBJ { ../sio_rx_line.C } } {
icc%icc.compile.c-sio_rx_list.OBJ { ../sio_rx_list.C } } {
icc%icc.compile.c-sio_rx_integer.OBJ { ../sio_rx_integer.C } } {
icc%icc.compile.c-sio_misc.OBJ { ../sio_misc.C } } {
icc%icc.compile.c-sio_select.OBJ { ../sio_select.C } } {
icc%icc.compile.c-sio_E128_vars.OBJ { sio_E128_vars.C } } {
icc%icc.compile.c-sio_E128_tx_t.OBJ { sio_E128_tx_t.C } } {
icc%icc.compile.c-sio_E128_rx_t.OBJ { sio_E128_rx_t.C } } {
icc%icc.compile.c-sio_E128_irq.OBJ { sio_E128_irq.C } } {
icc%icc.compile.c-sio_E128_init.OBJ { sio_E128_init.C } } {
icc%icc.compile.c-sio_E128_baud.OBJ { sio_E128_baud.C } } {
icc%icc.compile.c-sio_E128_select.OBJ { sio_E128_select.C } } } {
icc%icc.archive-libx24.STATIC_LIB { icc%icc.compile.c-x24_vars.OBJ {
x24_vars.C } } { icc%icc.compile.c-x24_init.OBJ { x24_init.C } } {
icc%icc.compile.c-x24_execute.OBJ { x24_execute.C } } } {
icc%icc.archive-libcrc.STATIC_LIB { icc%icc.compile.c-crc_dow8.OBJ {
crc_dow8.C } } } { icc%icc.archive-libnvm.STATIC_LIB {
icc%icc.compile.c-nvm.OBJ { nvm.C } } } {
icc%icc.archive-libbqueue.STATIC_LIB { icc%icc.compile.c-bqueue.OBJ {
bqueue.C } } } { icc%icc.archive-libstopwatch.STATIC_LIB {
icc%icc.compile.c-stopwatch.OBJ { stopwatch.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
/usr/local/apps/boost-build/build/virtual-target.jam:175: in
actualize-no-scanner from module object(file-target)@298
/usr/local/apps/boost-build/build/virtual-target.jam:110: in
object(file-target)@298.actualize from module object(file-target)@298
/usr/local/apps/boost-build/build/virtual-target.jam:593: in
object(compile-action)@110.actualize from module
object(compile-action)@110
/usr/local/apps/boost-build/build/virtual-target.jam:301: in
actualize-action from module object(file-target)@297
/usr/local/apps/boost-build/build/virtual-target.jam:182: in
actualize-no-scanner from module object(file-target)@297
/usr/local/apps/boost-build/build/virtual-target.jam:110: in
object(file-target)@297.actualize from module object(file-target)@297
/usr/local/apps/boost-build/build/virtual-target.jam:630: in
actualize-source-type from module object(action)@10
/usr/local/apps/boost-build/build/virtual-target.jam:649: in
actualize-sources from module object(action)@10
/usr/local/apps/boost-build/build/virtual-target.jam:596: in
object(action)@10.actualize from module object(action)@10
/usr/local/apps/boost-build/build/virtual-target.jam:301: in
actualize-action from module object(file-target)@321
/usr/local/apps/boost-build/build/virtual-target.jam:182: in
actualize-no-scanner from module object(file-target)@321
/usr/local/apps/boost-build/build/virtual-target.jam:110: in
object(file-target)@321.actualize from module object(file-target)@321
/usr/local/apps/boost-build/build-system.jam:169: in load from module
build-system
/usr/local/apps/boost-build/kernel/modules.jam:259: in import from
module modules
/usr/local/apps/boost-build/kernel/bootstrap.jam:120: in boost-build
from module
/cygdrive/d/home/alain/code/tst/Portec/RF-Link-Eval/code/boost-build.jam:1:
in module scope from module

Here are my files:

+*****************************************************************************+
|
|
|
|
v
v

+-------------------------------------------------+
| Jamfile |
+-------------------------------------------------+

project
: requirements <toolset>icc
<include>c:/icc/include
<include>../../libs/sio
<include>../../libs/sio/hc12_E128
<include>../../libs/x24
<include>../../libs/iic/hc12_E128
<include>../../hc12_e128
<include>../../libs/stopwatch
<include>../../libs/crc
<include>../../libs/nvm

# <search>c:/icc/lib
;

### Target Binary File ###

exe main : # Sources

vectors.c
reset.c
hook.c
cpu_stop.c
../../hc12_e128/sys_timer.c
main.c
cfg.c
globals.c
regexp.c
rf_sym.c

# Local libraries

task
cmd

# Public libraries

../../libs/iic/hc12_e128//iic
../../libs/sio/hc12_e128//sio
../../libs/x24//x24
../../libs/crc//crc
../../libs/nvm//nvm
../../libs/bqueue//bqueue
../../libs/stopwatch//stopwatch

# Remote libraries

os
c12
c12p

: # Requirements

<define>USE_WAI_OPCODE=0
<link>static

: # Default Build
;

lib os : : <name>os ;
lib c12 : : <name>c12 ;
lib c12p : : <name>c12p ;

### Application Specific Files ###

lib task : task_vars.c
task_console.c
task_rf_mobile.c
task_rf_station.c

: <link>static
;

lib cmd : con_cmd_vars.c
con_cmd_interpreter.c
con_cmd_parsers.c
con_cmd_misc.c
con_cmd_load.c
con_cmd_save.c
con_cmd_reset.c
con_cmd_edit.c
con_cmd_ping.c
con_cmd_help.c
rf_cmd_cfg.c
rf_cmd_ping.c
rf_cmd_misc.c
rf_cmd_resp_ping.c

: <link>static
;

+-------------------------------------------------+
| icc.jam |
+-------------------------------------------------+
#============================================================================#
#
#
# I C C T O O L S E T
#
#
#
#============================================================================#

import toolset : flags register ;
import property ;
import generators ;
import os ;
import type ;
import feature : feature ;

register icc ; # register icc as a toolset

#----------------------------------------------------------------------------#
# Variables
#
#----------------------------------------------------------------------------#

#DIR_EXP_HDR = c:/icc/include ; # Location for EXPORT HDR files
#DIR_EXP_LIB = c:/icc/lib ; # Location for EXPORT LIB files

CC_FLAGS = -e -Wf-intenum -Wf-cpdoff ;
LN_FLAGS = -bdata:0x2001.0x3FFF -btext:0x4000.0x7FFF:0xC000.0xFFFF
-bextcode:0xE0000.0xFFFFF -maps1 -dinit_sp:0x4000 -fmots19 ;
AR_FLAGS = -a ;

#----------------------------------------------------------------------------#
# Initializes the icc toolset
#
#----------------------------------------------------------------------------#

rule init ( a1 * : a2 * : a3 * )
{
# Echo +++++ init of ICC +++++ ;
}

type.register LIS : lis ; #
Compiler listing file to be cleaned
type.register DBG : dbg ; #
Compiler listing file to be cleaned
type.register LST : lst ; #
Compiler listing file to be cleaned
type.register MAP : map ; #
Compiler listing file to be cleaned
type.register MP : mp ; #
Compiler listing file to be cleaned

type.set-generated-target-suffix OBJ : <toolset>icc : o ; #
Object Suffix
type.set-generated-target-suffix STATIC_LIB : <toolset>icc : a ; #
Library Suffix
type.set-generated-target-suffix EXE : <toolset>icc : s19 ; #
Binary Suffix

#----------------------------------------------------------------------------#
# Declare generators
#
#----------------------------------------------------------------------------#

# The C compiler generates OBJ and LIS files from C files

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

# The librarian needs libraries to start with the prefix 'lib'

generators.register-composing icc.archive : OBJ :
STATIC_LIB(lib%) : <toolset>icc ;

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

#----------------------------------------------------------------------------#
# Declare flags and action for compilation
#
#----------------------------------------------------------------------------#

flags icc.compile OPTIONS <cflags>
;
flags icc.compile DEFINES <define>
;
flags icc.compile INCLUDES <include>
;

#----------------------------------------------------------------------------#

# Since compile.c is called with 2 arguments on the left, i.e. $(<) =
file.o file.lis
# we need to only pass the first one $(<[1]), and because of CYGWIN,
we add :W
actions compile.c
{
C:/icc/bin/icc12w $(CC_FLAGS) -D$(DEFINES) -I"$(INCLUDES)"
$(OPTIONS) -c -o "$(<[1]:W)" "$(>:W)"
}

#----------------------------------------------------------------------------#
# Declare action for creating static libraries (Archive)
#----------------------------------------------------------------------------#

actions piecemeal archive
{
c:/icc/bin/ilibw $(AR_FLAGS) "$(<[1]:W)" "$(>:W)"
}

#----------------------------------------------------------------------------#
# Declare flags and action for linking
#
#----------------------------------------------------------------------------#

flags icc.link OPTIONS <linkflags> ;
flags icc.link LINKPATH <library-path> ;
flags icc.link LIBRARIES <library-file> ;
flags icc.link FINDLIBS-ST <find-static-library> ; # This is
collected using <name>library_name, example:
# lib os
: : <name>os ;

#----------------------------------------------------------------------------#

rule link ( targets * : sources * : properties * )
{
SPACE on $(targets) = " " ;
}

actions link bind LIBRARIES LIBNAMES
{
C:/icc/bin/icc12w $(LN_FLAGS) -g $(OPTIONS) -Lc:/icc/lib -o
"$(<[1]:W)" "$(>:W)" "$(LIBRARIES)" -l$(FINDLIBS-ST)
}

^
^
|
|
|
|
+*****************************************************************************+

I have read the FAQ about "Duplicate name", however, I don't think
that I'm
trying to compile the same file twice.

The error disappears if I don't build 'main' using the 'exe' rule, so
the error
is definitely not in building the 'task' and 'cmd' libs. It seems to
be related
to 'main.lis'.

Any suggestions?
Thanks!
Alain.

Please reply to:

js at simplytech dot com

+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+

I quote here from my previous messages, for reference purposes:

> > 1. The complier generates files that I would like to delete when 'bjam
> > clean' is invoked. For example, I can't make it clean up the file
> > 'bqueue.lis' and I don't know where to invoke the common.Clean rule
>
> It's easy. If your compiler produces anything else besides OBJ, you
need to
> specify that when declaring generator.
>
> > generators.register-c-compiler icc.compile.c : C : OBJ :
> > <toolset>icc ;
>
> This should become:
>
> type.register LIS : lis ;
> generators.register-c-compiler icc.compile.c : C : OBJ LIS :
<toolset>icc ;
>
> V2 will clean "lis" file automatically.

Hi Alain,

> 1. I tried your suggestion (creating a LIS type) and it worked! I
> have two more issues:
>
> a) Now, it generates the following:
>
> warning: using independent target
>
<..!..!..!generic!libs!bqueue/icc/debug/link-static_at_../../../generic/libs/b
>queue/bin/icc/debug/link-static @>bqueue.lis
>
> Can I get rid of this warning, specifically for this LIS type? (I
> don't want to completely disable warnings).

I think you can get rid of this warning by grabbing the most current
version
of V2 from http://boost.org/boost-build2

- 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