Wireshark-dev: Re: [Wireshark-dev] Wireshark does not build on Ubunty 18.04 with LZ4 (to old ve

From: Pascal Quantin <pascal@xxxxxxxxxxxxx>
Date: Tue, 7 Sep 2021 17:15:01 +0200
Hi Anders,

Le mar. 7 sept. 2021 à 14:33, Anders Broman via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> a écrit :

Hi,

Build fails complaining on 

wiretap/file_wrappers.c:199:5 error: unknown type name ‘LZ4F_dctx’

 

As far as I understand in the older package it uses LZ4F_dctx_s

Should we require a higher version of the LZ4 library?


Rather than requiring a higher version of LZ4 (that is also used by CQL and Kafka dissectors), I guess we could check the LZ4 version found in file_wrappers.c. What do you think ?

Cheers,
Pascal.

 

 

Do we need something like this: (https://github.com/facebook/hhvm/blob/master/CMake/FindLZ4.cmake)

# fb-mysql requires LZ4F_resetDecompressionContext() which was added in v1.8.0

if (LZ4_LIBRARY)

  include(CheckCSourceRuns)

  set(CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIR})

  set(CMAKE_REQUIRED_LIBRARIES ${LZ4_LIBRARY})

  check_c_source_runs("

#include <lz4.h>

int main() {

  int good = (LZ4_VERSION_MAJOR > 1) ||

    ((LZ4_VERSION_MAJOR == 1) && (LZ4_VERSION_MINOR >= 8));

return !good;

}" LZ4_GOOD_VERSION)

  set(CMAKE_REQUIRED_INCLUDES)

  set(CMAKE_REQUIRED_LIBRARIES)

endif()

 

Best regards

Anders

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe