This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to build Wireshark with Lua built from source?

0

Hi

I am working on Fedora 22 and trying to build Wireshark with Lua enabled. The system has Lua 5.3 installed and there are dependencies on it, so I decided to build Lua 5.2.4 from source and link Wireshark against that.

I built Lua 5.2.4 in my home directory:

$ ls $HOME/Lua/lua-5.2.4/src/ | grep lua.h
lua.h
lua.hpp

but when I try to build Wireshark, the build system doesn't find Lua:

$ ./configure --with-lua=$HOME/Lua/lua-5.2.4/src/ | grep lua    
checking for the location of lua.h... not found    
configure: error: Lua support was requested, but is not available

What am I doing wrong please?

David

asked 16 Aug '16, 05:58

DavidA_2015's gravatar image

DavidA_2015
11669
accept rate: 50%


One Answer:

0

I didn't manage to solve this. However, by installing patch:

http://www.linuxfromscratch.org/patches/blfs/svn/wireshark-2.0.5-lua_5_3_1-1.patch

mentioned here:

http://www.linuxfromscratch.org/blfs/view/svn/basicnet/wireshark.html

using:

patch -p1 < wireshark-2.0.5-lua_5_3_1-1.patch

and then invoking:

./configure --with-lua

I succeeded in building Wireshark 2.0.5 with Lua 5.3.

answered 16 Aug '16, 07:03

DavidA_2015's gravatar image

DavidA_2015
11669
accept rate: 50%

FWIW this patch was considered and rejected for inclusion in Wireshark. See bug 10881 and change 8884.

(16 Aug '16, 14:43) JeffMorriss ♦

Thanks for your comment Jeff. The patch does seem to be working for me, but I note that it may be unreliable.

The bug link you specified suggests that the Lua detection code has been improved, but it's unclear to me whether those changes are included in 2.0.5.

The bottom line is that I'm unclear on how to get Wireshark 2.0.5 and Lua 5.2 installed on Fedora 22.

(17 Aug '16, 02:03) DavidA_2015

I took a look at our code for detecting Lua and it looks like it won't work to point it to a Lua build directory. In your example it won't find lua.h because it wants that file to be in, for example, $dir/include/lua.h.

So I'd guess that leaves you with 2 possibilities:

  1. Find a Fedora Lua (and -devel) package for Lua 5.2 or before. There's some discussion on bug 10881 that F24 has a compat-lua-devel package. Not sure about F20.
  2. (or) "make install" the Lua you built and point Wireshark's ./configure at the installed location.

It might be possible to make the configure script be able to pick up Lua from a non-installed location but it would require work--you could open a bug report if you want (if you do please reference this question and mention the bug number here--all for cross-referencing purposes).

(17 Aug '16, 13:37) JeffMorriss ♦