I am following this instruction to build Community Edition from source. Everything went well until openvas-scanner.
-- Build files have been written to: /home/user99/tmp/gvm/build/openvas-scanner
[ 19%] Built target openvas_misc_shared
[ 79%] Built target openvas_nasl_shared
[ 81%] Built target openvas-nasl
[ 83%] Built target openvas-nasl-lint
[ 85%] Linking C executable openvas
/usr/bin/ld: CMakeFiles/openvas.dir/attack.c.o: in function `attack_host':
attack.c:(.text+0x458): undefined reference to `setproctitle'
/usr/bin/ld: CMakeFiles/openvas.dir/nasl_plugins.c.o: in function `nasl_thread':
nasl_plugins.c:(.text+0x8e): undefined reference to `setproctitle'
/usr/bin/ld: CMakeFiles/openvas.dir/openvas.c.o: in function `openvas':
openvas.c:(.text+0x5a1): undefined reference to `setproctitle_init'
/usr/bin/ld: CMakeFiles/openvas.dir/pluginload.c.o: in function `plugins_init':
pluginload.c:(.text+0x525): undefined reference to `setproctitle'
/usr/bin/ld: pluginload.c:(.text+0x5b9): undefined reference to `setproctitle'
/usr/bin/ld: pluginload.c:(.text+0x5ec): undefined reference to `setproctitle'
/usr/bin/ld: pluginload.c:(.text+0x61a): undefined reference to `setproctitle'
collect2: error: ld returned 1 exit status
OS: Debian Bookworm
Package libbsd-dev is installed and /usr/lib/x86_64-linux-gnu/libbsd.so exists.
-rw-r--r-- 1 root root 161540 Jan 30 2023 /usr/lib/x86_64-linux-gnu/libbsd.a
-rw-r--r-- 1 root root 1164 Jan 30 2023 /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
-rw-r--r-- 1 root root 170 Jan 30 2023 /usr/lib/x86_64-linux-gnu/libbsd.so
lrwxrwxrwx 1 root root 16 Jan 30 2023 /usr/lib/x86_64-linux-gnu/libbsd.so.0 -> libbsd.so.0.11.7
-rw-r--r-- 1 root root 84840 Jan 30 2023 /usr/lib/x86_64-linux-gnu/libbsd.so.0.11.7
cat /usr/lib/x86_64-linux-gnu/libbsd.so
/* GNU ld script
* The MD5 functions are provided by the libmd library. */
OUTPUT_FORMAT(elf64-x86-64)
GROUP(/usr/lib/x86_64-linux-gnu/libbsd.so.0.11.7 AS_NEEDED(-lmd))
This linking problem persists with version 2024-09-05.
Command cmake .. produces the following messages.
-- Configuring the Scanner...
-- The C compiler identification is GNU 12.2.0
-- 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 Git: /usr/bin/git (found version "2.39.2")
-- Looking for clang-format...
-- Looking for clang-format... /usr/bin/clang-format
Set LIBDIR to /usr/local/lib
-- Install prefix: /usr/local
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for module 'glib-2.0>=2.42'
-- Found glib-2.0, version 2.74.6
-- Checking for module 'json-glib-1.0>=1.4.4'
-- Found json-glib-1.0, version 1.6.6
-- Checking for module 'gnutls>=3.6.4'
-- Found gnutls, version 3.7.9
-- Checking for module 'libcurl>=7.74.0'
-- Found libcurl, version 7.88.1
-- Checking for module 'libgvm_base>=22.4'
-- Found libgvm_base, version 22.11.0
-- Checking for module 'libgvm_util>=22.4'
-- Found libgvm_util, version 22.11.0
-- Checking for module 'libgvm_boreas>=22.4'
-- Found libgvm_boreas, version 22.11.0
-- Checking for module 'libopenvas_wmiclient>=1.0.5'
-- Package 'libopenvas_wmiclient', required by 'virtual:world', not found
-- 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 gpgme...
-- Looking for gpgme... /usr/lib/x86_64-linux-gnu/libgpgme.so
-- Checking for module 'gio-2.0'
-- Found gio-2.0, version 2.74.6
-- Checking for module 'gnutls>=3.2.15'
-- Found gnutls, version 3.7.9
-- Checking for module 'libopenvas_wmiclient>=1.0.5'
-- Package 'libopenvas_wmiclient', required by 'virtual:world', not found
-- Checking for module 'libssh>=0.6.0'
-- Found libssh, version 0.10.6
-- Checking for module 'ksba>=1.0.7'
-- Found ksba, version 1.6.3
-- Looking for pcap...
-- Checking for module 'gpgme'
-- Found gpgme, version 1.18.0
-- Looking for netsnmp...
-- Looking for netsnmp... /usr/lib/x86_64-linux-gnu/libnetsnmp.so
-- Looking for libgcrypt...
-- Checking for module 'libgcrypt'
-- Found libgcrypt, version 1.10.1
-- Looking for bison...
-- Found BISON: /usr/bin/bison (found suitable version "3.8.2", minimum required is "2.5")
-- Checking for module 'libbsd'
-- Found libbsd, version 0.11.7
-- Looking for libgcrypt...
-- 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
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.4") found components: doxygen dot
-- WARNING: pandoc is required to build the HTML user manual.
-- Configuring done
-- Generating done
-- Build files have been written to: /root/src/gvm/openvas-scanner/build
Command make produces below messages.
[ 97%] Building C object src/CMakeFiles/openvas.dir/processes.c.o
[ 98%] Building C object src/CMakeFiles/openvas.dir/sighand.c.o
[ 98%] Building C object src/CMakeFiles/openvas.dir/utils.c.o
[100%] Linking C executable openvas
/usr/bin/ld: CMakeFiles/openvas.dir/attack.c.o: in function `attack_host':
/root/src/gvm/openvas-scanner/src/attack.c:572: undefined reference to `setproctitle'
/usr/bin/ld: CMakeFiles/openvas.dir/nasl_plugins.c.o: in function `nasl_thread':
/root/src/gvm/openvas-scanner/src/nasl_plugins.c:206: undefined reference to `setproctitle'
/usr/bin/ld: CMakeFiles/openvas.dir/openvas.c.o: in function `openvas':
/root/src/gvm/openvas-scanner/src/openvas.c:497: undefined reference to `setproctitle_init'
/usr/bin/ld: CMakeFiles/openvas.dir/pluginload.c.o: in function `cleanup_leftovers':
/root/src/gvm/openvas-scanner/src/pluginload.c:222: undefined reference to `setproctitle'
/usr/bin/ld: CMakeFiles/openvas.dir/pluginload.c.o: in function `plugins_reload_from_dir':
/root/src/gvm/openvas-scanner/src/pluginload.c:285: undefined reference to `setproctitle'
/usr/bin/ld: /root/src/gvm/openvas-scanner/src/pluginload.c:301: undefined reference to `setproctitle'
/usr/bin/ld: /root/src/gvm/openvas-scanner/src/pluginload.c:312: undefined reference to `setproctitle'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/openvas.dir/build.make:291: src/openvas] Error 1
make[1]: *** [CMakeFiles/Makefile2:490: src/CMakeFiles/openvas.dir/all] Error 2
make: *** [Makefile:166: all] Error 2