|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-06 04:59:09
Schnyder Franz wrote:
> Everything worked fine when I used lib or exe.
> Then I needed to set a special flag for only one source file. I used the
> obj rule and run in to a problem: "error: Ambiguity found when searching
> for best transformation".
>
> Or are my generators totally wrong and should be written in a different
> way ?
> generators.register-composing vxworks.lst : OBJ STATIC_LIB : LST
> : <toolset>vxworks ;
this is: STATIC_LIB OBJ --> LST
try:
generators.register-composing vxworks.lst : LST : OBJ STATIC_LIB
: <toolset>vxworks ;
# LST --> STATIC_LIB OBJ
> generators.register-standard vxworks.munch : LST : C : <toolset>vxworks ;
this is: LST --> C
try:
generators.register-standard vxworks.munch : LST : C : <toolset>vxworks ;
# C --> LST
Trimming to the relevant parts of the output from --debug-generators...
> trying generator vxworks.compile.c++ ( CPP -> OBJ )
> is viable
> trying generator vxworks.compile.c ( C -> OBJ )
> is viable
> *** 2 viable generators
> generator vxworks.compile.c++
> SUCCESS: { vxworks%vxworks.compile.c++-BSysListenerMock.obj.OBJ
> { ../src/BSysListenerMock.cpp.CPP } }
> generator vxworks.compile.c
> *** construct C
> from { ../src/BSysListenerMock.cpp.CPP }
> trying type C
> trying generator vxworks.munch ( LST -> C )
> is viable
> generator vxworks.munch
> *** construct LST
> from { ../src/BSysListenerMock.cpp.CPP }
> trying type LST
> trying generator vxworks.lst ( OBJ STATIC_LIB -> LST )
> is viable
^^^^^^^^^ Here is your problem
> *** 1 viable generators
> generator vxworks.lst
> *** construct OBJ
> from { ../src/BSysListenerMock.cpp.CPP }
> *** 1 viable generators
> generator vxworks.compile.c++
> generator vxworks.compile.c++ spawned
> *** construct STATIC_LIB
> from { ../src/BSysListenerMock.cpp.CPP }
> trying generator vxworks.archive ( OBJ -> STATIC_LIB )
> is viable
> generator vxworks.archive
> generator vxworks.archive spawned
> generator vxworks.lst spawned
> generator vxworks.munch spawned
> generator vxworks.compile.c spawned
> { vxworks%vxworks.compile.c-BSysListenerMock.obj.OBJ {
> vxworks%vxworks.munch-BSysListenerMock.c.C {
> vxworks%vxworks.lst-BSysListenerMock.lst.LST {
> vxworks%vxworks.compile.c++-BSysListenerMock.obj.OBJ {
> ../src/BSysListenerMock.cpp.CPP } } } } }
> error: Ambiguity found when searching for best transformation
The ambiguity is that it is trying to generate an LST file from an OBJ
file and is getting confused (CPP -> OBJ -> LST -> C -> OBJ).
What you want is CPP -> LST -> OBJ and C -> LST -> OBJ, correct? When
compiling a C file with VxWorks, I'm assuming you don't need to "munch"
it. If so, why don't you have C -> OBJ as normal, and
CPP -> C -> OBJ
^^ munch here
then you could do the munching in the vxworks.c++ action only. This
would remove the need for an LST intermediary. Or am I missing something?
- Reece
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