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

Wireshark-dev: [Wireshark-dev] Unable to cmake Wireshark on Red Hat 7 due to GLIB2 version erro

From: "Brodie, Mark (Refinitiv)" <mark.brodie@xxxxxxxxxxxxx>
Date: Thu, 30 Apr 2020 11:10:26 +0000

Hi there,

 

My wireshark build attempt fails during cmake when it checks the version of GLIB2.

 

-- Checking for one of the modules 'glib-2.0'

CMake Error at /opt/cmake-3.17.2-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):

  Could NOT find GLIB2: Found unsuitable version "", but required is at least

  "2.32.0" (found GLIB2_LIBRARY-NOTFOUND)

Call Stack (most recent call first):

  /opt/cmake-3.17.2-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:443 (_FPHSA_FAILURE_MESSAGE)

  cmake/modules/FindGLIB2.cmake:106 (find_package_handle_standard_args)

  CMakeLists.txt:1023 (find_package)

 

 

 

GLIB2 is installed with version 2.56.1:

 

sudo yum info glib2

Loaded plugins: rhnplugin

This system is receiving updates from RHN Classic or Red Hat Satellite.

Installed Packages

Name        : glib2

Arch        : x86_64

Version     : 2.56.1

Release     : 5.el7

Size        : 12 M

Repo        : installed

From repo   : fxspw-7-2002

Summary     : A library of handy utility functions

URL         : http://www.gtk.org

License     : LGPLv2+

Description : GLib is the low-level core library that forms the basis for projects

            : such as GTK+ and GNOME. It provides data structure handling for C,

            : portability wrappers, and interfaces for such runtime functionality

            : as an event loop, threads, dynamic loading, and an object system.

 

 

 

Here is the full output from cmake:

 

$ sudo cmake ../wireshark-3.2.3

-- The C compiler identification is GNU 4.8.5

-- The CXX compiler identification is GNU 4.8.5

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc - works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ - works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Generating build using CMake 3.17.2

-- CMake build type: RelWithDebInfo

-- V: 3.2.3, MaV: 3, MiV: 2, PL: 3, EV: .

-- Performing Test C_fexcess_precision_fast_VALID

-- Performing Test C_fexcess_precision_fast_VALID - Success

-- Performing Test C_Wall_VALID

-- Performing Test C_Wall_VALID - Success

-- Performing Test C_Wextra_VALID

-- Performing Test C_Wextra_VALID - Success

-- Performing Test C_Wendif_labels_VALID

-- Performing Test C_Wendif_labels_VALID - Success

-- Performing Test C_Wpointer_arith_VALID

-- Performing Test C_Wpointer_arith_VALID - Success

-- Performing Test C_Wformat_security_VALID

-- Performing Test C_Wformat_security_VALID - Success

-- Performing Test C_fwrapv_VALID

-- Performing Test C_fwrapv_VALID - Success

-- Performing Test C_fno_strict_overflow_VALID

-- Performing Test C_fno_strict_overflow_VALID - Success

-- Performing Test C_Wvla_VALID

-- Performing Test C_Wvla_VALID - Success

-- Performing Test C_Waddress_VALID

-- Performing Test C_Waddress_VALID - Success

-- Performing Test C_Wattributes_VALID

-- Performing Test C_Wattributes_VALID - Success

-- Performing Test C_Wdiv_by_zero_VALID

-- Performing Test C_Wdiv_by_zero_VALID - Success

-- Performing Test C_Wignored_qualifiers_VALID

-- Performing Test C_Wignored_qualifiers_VALID - Success

-- Performing Test C_Wpragmas_VALID

-- Performing Test C_Wpragmas_VALID - Success

-- Performing Test C_Wno_overlength_strings_VALID

-- Performing Test C_Wno_overlength_strings_VALID - Success

-- Performing Test C_Wno_long_long_VALID

-- Performing Test C_Wno_long_long_VALID - Success

-- Performing Test C_Wheader_guard_VALID

-- Performing Test C_Wheader_guard_VALID - Failed

-- Performing Test C_Wcomma_VALID

-- Performing Test C_Wcomma_VALID - Failed

-- Performing Test C_Wshorten_64_to_32_VALID

-- Performing Test C_Wshorten_64_to_32_VALID - Failed

-- Performing Test C_Wframe_larger_than_32768_VALID

-- Performing Test C_Wframe_larger_than_32768_VALID - Success

-- Performing Test C_Wc___compat_VALID

-- Performing Test C_Wc___compat_VALID - Success

-- Performing Test C_Wunused_const_variable_VALID

-- Performing Test C_Wunused_const_variable_VALID - Failed

-- Performing Test C_Wshadow_VALID

-- Performing Test C_Wshadow_VALID - Success

-- Performing Test C_Wold_style_definition_VALID

-- Performing Test C_Wold_style_definition_VALID - Success

