Control: tags -1 - help unreproducible Control: tags -1 patch On Fri, Jun 02, 2017 at 09:01:56PM +0300, Kari Pahula wrote: > tags 863936 + help unreproducible > thanks > > Unfortunately, I couldn't reproduce the FTBFS. I tried building it a > few times with sbuild in a stretch environment and it worked fine > every time. The last upload for Gecode was in March and I reckon that > the build deps haven't changed much at all since then. I had no issue > back then. > > I can tell from the log that whatever it is is flex/bison related. > Would anyone else have better idea about what's going on here?
bison and the following mv are running twice in parallel builds, and trying to move the same file twice fails for obvious reasons. Minimal testcase (might not always fail): $ rm -f gecode/flatzinc/parser.tab.hh gecode/flatzinc/parser.tab.cpp && make -j2 gecode/flatzinc/parser.tab.hh gecode/flatzinc/parser.tab.cpp bison -t -o gecode/flatzinc/parser.tab.cpp -d gecode/flatzinc/parser.yxx bison -t -o gecode/flatzinc/parser.tab.cpp -d gecode/flatzinc/parser.yxx mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh mv: cannot stat 'gecode/flatzinc/parser.tab.hpp': No such file or directory Makefile:1405: recipe for target 'gecode/flatzinc/parser.tab.cpp' failed make: *** [gecode/flatzinc/parser.tab.cpp] Error 1 $ The attached patch fixes the problem. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Description: Fix parallel build failure In parallel builds this "bison && mv" ran twice in parallel, FTBFS if this resulted in the following sequence: bison -t -o gecode/flatzinc/parser.tab.cpp -d gecode/flatzinc/parser.yxx bison -t -o gecode/flatzinc/parser.tab.cpp -d gecode/flatzinc/parser.yxx mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh Running it only once fixes the problem. Author: Adrian Bunk <b...@debian.org> Bug-Debian: https://bugs.debian.org/863936 Index: gecode-4.4.0/Makefile.in =================================================================== --- gecode-4.4.0.orig/Makefile.in +++ gecode-4.4.0/Makefile.in @@ -1400,8 +1400,9 @@ gecode/flatzinc/lexer.yy.cpp: \ flex -ogecode/flatzinc/lexer.yy.cpp \ $(top_srcdir)/gecode/flatzinc/lexer.lxx -gecode/flatzinc/parser.tab.hh gecode/flatzinc/parser.tab.cpp: \ - $(top_srcdir)/gecode/flatzinc/parser.yxx +gecode/flatzinc/parser.tab.hh: gecode/flatzinc/parser.tab.cpp + +gecode/flatzinc/parser.tab.cpp: $(top_srcdir)/gecode/flatzinc/parser.yxx bison -t -o gecode/flatzinc/parser.tab.cpp -d $< mv gecode/flatzinc/parser.tab.hpp gecode/flatzinc/parser.tab.hh else