Bug 111 - LS build fails in src/network/lscp.y with bison 2.4
Summary: LS build fails in src/network/lscp.y with bison 2.4
Status: CLOSED FIXED
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: other (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P2 blocker
Assignee: Andreas Persson
URL:
Depends on:
Blocks:
 
Reported: 2008-12-07 16:30 CET by Juuso Alasuutari
Modified: 2008-12-16 13:21 CET (History)
0 users

See Also:


Attachments
lscpparser.cpp (267.95 KB, text/plain)
2008-12-08 00:23 CET, Juuso Alasuutari
Details
lscpsymbols.h (1.96 KB, text/plain)
2008-12-08 00:24 CET, Juuso Alasuutari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juuso Alasuutari 2008-12-07 16:30:34 CET
Since my last succesful build of LinuxSampler in 2008-10-29 I haven't gotten it
to compile at all. The error is always the same:

Making all in network
make[3]: Entering directory `/usr/src/linuxsampler-cvs/src/network'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..
   -Wreturn-type -ffast-math  -march=nocona-m32 -pipe -O3 -pipe
-fomit-frame-pointer -ggdb -pthread -msse -c -o lscpparser.lo lscpparser.cpp
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I../.. -Wreturn-type -ffast-math -march=nocona -m32
-pipe -O3 -pipe -fomit-frame-pointer -ggdb -pthread -msse -c lscpparser.cpp 
-fPIC -DPIC -o .libs/lscpparser.o
lscp.y: In function 'int LinuxSampler::yylex(LinuxSampler::_YYSTYPE*)':
lscp.y:87: error: 'EXT_ASCII_CHAR' was not declared in this scope
make[3]: *** [lscpparser.lo] Error 1
make[3]: Leaving directory `/usr/src/linuxsampler-cvs/src/network'
make[2]: Leaving directory `/usr/src/linuxsampler-cvs/src'
make[1]: Leaving directory `/usr/src/linuxsampler-cvs'
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The first time LS failed to build for me was in 2008-11-07, so I suspect that
there was some change in 2008-11-01 or 2008-11-02 that did this. I'm not at all
sure, though, thanks to the WTF-ness of CVS and me being flex-illiterate.

I've tried building with and without assembly optimizations and the instruments
DB, no luck.
Comment 1 Christian Schoenebeck 2008-12-07 17:22:43 CET
Probably the auto-generated LSCP parser was not automatically re-generated of 
the new LSCP definition file (lscp.y). Try:

make parser
make

from the toplevel directory.
Comment 2 Juuso Alasuutari 2008-12-07 20:20:42 CET
I think it's already generated during 'make -f Makefile.cvs' because I see this:

  Searching for a parser generator...OK (/usr/bin/bison -y)
  Generating LSCP parser...

I tried manually running 'make parser' after ./configure but that didn't affect
the outcome from make.
Comment 3 Christian Schoenebeck 2008-12-07 20:34:11 CET
Are you sure bison did not throw out any error message? What is the full 
output of "make parser"?

Please also try to make a completely fresh checkout of LS from CVS and try to 
build it again.

If that doesn't work, please upload your two auto generated files 
lscpparser.cpp and lscpsymbols.h.
Comment 4 Juuso Alasuutari 2008-12-08 00:23:28 CET
Created attachment 41 [details]
lscpparser.cpp
Comment 5 Juuso Alasuutari 2008-12-08 00:24:27 CET
Created attachment 42 [details]
lscpsymbols.h
Comment 6 Juuso Alasuutari 2008-12-08 00:25:55 CET
The checkout is completely fresh. Here's the output from 'make parser' and the
two files you requested (attached).

  make[1]: Entering directory `~/tmp/linuxsampler-cvs/src/network'
  ../../scripts/generate_parser.sh
  Searching for a parser generator...OK (/usr/bin/bison -y)
  Generating LSCP parser...
  conflicts: 1801 shift/reduce, 1045 reduce/reduce
  conflicts: 1801 shift/reduce, 1045 reduce/reduce
  Done
  Updating Documentation/lscp.xml...Done
  make[1]: Leaving directory `~/tmp/linuxsampler-cvs/src/network'
Comment 7 Juuso Alasuutari 2008-12-08 01:48:28 CET
Well, what do you know. Downgrading bison from 2.4 to 2.3 makes the problem go
away. I apologize for the trouble, I was sloppy for initially blaming flex and
then slow looking into bison versions.

Of course bison 2.4 still thinks that lscp.y is broken.
Comment 8 Andreas Persson 2008-12-10 20:43:36 CET
Does the error with bison 2.4 go away if you add

#include "lscpsymbols.h"

to lscp.y?
Comment 9 Juuso Alasuutari 2008-12-14 14:35:41 CET
Yes, adding that include seems to fix it.
Comment 10 Christian Schoenebeck 2008-12-14 14:49:30 CET
Marking this one as blocker, as it should be resolved before the upcoming 
release.
Comment 11 Andreas Persson 2008-12-14 16:43:58 CET
Fix committed to CVS.