Kannel Make issue in Centos 7

433 views Asked by At

I have tried to install kannel 1.4.5 in centos 7 but when run make command getting below error.

gcc -std=gnu99 -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/openssl -o wmlscript/wslexer.o -c wmlscript/wslexer.c
wmlscript/wslexer.c:221:32: error: unknown type name ‘YYLTYPE’
 int ws_yy_lex(YYSTYPE *yylval, YYLTYPE *yylloc, WsCompiler* compiler)
                                ^
make: *** [wmlscript/wslexer.o] Error 1
1

There are 1 answers

5
miken32 On

The version of Bison used by CentOS isn't compatible with this code. According to a bug report on this issue,

the problem occurs because bison 3 no longer supports YYLEX_PARAM and YYPARSE_PARAM. Both were have been deprecated since version 1.875, which was released on January 1, 2003

Not sure why it wasn't fixed in the latest release, but you can either downgrade to Bison 2.7 or apply this patch (linked from the bug report) to the code. The patch will:

  • remove YYLEX_PARAM and YYPARSE_PARAM #defines
  • add %lex-param and %parse-param directives
  • change all uses of void* pctx to WsCompiler* compiler
  • remove unnecessary casts from void* to WsCompiler*
  • modify the declaration of yyerror and move the declaration below %union so that it will have access to YYLTYPE.