First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Install tshark 3.2 from sources with glib 2.32 compiled from sources

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?

dan.visan's avatar
1
dan.visan
asked 2020-09-28 13:35:03 +0000, updated 2020-09-28 14:24:24 +0000
edit flag offensive 0 remove flag 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's avatar Chuckc (2020-09-28 16:32:22 +0000) edit
add a comment see more comments

1 Answer

0

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...

dan.visan's avatar
1
dan.visan
answered 2020-10-03 08:31:24 +0000, updated 2020-10-03 08:32:42 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer