OkCupid / sfslite

SFSlite C++ development libraries
GNU General Public License v2.0
55 stars 65 forks source link

Compilation error (missing yyget_fileno()) #18

Open vicentebolea opened 9 years ago

vicentebolea commented 9 years ago

I get the following error when I try to compile the last commit baa49b8b0dacaf3caccb629919237acbeba5c94e

 /opt/centos/devtoolset-1.1/root/usr/bin/g++ -g -Wall -Werror -Wno-mismatched-tags -Wno-overloaded-virtual -Wno-unused-private-field -Wno-unused --std=gnu++0x -o .libs/tame tame.o parse.o scan.o processor.o const.o output.o  ../async/.libs/libasync.so -lnsl -lresolv -lpcre  -Wl,--rpath -Wl,/usr/local/lib/sfslite-1.2/shdbg
 parse.o: In function `yyparse()':
 /usr/local/src/sfslite/tame/./parse.yy:110: undefined reference to `yyget_lineno()'
 /usr/local/src/sfslite/tame/./parse.yy:127: undefined reference to `yyget_lineno()'
 /usr/local/src/sfslite/tame/./parse.yy:135: undefined reference to `yyget_lineno()'
 /usr/local/src/sfslite/tame/./parse.yy:137: undefined reference to `yyget_lineno()'
 /usr/local/src/sfslite/tame/./parse.yy:161: undefined reference to `yyget_lineno()'
 parse.o:/usr/local/src/sfslite/tame/./parse.yy:201: more undefined references to `yyget_lineno()' follow
 collect2: error: ld returned 1 exit status
 make[3]: *** [tame] Error 1
 make[3]: Leaving directory `/usr/local/src/sfslite/tame'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory `/usr/local/src/sfslite/tame'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/usr/local/src/sfslite'
 make: *** [all] Error 2

Here is Bison version:

 → bison --version 
 bison (GNU Bison) 3.0.3

And Flex version

 → flex --version
 flex 2.5.39

Other tools are:

vicentebolea commented 9 years ago

Same applies for previous comnmit 60b8f455e110fca5dd6e9f825d58d5d7833363c1

vicentebolea commented 9 years ago

Also same applies for my Ubuntu 12.04 desktop

vicentebolea commented 9 years ago

I finally made it work using GCC 3.3, other compiler version breaks using the version 1.2. Actually I found out that the versions released after 1.2 does not compile in GCC 3.3 and 4.4 since that versions does not accept the flags introduced in this commit: 3e97db054a0cfb089028faa9854b7593be211a6f

GabrielleC commented 9 years ago

I had the same problem and this is how I fixed it (without having to downgrade GCC) You need to update bison and flex by simply running apt-get install. Then, if you still got the problem, go into the tame directory and do make parseclean. You can then make everything without problem (first in the tame directory then in the general folder) For the flag problem, you need to modify the acsfs.m4 file. Line 1511 remove -Werror and everything should work fine

vicentebolea commented 9 years ago

Thanks for the info, unfortunately I moved on to another filesystem for my project so I stopped using it. If I use it again I would fork it and made those changes to make it work in a decent GCC version.