Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56507

Building lex source that includes a header generated by yacc might fail

    XMLWordPrintable

Details

    • 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.
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            poikelin Joni Poikelin
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes