Boost logo

Boost-Build :

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


Roland Schwarz wrote:

> 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
> toolchain.
> 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
> distribution.
> 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
> anonymize...
> 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 * )
> {
> generator.__init__
> $(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
> return
> [ generator.generated-targets
> $(sources)
> : [ property-set.empty ]
> : $(project) $(name)
> ] ;
> }
> }
>
> generators.register [ new pkgspec-generator pkgspec.generate.c++ :
> PKGSPEC : CPP HPP ] ;
>
> 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
> <location>$(DIST_PATH)/include/company
> ;
>
>
>
> error: Duplicate name of actual target:
> <p/home/rs/mylib/dist/include/company>dataspec.hpp
> error: previous virtual target { common%common.copy-dataspec.hpp.HPP {
> pkgspec%pkgspec.generate.c++-company/dataspec.hpp.HPP {
> dataspec.psp.PKGSPEC } } }

Here, you are installing dataspec.hpp produced by your generator.

> 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 } }

Here, you are installing file dataspec.hpp that is lying in your tree.

Naturally enough, neither Boost.Build nor I have any idea which file
you actually want to have installed, and whether they are identical.

Why are you trying to install both?

- 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