Ancient libhiredis.so.0.13, is required by libgvm_util.so

Hello,

I was running older community version on Rocky Linux 8.9 and today I upgraded my distro to Rocky 9.3 and started upgrading process for greenbone community. I am stuck at gvmd where ancient library version is required.

The error is:

 make -j$(nproc)
[  5%] Built target gvm-pg-server
[  5%] Linking C executable gvmd
[ 11%] Building GMP documentation...
[ 11%] Built target doc-gmp
/usr/bin/ld: warning: libhiredis.so.0.13, needed by /usr/local/lib64/libgvm_util.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisConnectUnix'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisvCommand'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisConnect'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisAppendCommand'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisCommand'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisGetReply'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `freeReplyObject'
/usr/bin/ld: /usr/local/lib64/libgvm_util.so: undefined reference to `redisFree'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/gvmd.dir/build.make:738: src/gvmd] Error 1
make[1]: *** [CMakeFiles/Makefile2:152: src/CMakeFiles/gvmd.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

List of hiredis version installed

 dnf list installed hiredis-devel
Installed Packages
hiredis-devel.x86_64                                                                         1.0.2-1.el9    

It seems source code is referencing version that is not even available for download on el9?

Managed to fix it:

cd /usr/lib64
 ln -s libhiredis.so.1.0.0 libhiredis.so.0.13

As the title of this topic might confuse some readers in the future:

The Ancient libhiredis.so.0.13, is required by libgvm_util.so seems to be actually not really valid. To the best of my knowledge it seems that it was missed to rebuild the gvm-libs component after upgrading the distribution which is always required when using software components build from source. Otherwise libraries / binaries which are still linked against some older libraries (and which might not exist on the system anymore) are left behind on the system.

Instead of creating some symlinks the correct solution probably would be to rebuild all Greenbone Community Edition components and to make sure that no older ones are left behind which should solve this as well.

I am doing everything from scratch after distro upgrade. It seems greenbone 22.x version that I had previously was dependent on ancient library.

Actually the gvm-libs component on which the mentioned libgvm_util.so is part of is defining a dependency to hiredis>=0.10.1:

and uses whatever the system is currently providing.

This confirms the previous assumption, there has been some leftovers / old versions of the components in question which hasn’t been rebuild again after the distribution was upgraded and thus they had been linked to some older (now not existing anymore) libraries.

So the suggestion is still valid to rebuild all components from sources new which should solve this problem without using workarounds like creating symlinks.

1 Like