[PATCH] Fix mdssvc build with bison
nopower at suse.com
Thu Feb 23 12:00:35 UTC 2017
On 23/02/17 11:01, Ralph Böhme wrote:
> Hi Noel,
> since the change to use bison in waf to automatically generate the lexer and the
> parser I'm often getting this error:
> [3173/4308] Compiling source3/rpc_server/mdssd.c
> ../source3/rpc_server/mdssvc/mdssvc.c:30:49: fatal error: rpc_server/mdssvc/sparql_parser.tab.h: No such file or directory
> #include "rpc_server/mdssvc/sparql_parser.tab.h"
Gnahhh :( strange
> If I run configure and make again sparql_parser.tab.h is regenerate and the
> build succeeds.
> For some reason something seams to occsionally remove sparql_parser.tab.h and we
> don't regenerate it. I guess we shouldn't depend on the parser sources but on
> the generated files in the mdssvc subsystems.
> Attached patch fixes the issue for me.
But how does it know it needs to invoke bison/flex, with this change
nothing knows about the .y/.l files, surely the .y/.l files in the
module recipe is how it knows it needs to run flex/bison (see
third_party/waf/wafadmin/Tools/bison.py) and there is seems (well I
admit I am guessing) from the 'outs.append(node.change_ext('.tab.c'))'
that is how the generated '.c' files are added to the sources for
rpc_mdssvc_module. For me deleting the bin directory and rebuild fails (
source not found: 'mdssvc/sparql_parser.tab.c' in 'dir://.... )
I haven't seen this error yet, but I suppose it is either a bug in waf
(or how I am using this stuff) :-/ sorry no clue at the moment
More information about the samba-technical