-- Performing Test C_Wstrict_prototypes_VALID

-- Performing Test C_Wstrict_prototypes_VALID - Success

-- Performing Test C_Wlogical_op_VALID

-- Performing Test C_Wlogical_op_VALID - Success

-- Performing Test C_Wjump_misses_init_VALID

-- Performing Test C_Wjump_misses_init_VALID - Success

-- Performing Test C_Werror_implicit_VALID

-- Performing Test C_Werror_implicit_VALID - Success

-- Performing Test C_Wno_missing_braces_VALID

-- Performing Test C_Wno_missing_braces_VALID - Success

-- Performing Test C_Wno_pointer_sign_VALID

-- Performing Test C_Wno_pointer_sign_VALID - Success

-- Performing Test CXX_fexcess_precision_fast_VALID

-- Performing Test CXX_fexcess_precision_fast_VALID - Success

-- Performing Test CXX_Wall_VALID

-- Performing Test CXX_Wall_VALID - Success

-- Performing Test CXX_Wextra_VALID

-- Performing Test CXX_Wextra_VALID - Success

-- Performing Test CXX_Wendif_labels_VALID

-- Performing Test CXX_Wendif_labels_VALID - Success

-- Performing Test CXX_Wpointer_arith_VALID

-- Performing Test CXX_Wpointer_arith_VALID - Success

-- Performing Test CXX_Wformat_security_VALID

-- Performing Test CXX_Wformat_security_VALID - Success

-- Performing Test CXX_fwrapv_VALID

-- Performing Test CXX_fwrapv_VALID - Success

-- Performing Test CXX_fno_strict_overflow_VALID

-- Performing Test CXX_fno_strict_overflow_VALID - Success

-- Performing Test CXX_Wvla_VALID

-- Performing Test CXX_Wvla_VALID - Success

-- Performing Test CXX_Waddress_VALID

-- Performing Test CXX_Waddress_VALID - Success

-- Performing Test CXX_Wattributes_VALID

-- Performing Test CXX_Wattributes_VALID - Success

-- Performing Test CXX_Wdiv_by_zero_VALID

-- Performing Test CXX_Wdiv_by_zero_VALID - Success

-- Performing Test CXX_Wignored_qualifiers_VALID

-- Performing Test CXX_Wignored_qualifiers_VALID - Success

-- Performing Test CXX_Wpragmas_VALID

-- Performing Test CXX_Wpragmas_VALID - Success

-- Performing Test CXX_Wno_overlength_strings_VALID

-- Performing Test CXX_Wno_overlength_strings_VALID - Success

-- Performing Test CXX_Wno_long_long_VALID

-- Performing Test CXX_Wno_long_long_VALID - Success

-- Performing Test CXX_Wheader_guard_VALID

-- Performing Test CXX_Wheader_guard_VALID - Failed

-- Performing Test CXX_Wcomma_VALID

-- Performing Test CXX_Wcomma_VALID - Failed

-- Performing Test CXX_Wshorten_64_to_32_VALID

-- Performing Test CXX_Wshorten_64_to_32_VALID - Failed

-- Performing Test CXX_Wframe_larger_than_32768_VALID

-- Performing Test CXX_Wframe_larger_than_32768_VALID - Success

-- Performing Test CXX_Wextra_semi_VALID

-- Performing Test CXX_Wextra_semi_VALID - Failed

-- Performing Test C_fmacro_prefix_map_old_new_VALID

-- Performing Test C_fmacro_prefix_map_old_new_VALID - Failed

-- Performing Test CXX_fmacro_prefix_map_old_new_VALID

-- Performing Test CXX_fmacro_prefix_map_old_new_VALID - Failed

-- Performing Test FVHIDDEN

-- Performing Test FVHIDDEN - Success

-- Performing Test LINK_Wl___as_needed_VALID

-- Performing Test LINK_Wl___as_needed_VALID - Success

-- Linker flags:  -Wl,--as-needed

-- Found Git: /usr/bin/git (found version "1.8.3.1")

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")

-- Checking for one of the modules 'glib-2.0'

CMake Error at /opt/cmake-3.17.2-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):

  Could NOT find GLIB2: Found unsuitable version "", but required is at least

  "2.32.0" (found GLIB2_LIBRARY-NOTFOUND)

Call Stack (most recent call first):

  /opt/cmake-3.17.2-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:443 (_FPHSA_FAILURE_MESSAGE)

  cmake/modules/FindGLIB2.cmake:106 (find_package_handle_standard_args)

  CMakeLists.txt:1023 (find_package)

 

 

-- Configuring incomplete, errors occurred!

See also "/export/home/u8002465/wireshark_dev/build/CMakeFiles/CMakeOutput.log".

See also "/export/home/u8002465/wireshark_dev/build/CMakeFiles/CMakeError.log".