[PATCH] Fix mdssvc build with bison

Ralph Böhme slow at samba.org
Thu Feb 23 11:01:01 UTC 2017


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"

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.

Cheerio!
-slow
-------------- next part --------------
From 422cb81432877a50218441d7677f629dcf3457d1 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Fri, 17 Feb 2017 08:14:02 +0100
Subject: [PATCH] s3/rpc_server: mdssvc: fix build

I was alway getting build failures about a missing
mdssvc/sparql_parser.tab.h. Sure enough, we must depend on the generated
files here, not the parser sources, so waf knows when regenerate.

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/rpc_server/wscript_build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/rpc_server/wscript_build b/source3/rpc_server/wscript_build
index 7fe4fda..28c8051 100644
--- a/source3/rpc_server/wscript_build
+++ b/source3/rpc_server/wscript_build
@@ -145,8 +145,8 @@ bld.SAMBA3_MODULE('rpc_mdssvc_module',
                   mdssvc/dalloc.c
                   mdssvc/marshalling.c
                   mdssvc/sparql_mapping.c
-                  mdssvc/sparql_parser.y
-                  mdssvc/sparql_lexer.l
+                  mdssvc/sparql_parser.tab.c
+                  mdssvc/sparql_lexer.lex.c
                   mdssvc/srv_mdssvc_nt.c
                   ../../librpc/gen_ndr/srv_mdssvc.c''',
                   init_function='',
-- 
2.9.3



More information about the samba-technical mailing list