Kannel在CentOS 7中发行问题

发布于 2025-01-27 09:39:29 字数 497 浏览 4 评论 0原文

我试图在CentOS 7中安装Kannel 1.4.5,但是当Run Make命令时,命令要低于错误。

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唐婉 2025-02-03 09:39:29

CentOS使用的野牛版本与此代码不兼容。根据关于此问题的错误报告

出现问题是因为野牛3不再支持yylex_param和yyparse_param。两者都是自2003年1月1日发布的1.875版本以来的弃用

不确定为什么它在最新版本中没有固定,但是您可以降级到野牛2.7或应用

  • 删除yylex_param和yyparse_param #defines
  • 添加%lex-param和%parse-param指令
  • 将void* pctx的所有用途更改为wscompiler*编译器
  • 将不必要的铸件从void*中删除到wscompiler*
  • 修改Yyerror的声明,并将声明移至%联盟以下,以便它可以访问Yyltype。

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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文