OPENVAS cmake fails. 'pcap_lookupdev' is deprecated

Building from git clones, OpenVAS cmake fails with:

Tips on how to resolve?

Hi @silverburn,

Thanks for report this.
Apparently, you are using a version of libpcap-dev >= 1.9.0, which deprecates pcap_lookupdev function.

As our reference system at this moment is Debian 9 (Stretch), which has libpcap-dev v1.8.1, and it is the same for Debian 10 (Buster), we do not consider this as critical, but this will be improved in future.

A workaround for this is to add in misc/CMakeLists.txt, line 75, the option -Wno-error=deprecated-declarations. The line should be now:

set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -Wno-error=deprecated-declarations ")

With this option, gcc will keep deprecated declarations as warnings instead of error.

3 Likes

Thanks!

Now cmakes, but fails on MAKE.

Hi @silverburn,
it is the same problem, but this time in the nasl lib. You should do the same in nasl/CMakeList.txt.

Remember that this is just a workaround.

1 Like

As an alternative you can also build the component with the -DCMAKE_BUILD_TYPE=RELEASE target like e.g.:

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE

Forgot to add update - these worked great!

WIP PR for a replacement seems to be available now:

HI@jjnicola,
On my side, the file misc/CMakeLists.txt is missing. any advice?

Hi @andreibo !

Just check/download the source code again, or check you are in the right directory. The file must be there.

1 Like