Menu

#15 ./configure doesn't check for flex or bison

open
None
minor-defect
gtk
2013-10-11
2013-10-11
No

The ./configure script doesn't check for flex or bison, so it succeeds and the build fails ostensibly with a "can't find tikzparser.h" error.

Discussion

  • Alex Merry

    Alex Merry - 2013-10-11

    Configure does check for flex and bison, but doesn't fail if they're not found. This is deliberate, as anyone building from a released source (as opposed to git) will not need flex or bison.

    That said, the error message during the make step should not be about failing to find tikzparser.h, but instead about flex or bison not being found.

     
  • Aleks Kissinger

    Aleks Kissinger - 2013-10-11

    Ah, that makes sense. Didn't think about source distro. The error at point of failure is about not finding the header, but if you scroll up, easy to see that flex/bison missing.

     
  • Alex Merry

    Alex Merry - 2013-10-11

    So if I uninstall flex and bison and build from scratch, I get the warning

    configure: WARNING: flex not found; this may cause problems for developers
    

    during configure (and another for bison), and running make gives me

    Making all in src
    make[1]: Entering directory `/home/alex/src/tikzit/tikzit/src'
      GEN      common/tikzlexer.m
    /home/alex/src/tikzit/tikzit/missing: line 81: flex: command not found
    WARNING: 'flex' is missing on your system.
             You should only need it if you modified a '.l' file.
             You may want to install the Fast Lexical Analyzer package:
             <http://flex.sourceforge.net/>
    make[1]: *** [common/tikzlexer.m] Error 127
    make[1]: Leaving directory `/home/alex/src/tikzit/tikzit/src'
    make: *** [all-recursive] Error 1
    

    Even when running "make -j3", for example, Make is clever enough not to try compiling anything until it has run flex and bison, unless those files already exist.

    Have you tried doing

    git clean -xfd
    

    to get a fresh checkout? It could simply be that you have tikzlexer.m but not tikzlexer.h, and so it is not even trying to generate the files.

     
  • Aleks Kissinger

    Aleks Kissinger - 2013-10-11

    Hmm, funny we get different errors. It was on a clean checkout. I'd send you exactly what I got, but silly console doesn't have enough scrollback.

    Probably got the same thing from configure, but I never read. For example: didn't notice poppler was missing until I hit CTRL+L in tikzit and nothing happened. :-P

     
  • Alex Merry

    Alex Merry - 2013-10-11

    I've pushed a commit that fixes Make's confusion when common/tikzparser.m exists but common/tikzparser.h does not.

    Also, when you say "clean checkout", do you mean a completely fresh clone? "make clean" does not give you a clean checkout, and neither does running either "git checkout -f" or "git clean -f" (without the -x option).

     
  • Aleks Kissinger

    Aleks Kissinger - 2013-10-11

    fresh clone. Been setting up everything off a clean install of OS. '-x' is useful, I'll keep that in mind.

     

Log in to post a comment.