Boost logo

Boost Users :

From: Angus Leeming (yg-boost-users_at_[hidden])
Date: 2003-08-06 08:11:11


David Abrahams wrote:

> Angus Leeming <yg-boost-users_at_[hidden]> writes:
>
>> Dear all,
>>
>> I'm a bjam newbie trying to build the BGL in boost 1.30.0 on a DEC
>> Alpha running linux. However, the build process is failing to
>> generate the graphviz parser and lexer:
>>
>> $ cd libs/graph/build
>> $ bjam "-sTOOLS=gcc"
>> ...found 437 targets...
>> ...using 2 temp targets...
>> ...updating 3 targets...
>> ...using
>> <libs!graph!build/liblibbgl-viz.a/gcc/debug/inlining-on/runtime-link-dynamic>graphviz_graph_lex.o...
>> ...using
>> <libs!graph!build/liblibbgl-viz.a/gcc/debug/inlining-on/runtime-link-dynamic>graphviz_digraph_lex.o...
>> gcc-C++-action
>> ../../../libs/graph/build/bin/liblibbgl-viz.a/gcc/debug/inlining-on/runtime-link-dynamic/graphviz_graph_parser.o
>> graphviz_parser.y:44:2: #error Need to define the GRAPHVIZ_GRAPH
>
> Try bjam -sTOOLS=gcc "-sBUILD=<define>GRAPHVIZ_GRAPH=GraphvizGraph"
>
> HTH,

Thank you, Dave. It does indeed fix that particular problem.
Now I have another that appears similar:

gcc-C++-action ../../../libs/graph/build/bin/liblibbgl-viz.a/gcc/debug/runtime-link-dynamic/graphviz_graph_parser.o
graphviz_parser.y:44:2: #error Need to define the GRAPHVIZ_DIRECTED macro to either 0 or 1

Needless to say, neither
        "-sBUILD=<define>GRAPHVIZ_GRAPH=GraphvizGraph <define>GRAPHVIZ_DIRECTED=GraphvizDirected"
nor
        "-sBUILD=<define>GRAPHVIZ_DIRECTED=GraphvizDirected"
(in case I got the syntax wrong ;-)

have any effect.

I don't know how familiar you are with the code here, but the Makefile way
would be to define specialised targets (my terminology is probably incorrect),
in transparent terms something like:

graphviz_graph_parser.o: graphviz_parser.C
        g++ -DGRAPHVIZ_DIRECTED=0 -o graphviz_graph_parser.o graphviz_parser.C

graphviz_digraph_parser.o: graphviz_parser.C
        g++ -DGRAPHVIZ_DIRECTED=1 -o graphviz_digraph_parser.o graphviz_parser.C

ie, two object files from one source file. The complication here,
of course, is that the source code is in graphviz_parser.y.

Does this enable you to 'cure' the problem or is it fundamental?

Angus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net