Can't compile gvm-libs 21.04

GVM versions

gsad: (‘21.04’)
gvmd: (‘21.04’)
openvas-scanner: (‘21.04’)
gvm-libs: (‘21.04’)

Environment

Operating system: Debian Buster
Kernel: (‘uname -a’) 4.19.0-16-amd64
Installation method / source: Donwload via git; follow the compile steps
export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm …
make
make doc
make install

Hi

I receive an Error while compile that it could not find utils.c.o

Blockquote
– Configuring the Greenbone Vulnerability Management Libraries…
– The C compiler identification is GNU 8.3.0
– 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
– Found Git: /usr/bin/git (found version “2.20.1”)
– Looking for clang-format…
– Looking for clang-format… /usr/bin/clang-format
– Using redis socket /run/redis/redis.sock
– Install prefix: /opt/gvm
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29”)
– Checking for module ‘glib-2.0>=2.42’
– Found glib-2.0, version 2.58.3
– Looking for libnet…
– Looking for net… /usr/lib/x86_64-linux-gnu/libnet.so
– Looking for libnet-config…
– Looking for libnet-config… /usr/bin/libnet-config
– Looking for pcap…
– Looking for pcap… /usr/lib/x86_64-linux-gnu/libpcap.so
– Looking for pcap-config…
– Looking for pcap-config… /usr/bin/pcap-config
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– 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 ‘zlib>=1.2.8’
– Found zlib, version 1.2.11
– Checking for module ‘gio-2.0>=2.42’
– Found gio-2.0, version 2.58.3
– Checking for module ‘gnutls>=3.2.15’
– Found gnutls, version 3.6.7
– Checking for module ‘uuid>=2.25.0’
– Found uuid, version 2.33.1
– Checking for module ‘libssh>=0.6.0’
– Found libssh, version 0.8.7
– Checking for module ‘hiredis>=0.10.1’
– Found hiredis, version 0.14.0
– Checking for module ‘libxml-2.0>=2.0’
– Found libxml-2.0, version 2.9.4
– Looking for gpgme…
– Found gpgme: /usr/lib/x86_64-linux-gnu/libgpgme.so, version 1.12.0
– Looking for libcrypt…
– Looking for libcrypt… /usr/lib/x86_64-linux-gnu/libcrypt.so
– Looking for libgcrypt…
– Looking for libgcrypt… /usr/lib/x86_64-linux-gnu/libgcrypt.so
– Looking for freeradius-client library…
– Looking for radcli library…
– Found /usr/lib/x86_64-linux-gnu/libradcli.so - radius support enabled
– Looking for libldap…
– Found /usr/lib/x86_64-linux-gnu/libldap.so - ldap support enabled
– Found Doxygen: /usr/bin/doxygen (found version “1.8.13”) found components: doxygen dot
– Configuring done
– Generating done
– Build files have been written to: /opt/gvm/src/gvm-libs/build
Scanning dependencies of target gvm_base_shared
[ 2%] Building C object base/CMakeFiles/gvm_base_shared.dir/array.c.o
[ 4%] Building C object base/CMakeFiles/gvm_base_shared.dir/credentials.c.o
[ 7%] Building C object base/CMakeFiles/gvm_base_shared.dir/cvss.c.o


[ 54%] Building C object boreas/CMakeFiles/gvm_boreas_shared.dir/sniffer.c.o
[ 57%] Building C object boreas/CMakeFiles/gvm_boreas_shared.dir/util.c.o
[ 59%] Linking C shared library libgvm_boreas.so
cc: error: CMakeFiles/gvm_boreas_shared.dir/util.c.o: Datei oder Verzeichnis nicht gefunden
make[2]: *** [boreas/CMakeFiles/gvm_boreas_shared.dir/build.make:189: boreas/libgvm_boreas.so.21.4.4~dev1~git-df7f1fb-stable] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:315: boreas/CMakeFiles/gvm_boreas_shared.dir/all] Fehler 2
make: *** [Makefile:152: all] Fehler 2
Scanning dependencies of target doc
[ 50%] Generating .built-html
Notice: Output directory `/opt/gvm/src/gvm-libs/build/doc/generated’ does not exist. I have created it for you.
Searching for include files…
Searching for example files…


Generating example index…
finalizing index lists…
writing tag file…
lookup cache used 1289/65536 hits=6664 misses=1328
finished…
[100%] Building documentation…
[100%] Built target doc
[ 38%] Built target gvm_base_shared
[ 40%] Building C object boreas/CMakeFiles/gvm_boreas_shared.dir/util.c.o
[ 42%] Linking C shared library libgvm_boreas.so
cc: error: CMakeFiles/gvm_boreas_shared.dir/util.c.o: Datei oder Verzeichnis nicht gefunden
make[2]: *** [boreas/CMakeFiles/gvm_boreas_shared.dir/build.make:189: boreas/libgvm_boreas.so.21.4.4~dev1~git-df7f1fb-stable] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:315: boreas/CMakeFiles/gvm_boreas_shared.dir/all] Fehler 2
make: *** [Makefile:152: all] Fehler 2

I’ve checked all dependency’s seems okay for me (could provide Apt List --installed but not able to upload files)

What is going wrong.

on the same System I’ve compiled 20.08.00 and 20.08.02 it works fine.

regards

Uli

Hello @uli-fischer,

Please download the latest gvmd-libs, from Release gvm-libs 21.4.3 · greenbone/gvm-libs · GitHub

and continue by this Building GVM 21.04 — Greenbone Documentation documentation guide.

This guide describes how to install all components of Greenbone Openvas.

Unfortunately, the log is not completed, then is not visible, which dependency is not installed, otherwise, the guide has sufficiently described which dependency should be installed first.

With your mentioned Debian version should not be any trouble.

Hey @uli-fischer

for every update you have to read through the release notes for every component.

There you would have noticed that you have to use a different command for compiling.

Try this one:
cmake -DCMAKE_INSTALL_PREFIX="/opt/gvm" -DSYSCONFDIR="/opt/gvm/etc" -DLOCALSTATEDIR="/opt/gvm/var" -DGVM_RUN_DIR="/opt/gvm/var/run" -DGVM_PID_DIR="/opt/gvm/var/run" -DSYSTEMD_SERVICE_DIR="/opt/gvm/lib/systemd/system" …

instead of your cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm …

Small hint: for some other components there are similar changes required.
As already mentioned: read through every release note.

Best regards

1 Like

Hi All
Thanks for help. The Hint on the documentation and the complete cmake helps.
I found out that my problem is a not up to date System. :frowning:
After performing apt update ; apt upgrade and reinstall all dependency’s from the install guide and do a apt autoremove everything works fine.

Best regards