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

Lua doesn’t appear in the menu although wireshark is built with –with-lua

0

Hello,

I'm quite new at wireshark and I have built wireshark from the source on my ubuntu 13.10 (64bits). All went fine, but when I start wireshark, I do not see the "LUA" support added into the menu. I have built wireshark 1.8.11 with "--with-lua".

Any idea why?

Thanks in advance, /maghrebi

asked 08 Dec '13, 07:05

maghrebi's gravatar image

maghrebi
1111
accept rate: 0%


2 Answers:

0

What is the output of

grep LUA config.status

It should look similar to this

S["HAVE_LIBLUA_FALSE"]="#"
S["HAVE_LIBLUA_TRUE"]=""
S["LUA_INCLUDES"]="-I/usr/include/lua5.1"
S["LUA_LIBS"]=" -llua5.1 -lm"
D["HAVE_LUA5_1_LUA_H"]=" 1"
D["HAVE_LUA5_1_LUALIB_H"]=" 1"
D["HAVE_LUA5_1_LAUXLIB_H"]=" 1"
D["HAVE_LUA5_1_LUA_H"]=" 1"
D["HAVE_LUA5_1_LUALIB_H"]=" 1"
D["HAVE_LUA5_1_LAUXLIB_H"]=" 1"
D["HAVE_LUA5_1_LUA_H"]=" 1"
D["HAVE_LUA5_1_LUALIB_H"]=" 1"
D["HAVE_LUA5_1_LAUXLIB_H"]=" 1"
D["HAVE_LUA"]=" 1"

If it does not, you probably did not install the Lua development package.

apt-get install liblua5.1-0-dev

'liblua5.1-0-dev' might be named differently on Ubuntu 13.10. In that case, try to find it with "apt-cache search".

BTW: What is the output of

wireshark -v

Regards
Kurt

answered 08 Dec '13, 10:23

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

Hello,

Thanks Kurt for the quick feedback. The version I have is shown below:

=======================================================================================

wireshark 1.8.11 (SVN Rev Unknown from unknown)

Copyright 1998-2013 Gerald Combs [email protected] and contributors. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GTK+ 2.24.20, with Cairo 1.12.16, with Pango 1.32.5, with GLib 2.38.1, with libpcap, with libz 1.2.8, without POSIX capabilities, without SMI, without c-ares, without ADNS, with Lua 5.1, with Python 2.7.5+, without GnuTLS, without Gcrypt, without Kerberos, without GeoIP, without PortAudio, with AirPcap.

Running on Linux 3.11.0-14-generic, with locale en_US.UTF-8, with libpcap version 1.4.0, with libz 1.2.8, without AirPcap.

Built using gcc 4.8.1.

=======================================================================================

I also checked and I have liblua5.1.0-dev installed.

When doing "grep LUA config.status, I get the following which looks like yours:

===================================================

S["HAVE_LIBLUA_FALSE"]="#" S["HAVE_LIBLUA_TRUE"]="" S["LUA_INCLUDES"]="-I/usr/include/lua5.1" S["LUA_LIBS"]=" -llua5.1 -lm" D["HAVE_LUA5_1_LUA_H"]=" 1" D["HAVE_LUA5_1_LUALIB_H"]=" 1" D["HAVE_LUA5_1_LAUXLIB_H"]=" 1" D["HAVE_LUA5_1_LUA_H"]=" 1" D["HAVE_LUA5_1_LUALIB_H"]=" 1" D["HAVE_LUA5_1_LAUXLIB_H"]=" 1" D["HAVE_LUA5_1_LUA_H"]=" 1" D["HAVE_LUA5_1_LUALIB_H"]=" 1" D["HAVE_LUA5_1_LAUXLIB_H"]=" 1" D["HAVE_LUA_5_1"]=" 1"

===================================================

I'm not sure what could be the problem.

Any more things to check?

Best regards, Maghrebi

(11 Dec '13, 04:44) maghrebi

O.K. your binary is built with Lua support.

So, what exactly is missing in the GUI?

Besides the menu

Tools -> Lua

there is no other menu item for Lua. Do you see Tools -> Lua ?

(11 Dec '13, 04:48) Kurt Knochner ♦

Hello,

That is the problem. Under Tools-> I do not see Lua.

Best regards,

(11 Dec '13, 09:27) maghrebi

O.K., strange... what happens if you compile 1.10.x vor 1.11.x??

(11 Dec '13, 09:53) Kurt Knochner ♦

Hello,

I just built 1.11.2 and I still cannot see Tools-> Lua.

It seems very strange.

Best regards

(11 Dec '13, 11:01) maghrebi

Can you please post a screenshot with the opened Tools menu?

(11 Dec '13, 11:24) Kurt Knochner ♦

BTW: Just an idea: are you starting an older (or different) version of Wireshark unintentionally, instead of your own build? Please check: Help -> About in GUI were Tools -> Lua is missing.

(11 Dec '13, 13:19) Kurt Knochner ♦

Hello,

I made sure that I start wireshark from my build (./wireshark). I have taken a screenshot for Tools. There seems to be nothing there. Also, if I check what my wireshark has, it says with Lua5.2

============================================================================

Compiled (64-bit) with GTK+ 3.8.6, with Cairo 1.12.16, with Pango 1.32.5, with GLib 2.38.1, with libpcap, with libz 1.2.8, without POSIX capabilities, without libnl, without SMI, without c-ares, without ADNS, with Lua 5.2, without Python, without GnuTLS, without Gcrypt, without Kerberos, without GeoIP, without PortAudio, with AirPcap.

============================================================================

This last trial was done on a freshly new build dir.

Best regards, Chafik

(12 Dec '13, 23:24) maghrebi

see my other answer for the solution.

Hint: If a supplied answer resolves your question can you please "accept" it by clicking the checkmark icon next to it. This highlights good answers for the benefit of subsequent users with the same or similar questions. For extra points you can up vote the answer (thumb up).

(13 Dec '13, 04:26) Kurt Knochner ♦
showing 5 of 9 show 4 more comments

0

I made sure that I start wireshark from my build (./wireshark)

O.K. I've found the problem. init.lua will not be loaded if you start Wireshark from the build directory, even if you run Wireshark with the following environment variable set

WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 ./wireshark

Within init.lua the file console.lua gets called, which does the menu registration

    register_menu("Lua/Evaluate", evaluate_lua, MENU_TOOLS_UNSORTED)
    register_menu("Lua/Console", run_console, MENU_TOOLS_UNSORTED)
    register_menu("Lua/Manual", ref_manual, MENU_TOOLS_UNSORTED)
    register_menu("Lua/Wiki", wiki_page, MENU_TOOLS_UNSORTED)

If you install Wireshark (make install) everything will work as expected.

Hint: I had to run the following command, because libwiretap was not found after make install.

sudo ldconfig

I'm not sure if there is an easy way to run Wireshark from the build directory, including the Lua initialization.

Regards
Kurt

answered 13 Dec '13, 04:25

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 13 Dec '13, 06:49

Hello Kurt,

I tried several times the following but still no success in getting the Lua to show up in Tools:

./configure --with-lua make sudo make install

Best regards,

(18 Dec '13, 12:29) maghrebi

How did you start Wireshark after 'make install'?

(18 Dec '13, 13:43) Kurt Knochner ♦