Ask Your Question
0

Install tshark 3.2 from sources with glib 2.32 compiled from sources

asked 2020-09-28 13:35:03 +0000

dan.visan gravatar image

updated 2020-09-28 14:24:24 +0000

I am trying to install tshark 3.2.3 from sources on a centos 6.10 server and i tried the steps in the tutorial: https://tshark.dev/setup/install/

However i have trouble at the cmake3 step:

cmake3 -DBUILD_wireshark=OFF /opt/wireshark-3.2.3/

CMake Error at /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find GLIB2: Found unsuitable version "2.28.8", but required is at least "2.32.0" (found /usr/lib64/libglib-2.0.so)

Call Stack (most recent call first):
/usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindGLIB2.cmake:106 (find_package_handle_standard_args)
CMakeLists.txt:1023 (find_package)

The problem is that CentOS 6.10 is really old and i can not install CLIB 2.32 using yum or the rpms. So i downloaded the glib source and tried to compile it also. For this i am doing the steps in this tutorial: http://www.linuxfromscratch.org/~thom...

wget http://ftp.gnome.org/pub/gnome/sources/glib/2.32/glib-2.32.2.tar.xz

tar xvf glib-2.32.2.tar.xz && cd glib-2.32.2

./configure --prefix=/opt/glib-2.32

make

make install

Glib is installed in /opt/glib-2.32 now but how do i tell cmake3 to use the compiled glib 2.32 instead of the old one installed on the server?

edit retag flag offensive close merge delete

Comments

(shooting in the dark here)
You might look through FindGLIB2.cmake to see how the search is done.
Example on stackoverflow using HINTS. Not sure if PATHS are processed in order. Maybe put or symbolic link your library under a directory before /usr/lib. (may have to do same with include files)

Chuckc gravatar imageChuckc ( 2020-09-28 16:32:22 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-03 08:31:24 +0000

dan.visan gravatar image

updated 2020-10-03 08:32:42 +0000

The solution was quite simple actually:

export PKG_CONFIG_PATH=/opt/glib-2.32.2

cmake3 uses pkg-config in order to find out if dependencies have the required versions (e.g pkg-config --modversion glib-2.0 for glib)

By exporting that variable i am telling pkg-config to look into /opt/glib-2.32.2 for files ending with the .pc extension. This way pkg-config will find the glib-2.0.pc file where it can find the path to my own installation of glib.

This resource was quite helpful: https://people.freedesktop.org/~dbn/p...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-09-28 13:35:03 +0000

Seen: 297 times

Last updated: Oct 03 '20