Last good commit: commit 4ff8fd93e8e91672bb02543ecaa0c6e462a87551 Author: Matt Turner <mattst88@gmail.com> Date: Sat Jan 28 20:13:51 2012 -0500 glsl: rename Makefile.sources' _SOURCES variables automake uses variables named *_SOURCES. Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Matt Turner <mattst88@gmail.com> First bad commit: commit dfb6142548df0dccbe6eed2c57986e208eb0d437 Author: Matt Turner <mattst88@gmail.com> Date: Fri Jan 13 14:31:39 2012 -0500 autoconf: use AC_PROG_YACC/LEX Needed for automake. Using AC_PROG_PATH(bison/flex) causes automake to fail to build .y and .l files. It is up to the builder to use bison/flex instead of yacc/lex. Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Matt Turner <mattst88@gmail.com> Without flex installed, autogen.sh should end with: checking for flex... no configure: error: flex is needed to build Mesa Similar for bison. Currently, it doesn't. I feel like this is only one of two problems here, the second being that if autogen misses the absence of flex, there is no error when the build tries to use it for glsl. At least when missing bison, it throws a useful error: /bin/bash: yacc: command not found This is similar to bug 36651. Latest commit, also has this problem: commit 5ac910c0146ca852566ad0328301b2d40f8f5e54 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Sun Mar 11 23:38:36 2012 -0700
Created attachment 58416 [details] [review] patch
Good catch! I tested the patch against current master and it worked well in detecting a missing flex. (I also run into the very confusing Makefile infinite loop before) Also worth noting that with the patch, it's still possible to build the i965 driver fine without having bison installed.
It -shouldn't- be possible...the GLSL compiler makes use of Bison-specific features...
Thanks Kenneth, you're right. I had hit a bug where `make distclean` wasn't removing the old bison-generated files. This might explain why my last two bisects went bad.
I committed a patch that fixes the case when we don't need bison (eg, we have the generated files provided in the tarball and therefore don't need bison) http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba4a36d8cdd6425c1263026e953cc3977d1192c6 As such, I'm marking this fixed.
The check for lex seems to be missing. I didn't have it installed and got weird errors from ylwrap.
(In reply to comment #6) > The check for lex seems to be missing. I didn't have it installed and got > weird errors from ylwrap. I didn't think it would be needed, but seems it is. I'll make a patch.
Thanks. While at it, glsl also seems to require a C++ compiler but configure doesn't check for it. I didn't have g++ installed and hit it mid-make.
configure.ac most certainly uses AC_PROG_CXX, which checks for a C++ compiler. There should be no problem there.
Created attachment 66899 [details] [review] patch to fix lex detection How about this?
Thanks. I'll check both issues tomorrow night.
(In reply to comment #11) > Thanks. I'll check both issues tomorrow night. I think these changes have not been pushed yet to master. I got an error while compiling Mesa from git. Autogen correctly did not find flex or lex, but did not complain. Then, compilation failed with no informative information (no infinite loop).
I am re-opening this report.
Fixed with http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a710543968b6710368d53dbff350d2d23e08268
The commit 2a71054396 and its parent (for Bison) break configure for me. checking if bison is the parser generator... yes ./configure: line 19532: syntax error near unexpected token `fi' ./configure: line 19532: `fi' Indeed the else-fi sections are empty, which makes bash unhappy. My autoconf is 2.61, if that is too old, please mark the required version so that autogen bails early.
Created attachment 73866 [details] [review] patch (In reply to comment #15) > The commit 2a71054396 and its parent (for Bison) break configure for me. > > checking if bison is the parser generator... yes > ./configure: line 19532: syntax error near unexpected token `fi' > ./configure: line 19532: `fi' > > Indeed the else-fi sections are empty, which makes bash unhappy. > > My autoconf is 2.61, if that is too old, please mark the required version so > that autogen bails early. I don't think that's it. It looks like I'm missing a comma between the test and run-if-true in AS_IF.
Pushed to master and 9.1.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.