Attack.c:1396: undefined reference to `gvm_duplicate_host'


Trying to compile latest stable release 21.4.3 of openvas-scanner on Ubuntu 18.04.3 LTS will give the following error:

[100%] Linking C executable openvas
CMakeFiles/openvas.dir/attack.c.o: In function attack_network': /opt/gvm/src/21.4.3-final/openvas-scanner-21.4.3/src/attack.c:1396: undefined reference to gvm_duplicate_host’
collect2: error: ld returned 1 exit status
src/CMakeFiles/openvas.dir/build.make:382: recipe for target ‘src/openvas’ failed
make[2]: *** [src/openvas] Error 1
CMakeFiles/Makefile2:543: recipe for target ‘src/CMakeFiles/openvas.dir/all’ failed
make[1]: *** [src/CMakeFiles/openvas.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

All others packages compiles without issues, in particular gvm-libs. So I don’t get what’s wrong here.

Any clue ?

Thanks !

Hi @tatooin,

Not sure why that’s happening and hopefully someone can jump in with insight.

Hi, as far as I can see this function got introduced with gvm-libs 21.4.3 gvm-libs/hosts.c at f02033a6bcb885c048d9830a3cbd30a597db01b8 · greenbone/gvm-libs · GitHub so it seems you are building against an older version.


I confirm, my gvm lib directory was mixing up with older versions. Purging the lib directory and reinstalling from scratch works without issues. Thanks !