Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-03-25 03:46:41

In the hope anyone has idea what could be wrong....
I know my chances are low, anyone has the same problem. Also it is not
possible to post the entire project. But perhaps someone ...

I was succesfull to integrate my pkgspec custom code generator into my
This generator, as explained in my previous posts, generates a cpp and
an hpp file.
Later on the hpp file is copied over to a install directory. This works
well under
windows XP and on my debian box. Funningly the same gives me the following
"Duplicate name of actual target" error when run on a rock-linux
I am using the very same boost-build files and a recent bjam. (From trunk.)

The relevant snippets from the pkgsepc generator jam file:
( Caution, there might be a typo in the following since I needed to
please ask if in doubt. )

import generators ;
import "class" : new ;
import type ;
import property ;

type.register PKGSPEC : psp ;

rule init ( )

class pkgspec-generator : generator
    import property-set ;

    rule __init__ (
        id composing ?
        : source-types *
        : target-types-and-names +
        : requirements * )
            $(id) $(composing)
            : $(source-types)
            : $(target-types-and-names)
            : $(requirements)
    rule generated-targets ( sources + : property-set : project name ? )
        # remove irrelevant features, i.e. all, since pkgspec does not
        # generate code that is dependant on any of those
            [ generator.generated-targets
                : [ property-set.empty ]
                : $(project) $(name)
            ] ;

generators.register [ new pkgspec-generator pkgspec.generate.c++ :

actions generate.c++
    pkgspec -fcpp -fhpp $(>) -o $(<[1]:S=.dummy)

And the usage in my Jamfile:

hpp company/dataspec
    : dataspec.psp

install headers
    : company/dataspec
      [ path.glob-tree $(MYLIB_ROOT)/include/company : *.hpp : CVS ]
    : <install-type>HPP

error: Duplicate name of actual target:
error: previous virtual target { common%common.copy-dataspec.hpp.HPP {
pkgspec%pkgspec.generate.c++-company/dataspec.hpp.HPP {
dataspec.psp.PKGSPEC } } }
error: created from mylib/build/bb/headers
error: another virtual target { common%common.copy-dataspec.hpp.HPP {
/home/rs/projects/mylib/include/company/dataspec.hpp.HPP } }
error: created from mylib/build/bb/headers
error: added properties: none
error: removed properties: none
/usr/local/share/boost-build/build/virtual-target.jam:453: in
actualize-no-scanner from module object(file-target)@299
/usr/local/share/boost-build/build/virtual-target.jam:118: in
object(file-target)@299.actualize from module object(file-target)@299
/usr/local/share/boost-build/build-system.jam:675: in load from module
/usr/local/share/boost-build/kernel/modules.jam:267: in import from
module modules
/usr/local/share/boost-build/kernel/bootstrap.jam:132: in boost-build
from module
/usr/local/share/boost-build/boost-build.jam:8: in module scope from module

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