Wireshark-dev: Re: [Wireshark-dev] build wireshrk with lua5.2.4 source code :no luaL_openlibs
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Sat, 2 Dec 2017 18:13:32 -0500
On 12/02/2017 05:50 PM, Jeff Morriss wrote:
On 11/19/2017 01:39 AM, ????D?????? wrote:
[...]

?0?2?0?2?0?2?0?2?0?2?0?2?0?2 When I building wireshrk source code use ?Cwith-lua it show me the error message :

checking for library containing luaL_openlibs... no

configure: error: Lua support was requested, but is not available

?0?2?0?2?0?2?0?2?0?2?0?2?0?2 but I find the luaL_openlibs function in lualib.h

/* open all previous libraries */

LUALIB_API void (luaL_openlibs) (lua_State *L);

?0?2?0?2?0?2?0?2?0?2?0?2?0?2 And I use yum install lua-devel to fix these problem.but I want to know why I can not build wireshark with lua source code.

I see the same thing here; I get this at the end of config.log:

usr/local/lib/liblua.a(loadlib.o): In function `ll_loadfunc':
loadlib.c:(.text+0x742): undefined reference to `dlsym'
loadlib.c:(.text+0x789): undefined reference to `dlerror'
loadlib.c:(.text+0x7b6): undefined reference to `dlopen'
loadlib.c:(.text+0x82c): undefined reference to `dlerror'
/usr/local/lib/liblua.a(loadlib.o): In function `gctm':
loadlib.c:(.text+0x9c0): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status

liblua depends on libdl but it seems Wireshark's LDFLAGS no longer contains libdl (or something like that).

This change fixes it for me:

https://www.wireshark.org/lists/wireshark-dev/201711/msg00102.html

Er, that should be:

https://code.wireshark.org/review/24678

Also, I forgot to mention: I had to recompile Lua with -fPIC to get Wireshark to link with it. I think the Linux distros do that already but the Lua source tarball doesn't come with -fPIC...