Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 215331

Summary: imapfilter-2.0.9 does not compile with lua-5.1.3
Product: Gentoo Linux Reporter: Tâm <tam>
Component: Current packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mabi, tam
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tâm 2008-03-29 15:09:20 UTC
I got a compilation error when linking imapfilter:

cc -o imapfilter  -L/usr/local/lib auth.o buffer.o cert.o core.o file.o imap.o imapfilter.o list.o log.o lua.o memory.o misc.o namespace.o pcre.o regexp.o request.o response.o session.o signal.o socket.o system.o -lm -llua -lpcre -lssl -lcrypto
core.o: In function `luaopen_ifcore':
core.c:(.text+0x23): undefined reference to `luaL_openlib'
pcre.o: In function `luaopen_ifre':
pcre.c:(.text+0x23): undefined reference to `luaL_openlib'
system.o: In function `luaopen_ifsys':
system.c:(.text+0x23): undefined reference to `luaL_openlib'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [imapfilter] Erreur 1

The solution seems to be to replace the call to luaL_openlib() with luaL_register(). luaL_register needs only the 3 first args, so we need to remove the last one.
It works for me, but maybe I miss something...
Don't have time to submit a patch, but there are only 3 calls to luaL_openlib().

Regards
Comment 1 Holger Hoffstätte 2008-04-29 20:13:12 UTC
duplicate; see http://bugs.gentoo.org/show_bug.cgi?id=212192 for updated ebuild with patch.
Comment 2 Tobias Scherbaum (RETIRED) gentoo-dev 2008-06-14 18:30:11 UTC

*** This bug has been marked as a duplicate of bug 212192 ***