hi,
i’m trying to build gvm but it is failing all the time.
I know there was previous topic on this, but i’ve tried everything stated in these topics without any success.
GVM versions
gsad: not installed
gvmd: failed install
openvas-scanner: not installed
**gvm-libs:**successfully installed
Environment
Operating system: Debian 11 Bullseye
Kernel: Linux dsrvvas01 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux
**Installation method / source:**Building 22.4 from Source - Greenbone Community Documentation
Environment variables
$PKG_CONFIG_PATH=/usr/lib/python3/dist-packages/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
$GVMD_VERSION=22.4.0
$GVM_LIBS_VERSION=22.4.0
$GVM_VERSION=22.4.0
gvm-libs was compiled and installed correctly. I’m following the above link line by line to the point.
Whatever i try i got the following messages with the cmake:
:~/build/gvmd$ cmake $SOURCE_DIR/gvmd-$GVMD_VERSION
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
-DCMAKE_BUILD_TYPE=Release
-DLOCALSTATEDIR=/var
-DSYSCONFDIR=/etc
-DGVM_DATA_DIR=/var
-DGVMD_RUN_DIR=/run/gvmd
-DOPENVAS_DEFAULT_SOCKET=/run/ospd/ospd-openvas.sock
-DGVM_FEED_LOCK_PATH=/var/lib/gvm/feed-update.lock
-DSYSTEMD_SERVICE_DIR=/lib/systemd/system
-DLOGROTATE_DIR=/etc/logrotate.d
– Configuring Greenbone Vulnerability Manager…
– The C compiler identification is GNU 10.2.1
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.2”)
– Could NOT find Git (missing: GIT_EXECUTABLE)
– Install prefix: /usr/local
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Checking for module ‘libgvm_base>=22.4’
– No package ‘libgvm_base’ found
CMake Error at /usr/share/cmake-3.18/Modules/FindPkgConfig.cmake:545 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.18/Modules/FindPkgConfig.cmake:733 (_pkg_check_modules_internal)
src/CMakeLists.txt:29 (pkg_check_modules)– Configuring incomplete, errors occurred!
See also “/home/zargos/build/gvmd/CMakeFiles/CMakeOutput.log”.
See also “/home/zargos/build/gvmd/CMakeFiles/CMakeError.log”.In the CMakeError.log:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/zargos/build/gvmd/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/gmake cmTC_13ce5/fast && /usr/bin/gmake -f CMakeFiles/cmTC_13ce5.dir/build.make CMakeFiles/cmTC_13ce5.dir/build
gmake[1] : on entre dans le répertoire « /home/zargos/build/gvmd/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_13ce5.dir/src.c.o
/usr/bin/cc -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_13ce5.dir/src.c.o -c /home/zargos/build/gvmd/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_13ce5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_13ce5.dir/link.txt --verbose=1
/usr/bin/cc -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_13ce5.dir/src.c.o -o cmTC_13ce5
/usr/bin/ld : CMakeFiles/cmTC_13ce5.dir/src.c.o : dans la fonction « main » :
src.c:(.text+0x2f) : référence indéfinie vers « pthread_create »
/usr/bin/ld : src.c:(.text+0x3b) : référence indéfinie vers « pthread_detach »
/usr/bin/ld : src.c:(.text+0x47) : référence indéfinie vers « pthread_cancel »
/usr/bin/ld : src.c:(.text+0x58) : référence indéfinie vers « pthread_join »
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_13ce5.dir/build.make:106 : cmTC_13ce5] Erreur 1
gmake[1] : on quitte le répertoire « /home/zargos/build/gvmd/CMakeFiles/CMakeTmp »
gmake: *** [Makefile:140 : cmTC_13ce5/fast] Erreur 2Source file was:
#include <pthread.h>void* test_func(void* data)
{
return data;
}int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);return 0;
}Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/zargos/build/gvmd/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/gmake cmTC_f31ec/fast && /usr/bin/gmake -f CMakeFiles/cmTC_f31ec.dir/build.make CMakeFiles/cmTC_f31ec.dir/build
gmake[1] : on entre dans le répertoire « /home/zargos/build/gvmd/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_f31ec.dir/CheckFunctionExists.c.o
/usr/bin/cc -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_f31ec.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_f31ec
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f31ec.dir/link.txt --verbose=1
/usr/bin/cc -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_f31ec.dir/CheckFunctionExists.c.o -o cmTC_f31ec -lpthreads
/usr/bin/ld : ne peut trouver -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_f31ec.dir/build.make:106 : cmTC_f31ec] Erreur 1
gmake[1] : on quitte le répertoire « /home/zargos/build/gvmd/CMakeFiles/CMakeTmp »
gmake: *** [Makefile:140 : cmTC_f31ec/fast] Erreur 2