在 CentOS 5.6 中编译 imapfilter 2.4.1 时出错
我正在尝试编译 imapfilter 2.4.1 ( https://github.com/lefcha/imapfilter ) CentOS 5.6。我相信我已经对所有依赖项进行了排序,但是当我运行 make 时,我得到:
make[1]: Entering directory `/home/src/imapfilter-2.4.1/src'
cc -Wall -O -DMAKEFILE_SHAREDIR='"/usr/local/share/imapfilter"' -c -o core.o core.c
core.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ifcorelib’
core.c: In function ‘ifcore_append’:
core.c:947: warning: implicit declaration of function ‘lua_strlen’
core.c: In function ‘luaopen_ifcore’:
core.c:1162: warning: implicit declaration of function ‘luaL_register’
core.c:1162: error: ‘ifcorelib’ undeclared (first use in this function)
core.c:1162: error: (Each undeclared identifier is reported only once
core.c:1162: error: for each function it appears in.)
make[1]: *** [core.o] Error 1
make[1]: Leaving directory `/home/src/imapfilter-2.4.1/src'
make: *** [all] Error 2
根据其他用户评论和文件修订日期,我确信这应该编译。我猜我在某个地方缺少图书馆。我将不胜感激我能得到的任何帮助。
I am trying to compile imapfilter 2.4.1 ( https://github.com/lefcha/imapfilter ) in CentOS 5.6. I believe I've got all the dependencies sorted but when I run make I get:
make[1]: Entering directory `/home/src/imapfilter-2.4.1/src'
cc -Wall -O -DMAKEFILE_SHAREDIR='"/usr/local/share/imapfilter"' -c -o core.o core.c
core.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ifcorelib’
core.c: In function ‘ifcore_append’:
core.c:947: warning: implicit declaration of function ‘lua_strlen’
core.c: In function ‘luaopen_ifcore’:
core.c:1162: warning: implicit declaration of function ‘luaL_register’
core.c:1162: error: ‘ifcorelib’ undeclared (first use in this function)
core.c:1162: error: (Each undeclared identifier is reported only once
core.c:1162: error: for each function it appears in.)
make[1]: *** [core.o] Error 1
make[1]: Leaving directory `/home/src/imapfilter-2.4.1/src'
make: *** [all] Error 2
Based on other user comments and file revision dates I am sure this should compile. I am guessing I'm missing a library somewhere. I'll appreciate any help I can get on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从第一条错误消息开始:
core.c 的第 41 行是:
来自 gcc 的隐秘消息意味着它对 luaL_reg 是什么一无所知,并且认为它是变量名。然后,当读取同一定义/声明中的第二个变量名称时,它会陷入恐慌。
luaL_reg
应该类似于 struct.所以,看来你的问题出在LUA开发头文件上。可能是你的 Lua 包太旧甚至太现代了。
imapfilter 的 github 自述文件说:
您确定您的 lua 是 5.1 并且 lua-devel (或任何其他带有 lua 标头的包)也是 5.1 吗?
Starting from first error message:
Line 41 of core.c is:
Cryptic message from gcc means that it knows nothing about what is the
luaL_reg
and it thinks that it is variable name. Then it goes into panic when reads second variable name in the same definition/declaration.luaL_reg
should be something like struct.So, it seems that your problems are located in LUA development headers. May be you have too old or even to modern Lua package.
The imapfilter's github's readme says:
Are you sure that your lua is 5.1 and the lua-devel (or any other package with lua headers) is 5.1 too?