Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-06 20:15:55

Angus Leeming <yg-boost-users_at_[hidden]> writes:

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

Why is that needless to say? Both of those seem to have the intended
effect. What do you see on the generated command-lines?

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

That's not complicated, IMO.

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

I'm sorry, I don't know how to "cure" the problem right now, because
I'm not sure what results would be produced by a complete cure. Do
you expect to end up with both of these .o files in in the same

Dave Abrahams
Boost Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at