anubisthejackle / kali-openvas-install

OpenVAS / Greenbone Vulnerability Manager (GVM) 11 Install Script for Kali Linux
GNU General Public License v3.0
22 stars 11 forks source link

Errors when compiling gsa #9

Open MauJFernandez opened 4 years ago

MauJFernandez commented 4 years ago

I installed at first without noticing the 2020.1 requirement, and got a bunch of errors when compiling gsa, I tried debugging it but it's really out of my knowledge, so after some retries with no luck, I installed a fresh 2020.1, did the install but got the compilation errors once again, and got the brilliant idea of checking the version and surprise, got 2020.2, the first script this repo runs has a apt -y dist-upgrade which of course upgrades the Kali to 2020.2, so new kernel with Linux headers... So, I deleted the VM, started again fresh (all installs using the official VMWare images), commented that line out... aaand yes, got the same errors once again, here they are:

[ 16%] Building C object gsad/src/CMakeFiles/gsad.dir/gsad.c.o
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_unix_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2602:20: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2602 |     0, NULL, NULL, handler, http_handlers, MHD_OPTION_NOTIFY_COMPLETED,
      |                    ^~~~~~~
      |                    |
      |                    int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:71:
/usr/include/microhttpd.h:2425:1: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2425 | MHD_start_daemon (unsigned int flags,
      | ^~~~~~~~~~~~~~~~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2636:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2636 |     flags, port, NULL, NULL, handler, http_handlers,
      |                              ^~~~~~~
      |                              |
      |                              int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:71:
/usr/include/microhttpd.h:2425:1: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2425 | MHD_start_daemon (unsigned int flags,
      | ^~~~~~~~~~~~~~~~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_https_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2668:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2668 |     flags, port, NULL, NULL, &handle_request, http_handlers,
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:29,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:71:
/usr/include/microhttpd.h:2425:1: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2425 | MHD_start_daemon (unsigned int flags,
      | ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [gsad/src/CMakeFiles/gsad.dir/build.make:63: gsad/src/CMakeFiles/gsad.dir/gsad.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:261: gsad/src/CMakeFiles/gsad.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
talcye commented 4 years ago

I get the exact same issue, seems like an issue on Greenbone's side - https://github.com/greenbone/gsa/issues/2317 It was labeled as a bug on their repo so I assume it'll get fixed asap.

elekgeek commented 4 years ago

still not solved, I am stuck at gsa install step :D

8Cris1 commented 4 years ago

same error...

ghost commented 3 years ago

try with "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE (gs)"