Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Build without LUA fails

From: Pascal Quantin <pascal@xxxxxxxxxxxxx>
Date: Thu, 19 Mar 2020 09:07:56 +0100


Le jeu. 19 mars 2020 à 08:54, Anders Broman <anders.broman@xxxxxxxxxxxx> a écrit :

 

 

From: Pascal Quantin <pascal@xxxxxxxxxxxxx>
Sent: den 17 mars 2020 10:13
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Cc: Anders Broman <anders.broman@xxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Build without LUA fails

 

Hi Anders,

 

Le mar. 17 mars 2020 à 10:02, Anders Broman via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> a écrit :

Hi,

Someone at work is trying to build without LUA and getting, from cmake:

 

:

- The following OPTIONAL packages have not been found:

 

* LIBSSH (required version >= 0.6), Library for implementing SSH clients, <https://www.libssh.org/>

   extcap remote SSH interfaces (sshdump, ciscodump)

* Systemd, System and Service Manager (libraries), <https://freedesktop.org/wiki/Software/systemd/>

  Support for systemd journal extcap interface (sdjournal)

* MaxMindDB, C library for the MaxMind DB file format, <https://github.com/maxmind/libmaxminddb>

   Support for GeoIP lookup

* SMI

* Minizip, C library for supporting zip/unzip functionality, <https://www.winimage.com/zLibDll/minizip.html>

   Support for profiles import/export

* BROTLI

* LZ4, LZ4 is lossless compression algorithm used in some protocol (CQL...), <http://www.lz4.org>

   LZ4 decompression in CQL and Kafka dissectors

* SNAPPY, A fast compressor/decompressor from Google, <https://google.github.io/snappy/>

   Snappy decompression in CQL and Kafka dissectors

* ZSTD (required version >= 1.0.0), A compressor/decompressor from Facebook providing better compression than Snappy at a cost of speed, <https://facebook.github.io/zstd/>

   Zstd decompression in Kafka dissector

* LUA (required version >= 5.1)

* SBC, Bluetooth low-complexity, subband codec (SBC) decoder, <https://git.kernel.org/pub/scm/bluetooth/sbc.git>

   Support for playing SBC codec in RTP player

* SPANDSP, a library of many DSP functions for telephony, <https://www.soft-switch.org>

   Support for G.722 and G.726 codecs in RTP player

* BCG729, G.729 decoder, <https://www.linphone.org/technical-corner/bcg729/overview>

   Support for G.729 codec in RTP player

* ILBC, iLBC decoder, <https://github.com/TimothyGu/libilbc>

   Support for iLBC codec in RTP player

* SpeexDSP, SpeexDSP is a patent-free, Open Source/Free Software DSP library, <https://www.speex.org/>

   RTP audio resampling

* Asciidoctor (required version >= 1.5):

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Please set them or make sure they are set and tested correctly in the CMake files:

LUA_INCLUDE_DIR

   used as include directory in directory ..Wireshark /epan

:

 

Any ideas?

 

Just a blind attmpt. Would th epatch below change something?

 

diff --git a/cmake/modules/FindLUA.cmake b/cmake/modules/FindLUA.cmake
index 2e5e8d476b..ea65b0f89e 100644
--- a/cmake/modules/FindLUA.cmake
+++ b/cmake/modules/FindLUA.cmake
@@ -84,7 +84,7 @@ find_package_handle_standard_args(LUA
   REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR LUA_VERSION_NUM
   VERSION_VAR   LUA_VERSION_NUM)
 
-IF(LUA_LIBRARY)
+IF(LUA_FOUND)
   SET( LUA_LIBRARIES "${LUA_LIBRARY}")
   SET( LUA_INCLUDE_DIRS ${LUA_INCLUDE_DIR} )
   if (WIN32)

Best regards,

Pascal.

 

That worked, thanks.


Note that the previous patch was incomplete. Lines 103 and 108 must be changed also. See https://code.wireshark.org/review/#/c/36494/

Best regards,
Pascal.