Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#45159 closed defect (fixed)

daq 2.0.2: error: tokdefs.h: No such file or directory

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: roederja
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: daq

Description

daq 2.0.2 failed to build on the Snow Leopard build server only:

https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/29811/steps/compile/logs/stdio

But I don't know that it's a Snow Leopard-specific problem. The error that caused the build to fail was:

./scanner.l:70:21: error: tokdefs.h: No such file or directory

But later in the log we see:

make[2]: *** [libsfbpf_la-sf_scanner.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv y.tab.c sf_grammar.c
mv y.tab.h tokdefs.h

So tokdefs.h got created, but after it was already expected to exist. This makes me think it's a parallel build failure brought on by incomplete target dependencies in the Makefile.

Change History (8)

comment:1 Changed 10 years ago by roederja

Hm, I don't have snow leoopard - so can't really reproduce it. All I can do is roll it back to the preious version.

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I don't think you need to roll back, and as I said it doesn't sound like a Snow Leopard-specific problem. It sounds like an intermittent parallel build problem, which just happened to trigger on one of the four build servers. Perhaps you can reproduce it on other OS versions, if you try a few times. Perhaps you can fix it by editing the Makefile, or if not, by disabling parallel building ("use_parallel_build no").

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 10 years ago by roederja

Ok I'll check the build server tomorrow to see if it fixed itself in a subsequent build. If not I'll try disabling parallel builds.

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I tested on my own Snow Leopard system and it built fine.

I had the buildbot re-run the Snow Leopard build and it built fine: https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/29830

comment:5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

The issue is easy to reproduce if the following patch is applied and autoreconf is run:

--- sfbpf/Makefile.am.orig	2011-08-01 08:25:41.000000000 -0500
+++ sfbpf/Makefile.am	2014-09-25 19:44:05.000000000 -0500
@@ -48,6 +48,7 @@
 	${srcdir}/runlex.sh $(V_LEX) -osf_scanner.c ${srcdir}/scanner.l
 
 ${builddir}/tokdefs.h ${builddir}/sf_grammar.c: ${srcdir}/grammar.y
+	sleep 5
 	@rm -f ${builddir}/sf_grammar.c ${builddir}/tokdefs.h
 	$(V_YACC) -d ${srcdir}/grammar.y
 	mv y.tab.c sf_grammar.c

comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Should be fixed in r125778. This patch should be sent to the developer for inclusion in the next version.

comment:7 in reply to:  6 Changed 10 years ago by roederja

Replying to ryandesign@…:

Should be fixed in r125778. This patch should be sent to the developer for inclusion in the next version.

I sent the patch to the snort developers. Thanks Ryan for fixing this.

comment:8 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

The patch was removed in r129470, but an updated version was reinstated in r136575 because it's still a problem. Here is an updated version of my previous patch that makes the parallel build issue show up more evidently (less intermittently):

--- sfbpf/Makefile.in.orig	2015-04-23 10:19:16.000000000 -0500
+++ sfbpf/Makefile.in	2015-05-21 22:01:34.000000000 -0500
@@ -784,6 +784,7 @@
 
 tokdefs.h: sf_grammar.c
 sf_grammar.c: $(srcdir)/grammar.y
+	sleep 5
 	@rm -f sf_grammar.c tokdefs.h
 	$(V_YACC) -d $(srcdir)/grammar.y
 	mv y.tab.c sf_grammar.c

Jann, could you remind the developers about including this patch in the next release? Thanks.

Note: See TracTickets for help on using tickets.