GVM 20.08 Building from Source, CMAKE Error

Hi,

I’m trying to Install GVM using the Source Code from Github, cmake of the gvm-lib fails:

– Configuring the Greenbone Vulnerability Management Libraries…
– The C compiler identification is GNU 9.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.25.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.1”)
– Checking for module ‘glib-2.0>=2.42’
– Found glib-2.0, version 2.64.6
– Looking for libnet…
– Looking for net… NET-NOTFOUND
CMake Error at boreas/CMakeLists.txt:31 (message):
The net library is required.

– Looking for libnet-config…
– libnet-config not found, using defaults…
– 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
– 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 ‘zlib>=1.2.8’
– Found zlib, version 1.2.11
– Checking for module ‘gio-2.0>=2.42’
– Found gio-2.0, version 2.64.6
– Checking for module ‘gnutls>=3.2.15’
– Found gnutls, version 3.6.13
– Checking for module ‘uuid>=2.25.0’
– Found uuid, version 2.34.0
– Checking for module ‘libssh>=0.6.0’
– Found libssh, version 0.9.3
– 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.10
– Looking for gpgme…
– Found gpgme: /usr/lib/x86_64-linux-gnu/libgpgme.so, version 1.13.1-unknown
– 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.17”) found components: doxygen dot
– Configuring incomplete, errors occurred!
See also “/tmp/gvm-source/gvm-libs/build/CMakeFiles/CMakeOutput.log”.
See also “/tmp/gvm-source/gvm-libs/build/CMakeFiles/CMakeError.log”.

Environment

**Operating system: ubuntu 20.04
**Installation method / source: Github repo

I suppose the problem is:

CMake Error at boreas/CMakeLists.txt:31 (message):
The net library is required.
and
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found

What Package do I need to Install to get the net lib? And what to do about PTHREAD? I have no clue about C, Googling didn’t work out for me.

kind regards
NetworkDude

1 Like

Hi @NetworkDude,
it seems you are using the unreleased branch 21.04 or master. The issue is not with pthreads, but with libnet. In the INSTALL.md is listed as requierement. Installing libnet1-dev should solve the problem.

2 Likes

Hi,
thanks, that helped alot! both assumptions were right, libnet1-dev was missing and i cloned the master branch accidentally - thank you!

1 Like

Thanks. This solution also helped successfully complete cmake for Linux Mint 20 from building https://github.com/greenbone/gvm-lib from source.

apt install libnet1-dev

1 Like