[CWiid] Topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/topic/41 <p> bison cannot be found? </p> en-us CWiid http://abstrakraft.org/cwiid/chrome/site/cwiid_banner.png http://abstrakraft.org/cwiid/discussion/topic/41 Trac 0.11.7 - DiscussionPlugin Shah.zad Mon, 30 Jul 2007 00:40:55 GMT Topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/topic/41#topic http://abstrakraft.org/cwiid/discussion/topic/41#topic <p> Hi, I am having a little problem with configure. I have got the required packages, however, configure cannot find bison. here is the output. </p> <pre class="wiki">checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for gawk... no checking for mawk... mawk checking for flex... flex checking lex output file root... lex.yy checking lex library... -lfl checking whether yytext is a pointer... yes checking for bison... byacc -d configure: error: bison not found </pre><p> I am on Kubuntu OS and when I apt-get install bison it says I have already got the latest version. </p> <p> Anyone know why is this happening? </p> Topic Shah.zad Tue, 02 Oct 2007 23:53:16 GMT Reply #255 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/255#message255 http://abstrakraft.org/cwiid/discussion/message/255#message255 <p> I encountered the same error again on one of my other machines and this time I fixed it by simply doing: </p> <blockquote> <p> export YACC="bison -y" </p> </blockquote> Message dsmith Wed, 15 Aug 2007 00:20:00 GMT Reply #196 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/196#message196 http://abstrakraft.org/cwiid/discussion/message/196#message196 <p> I'm going to leave it like it is for now. The correct solution is to write a bison autoconf script, but until I can do that, it should work correctly for everyone except the few people, such as yourself, that have byacc and bison installed. Thanks for the info. </p> Message Shah.zad Wed, 01 Aug 2007 23:37:30 GMT Reply #195 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/195#message195 http://abstrakraft.org/cwiid/discussion/message/195#message195 <p> I understand what you mean. </p> <p> See how I said that I installed byacc. </p> <p> I did, sudo apt-get install byacc </p> <p> and when I ran configure, it displayed .. </p> <pre class="wiki">... checking lex library... -lfl checking whether yytext is a pointer... yes checking for bison... yacc -d configure: error: bison not found ... </pre><p> I was like "what the". And I thought I should give the default yacc a shot, and commented the lines from configure.ac. </p> <p> In fact yacc -V tells me that it is bison, here is the output </p> <pre class="wiki">bison (GNU Bison) 2.3 Written by Robert Corbett and Richard Stallman. </pre><p> and when I say, </p> <blockquote class="citation"> <p> bison -y </p> </blockquote> <p> it says, </p> <pre class="wiki">bison: missing operand after `-y' Try `bison --help' for more information. </pre><p> Anyway I did an experiment, instead of using yacc, I used bison, here is what I get when making </p> <pre class="wiki">... make install -C wminput make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' bison -d parser.y mv -f y.tab.c parser.c mv: cannot stat `y.tab.c': No such file or directory gawk -f action_enum.awk action_enum.txt &gt; action_enum.c In file included from action_enum.c:3: conf.h:48:19: error: y.tab.h: No such file or directory In file included from uinput.c:44: conf.h:48:19: error: y.tab.h: No such file or directory In file included from py_plugin.c:46: conf.h:48:19: error: y.tab.h: No such file or directory In file included from c_plugin.c:30: conf.h:48:19: error: y.tab.h: No such file or directory In file included from conf.c:48: conf.h:48:19: error: y.tab.h: No such file or directory In file included from main.c:64: conf.h:48:19: error: y.tab.h: No such file or directory make[1]: Leaving directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' bison -d parser.y mv -f y.tab.c parser.c mv: cannot stat `y.tab.c': No such file or directory gcc -g -Wall -W -I../libcwiid -I/usr/include/python2.5 -DWMINPUT_CONFIG_DIR=\"/usr/local/etc/cwiid/wminput\" -DCWIID_PLUGINS_DIR=\"/usr/local/lib/cwiid/plugins\" -DCWIID_VERSION=\"0.6.00_rc2\" -c -o main.o main.c In file included from main.c:64: conf.h:48:19: error: y.tab.h: No such file or directory conf.h:121:1: warning: "UINPUT_VERSION" redefined In file included from conf.h:44, from main.c:64: /usr/include/linux/uinput.h:35:1: warning: this is the location of the previous definition ... </pre><p> so then I tried, byacc and while making I get </p> <pre class="wiki">... make install -C wminput make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' byacc -d parser.y byacc: e - line 44 of "parser.y", syntax error %error-verbose ^ gawk -f action_enum.awk action_enum.txt &gt; action_enum.c make[1]: Leaving directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' byacc -d parser.y byacc: e - line 44 of "parser.y", syntax error %error-verbose ^ make[1]: Leaving directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' make: *** [wminput] Error 2 ... </pre><p> I hope this explains it. </p> Message dsmith Tue, 31 Jul 2007 13:53:07 GMT Reply #194 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/194#message194 http://abstrakraft.org/cwiid/discussion/message/194#message194 <p> Whoah, hold on there, cowboy. That test is there for a reason, and removing it may be the solution for you, but it's definitely not for everyone. The standard yacc <span class="underline">does not</span> work for CWiid, and if we don't test for bison, a bad yacc clone may be used, resulting in hard-to-decipher make errors, which it is part of configure's job to prevent. </p> <p> So, please tell us more about how you got it to work. Earlier in the thread, you tried using byacc, and it failed. Did you get byacc to work somehow? If not, what yacc did you end up using? </p> Message Shah.zad Mon, 30 Jul 2007 23:27:15 GMT Reply #193 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/193#message193 http://abstrakraft.org/cwiid/discussion/message/193#message193 <p> Yes, I did clean. </p> <p> Though I solved it, here is what needs to be done; Comment out the following lines in configure.ac </p> <p> #if test "$YACC" != "bison -y"; then # AC_MSG_ERROR([bison not found]) #fi </p> <p> and off you go. </p> Message dsmith Mon, 30 Jul 2007 13:32:32 GMT Reply #192 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/192#message192 http://abstrakraft.org/cwiid/discussion/message/192#message192 <p> That's odd - it's detecting byacc when you don't have it installed? That's an autoconf bug. There are no (known) alternatives to bison, but you can set configure to use bison by adding the line: </p> <pre class="wiki">YACC="bison -y" </pre><p> after the test you commented earlier. </p> Message nickishappy Mon, 30 Jul 2007 06:27:05 GMT Reply #191 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/191#message191 http://abstrakraft.org/cwiid/discussion/message/191#message191 <p> did you do a <tt>make clean</tt> before trying make again? </p> Message Shah.zad Mon, 30 Jul 2007 05:13:43 GMT Reply #190 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/190#message190 http://abstrakraft.org/cwiid/discussion/message/190#message190 <p> After, sudo apt-get install byacc -- Its a different error this time, </p> <pre class="wiki">... make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' byacc -d -d parser.y byacc: e - line 44 of "parser.y", syntax error %error-verbose ^ gcc -g -Wall -W -I../libcwiid -I/usr/include/python2.5 -DWMINPUT_CONFIG_DIR=\"/usr/local/etc/cwiid/wminput\" -DCWIID_PLUGINS_DIR=\"/usr/local/lib/cwiid/plugins\" -DCWIID_VERSION=\"0.6.00_rc2\" -c -o main.o main.c In file included from main.c:64: conf.h:121:1: warning: "UINPUT_VERSION" redefined In file included from conf.h:44, from main.c:64: /usr/include/linux/uinput.h:35:1: warning: this is the location of the previous definition In file included from main.c:64: conf.h:167: error: expected specifier-qualifier-list before ‘YYLTYPE’ conf.h:201: error: expected declaration specifiers or ‘...’ before ‘YYLTYPE’ ... </pre> Message Shah.zad Mon, 30 Jul 2007 05:06:03 GMT Reply #189 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/189#message189 http://abstrakraft.org/cwiid/discussion/message/189#message189 <p> I've just installed "byacc", I 'll try that and see if it works. </p> Message Shah.zad Mon, 30 Jul 2007 05:03:27 GMT Reply #188 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/188#message188 http://abstrakraft.org/cwiid/discussion/message/188#message188 <p> Well, I don't think it works. Is there any alternative to bison? </p> <p> Here is what I get during make.. </p> <pre class="wiki">... gcc -o wmgui main.o interface.o support.o -L../libcwiid -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lrt -lglib-2.0 -lm -lcwiid install -D wmgui /usr/local/bin/wmgui make[1]: Leaving directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wmgui' make install -C wminput make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' byacc -d -d parser.y make[1]: byacc: Command not found mawk -f action_enum.awk action_enum.txt &gt; action_enum.c In file included from action_enum.c:3: conf.h:48:19: error: y.tab.h: No such file or directory In file included from uinput.c:44: conf.h:48:19: error: y.tab.h: No such file or directory In file included from py_plugin.c:46: conf.h:48:19: error: y.tab.h: No such file or directory In file included from c_plugin.c:30: conf.h:48:19: error: y.tab.h: No such file or directory In file included from conf.c:48: conf.h:48:19: error: y.tab.h: No such file or directory In file included from main.c:64: conf.h:48:19: error: y.tab.h: No such file or directory make[1]: Leaving directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' make[1]: Entering directory `/home/kde-devel/utils/cwiid-0.6.00_rc2/cwiid-0.6.00_rc2/wminput' byacc -d -d parser.y make[1]: byacc: Command not found gcc -g -Wall -W -I../libcwiid -I/usr/include/python2.5 -DWMINPUT_CONFIG_DIR=\"/usr/local/etc/cwiid/wminput\" -DCWIID_PLUGINS_DIR=\"/usr/local/lib/cwiid/plugins\" -DCWIID_VERSION=\"0.6.00_rc2\" -c -o main.o main.c In file included from main.c:64: conf.h:48:19: error: y.tab.h: No such file or directory conf.h:121:1: warning: "UINPUT_VERSION" redefined In file included from conf.h:44, from main.c:64: /usr/include/linux/uinput.h:35:1: warning: this is the location of the previous definition In file included from main.c:64: conf.h:167: error: expected specifier-qualifier-list before ‘YYLTYPE’ conf.h:201: error: expected declaration specifiers or ‘...’ before ‘YYLTYPE’ conf.h:202: error: expected declaration specifiers or ‘...’ before ‘YYLTYPE’ main.c: In function ‘main’: main.c:246: error: ‘struct conf’ has no member named ‘plugins’ main.c:247: error: ‘struct conf’ has no member named ‘plugins’ ... </pre> Message dsmith Mon, 30 Jul 2007 03:19:58 GMT Reply #187 to topic #41 - bison cannot be found? http://abstrakraft.org/cwiid/discussion/message/187#message187 http://abstrakraft.org/cwiid/discussion/message/187#message187 <p> Yeah, configure is finding byacc instead of bison. In cwiid/configure.ac, comment out the test right after <tt>AC_PROG_YACC</tt>, then run <tt>autoconf</tt>, and <tt>./configure; make; sudo make install</tt> as usual. Reply here with the results. If it works, we can add byacc as an acceptable YACC clone, or if not, test explicitly for bison rather than using <tt>AC_PROG_YACC</tt>. </p> Message