fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

Compile Error in xmrstak/http/httpd.cpp - invalid conversion #2718

Open Decoe opened 3 years ago

Decoe commented 3 years ago

... are the placeholder for your answers. Please answer each question!

Describe the bug Compile Error in xmrstak/http/httpd.cpp

Which operating system do you use? Distributor ID: Ubuntu Description: Ubuntu 20.10 Release: 20.10 Codename: groovy

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Wed_Jul_22_19:09:09_PDT_2020 Cuda compilation tools, release 11.0, V11.0.221 Build cuda_11.0_bu.TC445_37.28845127_0

To Reproduce 1) clone repository 2) cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stack -DCUDA_ENABLE=ON -DOpenCL_ENABLE=OFF -DCUDA_ARCH=75 3) sudo make install

Please post all commands and the output.

1) cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stack -DCUDA_ENABLE=ON -DOpenCL_ENABLE=OFF -DCUDA_ARCH=75 -- Configuring done -- Generating done -- Build files have been written to: /XXXX/xmr-stack/xmr-stak/build 2) sudo make install [sudo] password for daniel: Sorry, try again. [sudo] password for daniel: make[1]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' Scanning dependencies of target xmr-stak-asm make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' [ 2%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cryptonight_v8_main_loop.S.o [ 5%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cnR/CryptonightR_template.S.o [ 7%] Linking C static library bin/libxmr-stak-asm.a make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' [ 7%] Built target xmr-stak-asm make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' Scanning dependencies of target xmr-stak-c make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' [ 10%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o [ 12%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o [ 15%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o [ 17%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o [ 20%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o [ 22%] Linking C static library bin/libxmr-stak-c.a make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' [ 22%] Built target xmr-stak-c make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' Scanning dependencies of target xmr-stak-backend make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' make[2]: Entering directory '/XXXXXX/xmr-stack/xmr-stak/build' [ 25%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o [ 27%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o [ 30%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o [ 32%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_avx.cpp.o [ 35%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_ssse3.cpp.o [ 37%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o [ 40%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o [ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o [ 45%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o [ 47%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o [ 50%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o /XXXXXX/xmr-stack/xmr-stak/xmrstak/http/httpd.cpp: In member function ‘bool httpd::start_daemon()’: /XXXXXX/xmr-stack/xmr-stak/xmrstak/http/httpd.cpp:162:3: 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] 162 &httpd::req_handler, ^~~~~~~
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 /XXXXXX/xmr-stack/xmr-stak/xmrstak/http/httpd.cpp:38: /usr/include/microhttpd.h:2428:45: note: initializing argument 5 of ‘MHD_Daemon MHD_start_daemon(unsigned int, uint16_t, MHD_AcceptPolicyCallback, void, MHD_AccessHandlerCallback, void, ...)’ 2428 | MHD_AccessHandlerCallback dh, void dh_cls, | ~~~~~~^~ make[2]: [CMakeFiles/xmr-stak-backend.dir/build.make:193: CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o] Error 1 make[2]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' make[1]: [CMakeFiles/Makefile2:143: CMakeFiles/xmr-stak-backend.dir/all] Error 2 make[1]: Leaving directory '/XXXXXX/xmr-stack/xmr-stak/build' make: *** [Makefile:130: all] Error 2

Additional information.

# run `cmake -LA .` in the build folder and add the output here
~/xmr-stack/xmr-stak/build$ cmake -LA .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/daniel/xmr-stack/xmr-stak/build
-- Cache values
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_ASM_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_ASM_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
CMAKE_ASM_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
CMAKE_ASM_FLAGS:STRING=
CMAKE_ASM_FLAGS_DEBUG:STRING=-g
CMAKE_ASM_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_ASM_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-10
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-10
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-10
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-10
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/home/daniel/xmr-stack
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_LINK_STATIC:BOOL=OFF
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_READELF:FILEPATH=/usr/bin/readelf
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
CPU_ENABLE:BOOL=ON
CUDA_64_BIT_DEVICE_CODE:BOOL=ON
CUDA_ARCH:STRING=75
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON
CUDA_BUILD_CUBIN:BOOL=OFF
CUDA_BUILD_EMULATION:BOOL=OFF
CUDA_COMPILER:STRING=nvcc
CUDA_CUDART_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart.so
CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcuda.so
CUDA_ENABLE:BOOL=ON
CUDA_GENERATED_OUTPUT_DIR:PATH=
CUDA_HOST_COMPILATION_CPP:BOOL=ON
CUDA_HOST_COMPILER:FILEPATH=/usr/bin/c++
CUDA_KEEP_FILES:BOOL=OFF
CUDA_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libcuda.so
CUDA_NVCC_EXECUTABLE:FILEPATH=/usr/bin/nvcc
CUDA_NVCC_FLAGS:STRING=
CUDA_NVCC_FLAGS_DEBUG:STRING=
CUDA_NVCC_FLAGS_MINSIZEREL:STRING=
CUDA_NVCC_FLAGS_RELEASE:STRING=
CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING=
CUDA_NVRTC_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libnvrtc.so
CUDA_OpenCL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libOpenCL.so
CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_SEPARABLE_COMPILATION:BOOL=OFF
CUDA_SHOW_CODELINES:BOOL=OFF
CUDA_SHOW_REGISTER:BOOL=OFF
CUDA_TOOLKIT_INCLUDE:PATH=/usr/include
CUDA_TOOLKIT_ROOT_DIR:PATH=/usr
CUDA_VERBOSE_BUILD:BOOL=OFF
CUDA_VERSION:STRING=11.0
CUDA_cublas_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas.so
CUDA_cudadevrt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudadevrt.a
CUDA_cudart_static_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart_static.a
CUDA_cufft_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcufft.so
CUDA_cupti_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcupti.so
CUDA_curand_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcurand.so
CUDA_cusolver_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusolver.so
CUDA_cusparse_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusparse.so
CUDA_nppc_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppc.so
CUDA_nppial_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppial.so
CUDA_nppicc_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppicc.so
CUDA_nppicom_LIBRARY:FILEPATH=CUDA_nppicom_LIBRARY-NOTFOUND
CUDA_nppidei_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppidei.so
CUDA_nppif_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppif.so
CUDA_nppig_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppig.so
CUDA_nppim_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppim.so
CUDA_nppist_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppist.so
CUDA_nppisu_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppisu.so
CUDA_nppitc_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppitc.so
CUDA_npps_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnpps.so
CUDA_nvToolsExt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnvToolsExt.so
EXECUTABLE_OUTPUT_PATH:STRING=bin
HWLOC:FILEPATH=/usr/lib/x86_64-linux-gnu/libhwloc.so
HWLOC_ENABLE:BOOL=ON
HWLOC_INCLUDE_DIR:PATH=/usr/include
LIBRARY_OUTPUT_PATH:STRING=bin
MHTD:FILEPATH=/usr/lib/x86_64-linux-gnu/libmicrohttpd.so
MICROHTTPD_ENABLE:BOOL=ON
MTHD_INCLUDE_DIR:PATH=/usr/include
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcrypto.so
OPENSSL_INCLUDE_DIR:PATH=/usr/include
OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libssl.so
OpenCL_ENABLE:BOOL=OFF
OpenCL_INCLUDE_DIR:PATH=/usr/include
OpenCL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libOpenCL.so
OpenSSL_ENABLE:BOOL=ON
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
XMR-STAK_COMPILE:STRING=native
XMR-STAK_LARGEGRID:BOOL=ON
XMR-STAK_THREADS:STRING=0
pkgcfg_lib__OPENSSL_crypto:FILEPATH=/usr/lib/x86_64-linux-gnu/libcrypto.so
pkgcfg_lib__OPENSSL_ssl:FILEPATH=/usr/lib/x86_64-linux-gnu/libssl.so

**Feel free to add more information.**

...

realJPIrwin commented 3 years ago

Precisely the same error on Arch, any updates?

cpilipis commented 3 years ago

I'm having this on Debian too, and I don't even have an Nvidia GPU!

Ilya-35 commented 3 years ago

I have this problem too but just download the binaries ;(

DavidLazarescu commented 2 years ago

Same error here on ubuntu