[CWB] rcqp installation / compilation

Stefan Evert stefanML at collocations.de
Fri Sep 11 19:51:05 CEST 2015


> On 3 Sep 2015, at 01:32, Ruprecht von Waldenfels <ruprecht.waldenfels at gmx.net> wrote:
> 
> I have been trying to install rcqp, the R package, on an Ubuntu 14.04 64 Bit server, and I ran into problems at the point where CWB is compiled. 
> However, I got an error which I could not figure out the reason for (see below).
> ... 
> cwb/cqp/parser.tab.c: In function ‘yyparse’: 
> cwb/cqp/parser.tab.c:4228:9: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] 
>          yyerror (yymsgp); 
>          ^ 
> cwb/cqp/parser.y:70:6: note: expected ‘char *’ but argument is of type ‘const char *’ 
>  void yyerror (char *s) 
>       ^ 
> make: *** [cwb/cqp/parser.tab.o] Error 1 
> ERROR: compilation failed for package ‘rcqp’ 

I suspect this is a mismatch between the flex / bison libs on your machine and the (auto-generated) bison parser included in the source distribution of the rcqp package.

If you unpack the .tar.gz, remove the files named

	*.tab.*
	*.yy.*

from subdirectories

	rcqp/src/cwb/cl
	rcqp/src/cwb/cqp

and repack the tree under the same .tar.gz filename, the bison parser will be re-compiled when the package is installed and hopefully everything will be fine.

Note to the package maintainer: I think you shouldn't include these generated files in the package, for the reason I just described. The INSTALL file says that flex / bison are needed anyway for installation, and your Makevars.in has all the necessary rules to rebuild the grammar (which don't fire because the pre-generated parser files in the distribution are newer than the parser source files).

> Also, I was wondering how one was to proceed if one wanted the latest version of CWB with this? 

Yes, it would be great to keep rcqp up-to-date with CWB development.  I understand that the rcqp team had to make quite a few changes to the source code, so I"m not sure whether it would be feasible to re-integrate the code bases.

If Andrew and I had a lot more spare time, we would have worked on this a few years ago when rcqp was released. :-(

Best,
Stefan



More information about the CWB mailing list