Closed Msec-hue closed 3 years ago
Same issue
@Msec-hue @8Cris1 As a workaround adding -DCMAKE_BUILD_TYPE=RELEASE
to the cmake ..
call should allow to build GSA.
@Msec-hue @8Cris1 As a workaround adding
-DCMAKE_BUILD_TYPE=RELEASE
to thecmake ..
call should allow to build GSA.
This is confirmed working using gsa-20.08 master and running ubuntu:devel as of today
The same option is needed to build it for CentOS 7. (Tested with 20.8.0 of gsa)
@Msec-hue @8Cris1 As a workaround adding
-DCMAKE_BUILD_TYPE=RELEASE
to thecmake ..
call should allow to build GSA.This is confirmed working using gsa-20.08 master and running ubuntu:devel as of today
Confirmed this resolves issue and allows build on Kali today.
This link has some information as to why this is happening on libmicrohttpd12 0.9.71-1
hi, during the build of the gsa i find the same error:
[ 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:2567:20: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2567 | 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:28,
from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: 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 **)’}
2428 | MHD_AccessHandlerCallback dh, void *dh_cls,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2601:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2601 | 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:28,
from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: 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 **)’}
2428 | MHD_AccessHandlerCallback dh, void *dh_cls,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_https_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2633:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2633 | 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:28,
from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: 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 **)’}
2428 | MHD_AccessHandlerCallback dh, void *dh_cls,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [gsad/src/CMakeFiles/gsad.dir/build.make:82: gsad/src/CMakeFiles/gsad.dir/gsad.c.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:394: gsad/src/CMakeFiles/gsad.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2
@brennnaaannn i don't understand how to solve this bug, can you help me? with kali. Thanks
@brennnaaannn i don't understand how to solve this bug, can you help me? with kali. Thanks
@othin87 It seems like the same error we have been mentioning in this thread. Have you added "-DCMAKE_BUILD_TYPE=RELEASE" to the cmake before re-attempting the build?
@brennnaaannn i don't understand how to solve this bug, can you help me? with kali. Thanks
@othin87 It seems like the same error we have been mentioning in this thread. Have you added "-DCMAKE_BUILD_TYPE=RELEASE" to the cmake before re-attempting the build?
you mean : gvm@KaliGVM20:~/src/gsa/build$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm .. ? i've done before launch make but i've the same problem
@brennnaaannn i don't understand how to solve this bug, can you help me? with kali. Thanks
@othin87 It seems like the same error we have been mentioning in this thread. Have you added "-DCMAKE_BUILD_TYPE=RELEASE" to the cmake before re-attempting the build?
you mean : gvm@KaliGVM20:~/src/gsa/build$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm .. ? i've done before launch make but i've the same problem
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE make make install
@brennnaaannn i don't understand how to solve this bug, can you help me? with kali. Thanks
@othin87 It seems like the same error we have been mentioning in this thread. Have you added "-DCMAKE_BUILD_TYPE=RELEASE" to the cmake before re-attempting the build?
you mean : gvm@KaliGVM20:~/src/gsa/build$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm .. ? i've done before launch make but i've the same problem
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE make make install
Thank you mate
This issue will be fixed with https://github.com/greenbone/gsa/pull/2625
Expected behavior
When installing GSA from the source installation, it should compile the source code.
Actual behavior
I get the below when reaching the 7% mark, due to the function start_unix_http_daemon.
~~~~~/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~~~~~/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~~~~~~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:400: gsad/src/CMakeFiles/gsad.dir/all] Error 2 make: *** [Makefile:152: all] Error 2Steps to reproduce
1.Go the gsa downloaded directory downloaded from github
GVM versions
gsa: (gsad --version)
*gvm: 9.0.1* (gvmd --version)
openvas-scanner: (openvassd --version)
*gvm-libs:11.0.1*
*openvas:7.0.1*
Environment
Operating system:Kali GNU/linux Rolling 2020.2 The Kali is a Vmware image
*Installation method / source:source installation* (packages, source installation)
Logfiles
no logs