Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.2
-
c34d289c449dc8624f31bade882d6f808dae20a1
Description
make might compile lex generated c++ source file before yacc has run which would fail to compile if generated source contains include directive to a file that is not yet generated.
To reproduce:
- extract attached example
- run qmake
- try building in parallel with:
make -j4
$ make -j4
rm -f test_yacc.h test_yacc.cpp
flex -Ptest --nounistd -o test_lex.cpp test.l
yacc -d -p test -b test test.y
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I../../../Qt/5.6/gcc_64/include -I../../../Qt/5.6/gcc_64/include/QtGui -I../../../Qt/5.6/gcc_64/include/QtCore -I. -I../../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o test_lex.o test_lex.cpp
test.l:2:23: fatal error: test_yacc.h: No such file or directory
#include "test_yacc.h"
^
compilation terminated.