Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error (libmicrohttpd) #293

Open
camzilla1050 opened this issue Jan 25, 2021 · 1 comment
Open

Compiling error (libmicrohttpd) #293

camzilla1050 opened this issue Jan 25, 2021 · 1 comment

Comments

@camzilla1050
Copy link

camzilla1050 commented Jan 25, 2021

Linux version 5.10.7-100.fc32.x86_64
AMD Ryzen 5 3600 6-Core Processor

Error compiling, issue with libmicrohttpd.

$ make

[ 84%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_skein.c.o
[ 85%] Building CXX object CMakeFiles/xmrig-amd.dir/src/crypto/CryptoNight.cpp.o
[ 87%] Building CXX object CMakeFiles/xmrig-amd.dir/src/crypto/CryptonightR_gen.cpp.o
[ 88%] Building CXX object CMakeFiles/xmrig-amd.dir/src/common/log/SysLog.cpp.o
[ 90%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/Api.cpp.o
[ 91%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/ApiRouter.cpp.o
[ 92%] Building CXX object CMakeFiles/xmrig-amd.dir/src/common/api/Httpd.cpp.o
/home/fedo1/Téléchargements/xmrig-amd-2.14.1/src/common/api/Httpd.cpp: Dans la fonction membre « bool Httpd::start() »:
/home/fedo1/Téléchargements/xmrig-amd-2.14.1/src/common/api/Httpd.cpp:78:66: erreur: conversion invalide de « int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**) » {aka « int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**) »} vers « MHD_AccessHandlerCallback » {aka « MHD_Result (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**) »} [-fpermissive]
   78 |     m_daemon = MHD_start_daemon(flags, m_port, nullptr, nullptr, &Httpd::handler, this, MHD_OPTION_END);
      |                                                                  ^~~~~~~~~~~~~~~
      |                                                                  |
      |                                                                  int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**) {aka int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)}
Dans le fichier inclus depuis /home/fedo1/Téléchargements/xmrig-amd-2.14.1/src/common/api/Httpd.cpp:25:
/usr/local/include/microhttpd.h:2443:45: note:   initialisation de l'argument 5 de « MHD_Daemon* MHD_start_daemon(unsigned int, uint16_t, MHD_AcceptPolicyCallback, void*, MHD_AccessHandlerCallback, void*, ...) »
 2443 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/xmrig-amd.dir/build.make:856: CMakeFiles/xmrig-amd.dir/src/common/api/Httpd.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/xmrig-amd.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
@camzilla1050 camzilla1050 changed the title Compiling error Compiling error (libmicrohttpd) Jan 25, 2021
@livendie
Copy link

same issue here[ 4%] Built target xmrig-asm
[ 5%] Building CXX object CMakeFiles/xmrig-amd-notls.dir/src/common/api/Httpd.cpp.o
/home/terrywills/xmrig-amd/src/common/api/Httpd.cpp: In member function ‘bool Httpd::start()’:
/home/terrywills/xmrig-amd/src/common/api/Httpd.cpp:78:66: error: invalid conversion from ‘int ()(void, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)’ {aka ‘int ()(void, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)’} to ‘MHD_AccessHandlerCallback’ {aka ‘MHD_Result ()(void, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)’} [-fpermissive]
78 | m_daemon = MHD_start_daemon(flags, m_port, nullptr, nullptr, &Httpd::handler, this, MHD_OPTION_END);
| ^~~~~~~~~~~~~~~
| |
| int ()(void, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**) {aka int ()(void, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)}
In file included from /home/terrywills/xmrig-amd/src/common/api/Httpd.cpp:25:
/usr/include/microhttpd.h:2443:45: note: initializing argument 5 of ‘MHD_Daemon* MHD_start_daemon(unsigned int, uint16_t, MHD_AcceptPolicyCallback, void*, MHD_AccessHandlerCallback, void*, ...)’
2443 | MHD_AccessHandlerCallback dh, void *dh_cls,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/xmrig-amd-notls.dir/build.make:875: CMakeFiles/xmrig-amd-notls.dir/src/common/api/Httpd.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/xmrig-amd-notls.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants