Open ghost opened 3 years ago
Not that this solves the problem exactly but I was able to get xmr-stak running from the AUR.
When it comes to "make install", it doesn't work for me on Manjaro or Ubuntu and this guy (https://github.com/fireice-uk/xmr-stak/issues/2731) seems to have the same problem on Fedora 34.
Disable the option for the web server that uses httpd in cmake with
cmake -DMICROHTTPD_ENABLE=OFF ..
Then build as usual
make -jN install
Describe the bug A clear and concise description of what the bug is. Unable to compile and run xmr-stak(the information below provides more information than I could usefully provide up here) Which operating system do you use? EndeavorOS - An Arch Linux derivative - it's installed on an acer nitro 5 laptop with an nvidia TU117M gpu
To Reproduce
-- The C compiler identification is GNU 11.1.0 -- The CXX compiler identification is GNU 11.1.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /opt/cuda (found suitable version "11.5", minimum required is "7.5") -- Looking for CL_VERSION_2_2 -- Looking for CL_VERSION_2_2 - found -- Found OpenCL: /opt/cuda/lib64/libOpenCL.so (found version "2.2") -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1l")
fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc -- Configuring done -- Generating done -- Build files have been written to: /home/robby/xmr-stak-2.10.8/build
make install
Scanning dependencies of target xmr-stak-asm [ 2%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cryptonight_v8_main_loop.S.o [ 4%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cnR/CryptonightR_template.S.o [ 6%] Linking C static library bin/libxmr-stak-asm.a [ 6%] Built target xmr-stak-asm [ 8%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o [ 11%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o [ 13%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o [ 15%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o [ 17%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o [ 20%] Linking C static library bin/libxmr-stak-c.a [ 20%] Built target xmr-stak-c [ 22%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o [ 24%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o [ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o [ 28%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_avx.cpp.o [ 31%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_ssse3.cpp.o [ 33%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o [ 35%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o [ 37%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o [ 40%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o [ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o [ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o /home/robby/xmr-stak-2.10.8/xmrstak/http/httpd.cpp: In member function ‘bool httpd::start_daemon()’: /home/robby/xmr-stak-2.10.8/xmrstak/http/httpd.cpp:162:17: 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~~~~~~In file included from /home/robby/xmr-stak-2.10.8/xmrstak/http/httpd.cpp:38: /usr/include/microhttpd.h:2480:45: note: initializing argument 5 of ‘MHD_Daemon MHD_start_daemon(unsigned int, uint16_t, MHD_AcceptPolicyCallback, void, MHD_AccessHandlerCallback, void, ...)’ 2480 | MHD_AccessHandlerCallback dh, void dh_cls, |
~~~~~~^~ make[2]: [CMakeFiles/xmr-stak-backend.dir/build.make:216: CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:178: CMakeFiles/xmr-stak-backend.dir/all] Error 2 make: *** [Makefile:136: all] Error 2Additional information.
CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
CMake Error: The source directory "/home/robby/xmr-stak-2.10.8/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. -- 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 CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib 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 CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib 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= CMAKE_INSTALL_PREFIX:PATH=/home/robby/xmr-stak-2.10.8/build CMAKE_LINKER:FILEPATH=/usr/bin/ld CMAKE_LINK_STATIC:BOOL=OFF CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 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=30;35;37;50;52;60;61;62;70;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=/opt/cuda/lib64/libcudart.so CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/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=/opt/cuda/lib64/stubs/libcuda.so CUDA_NVCC_EXECUTABLE:FILEPATH=/opt/cuda/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=/opt/cuda/lib64/libnvrtc.so CUDA_OpenCL_LIBRARY:FILEPATH=/opt/cuda/lib64/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=/opt/cuda/include CUDA_TOOLKIT_ROOT_DIR:PATH=/opt/cuda CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON CUDA_VERBOSE_BUILD:BOOL=OFF CUDA_VERSION:STRING=11.5 CUDA_cublas_LIBRARY:FILEPATH=/opt/cuda/lib64/libcublas.so CUDA_cudadevrt_LIBRARY:FILEPATH=/opt/cuda/lib64/libcudadevrt.a CUDA_cudart_static_LIBRARY:FILEPATH=/opt/cuda/lib64/libcudart_static.a CUDA_cufft_LIBRARY:FILEPATH=/opt/cuda/lib64/libcufft.so CUDA_cupti_LIBRARY:FILEPATH=/opt/cuda/extras/CUPTI/lib64/libcupti.so CUDA_curand_LIBRARY:FILEPATH=/opt/cuda/lib64/libcurand.so CUDA_cusolver_LIBRARY:FILEPATH=/opt/cuda/lib64/libcusolver.so CUDA_cusparse_LIBRARY:FILEPATH=/opt/cuda/lib64/libcusparse.so CUDA_nppc_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppc.so CUDA_nppial_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppial.so CUDA_nppicc_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppicc.so CUDA_nppidei_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppidei.so CUDA_nppif_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppif.so CUDA_nppig_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppig.so CUDA_nppim_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppim.so CUDA_nppist_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppist.so CUDA_nppisu_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppisu.so CUDA_nppitc_LIBRARY:FILEPATH=/opt/cuda/lib64/libnppitc.so CUDA_npps_LIBRARY:FILEPATH=/opt/cuda/lib64/libnpps.so CUDA_nvToolsExt_LIBRARY:FILEPATH=/opt/cuda/lib64/libnvToolsExt.so CUDA_rt_LIBRARY:FILEPATH=/usr/lib/librt.so EXECUTABLE_OUTPUT_PATH:STRING=bin HWLOC:FILEPATH=/usr/lib/libhwloc.so HWLOC_ENABLE:BOOL=ON HWLOC_INCLUDE_DIR:PATH=/usr/include LIBRARY_OUTPUT_PATH:STRING=bin MHTD:FILEPATH=/usr/lib/libmicrohttpd.so MICROHTTPD_ENABLE:BOOL=ON MTHD_INCLUDE_DIR:PATH=/usr/include OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/libcrypto.so OPENSSL_INCLUDE_DIR:PATH=/usr/include OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/libssl.so OpenCL_ENABLE:BOOL=ON OpenCL_INCLUDE_DIR:PATH=/opt/cuda/include OpenCL_LIBRARY:FILEPATH=/opt/cuda/lib64/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_libOPENSSL_crypto:FILEPATH=/usr/lib/libcrypto.so pkgcfg_libOPENSSL_ssl:FILEPATH=/usr/lib/libssl.
Feel free to add more information. I've seen lots of parts in the build instructions about options that I could append onto cmake, some of which I've tried (without a very noticeable difference) and some of which have variables within the suggested commands that I don't know how to find/produce.
I gave into peer pressure and used xmrig for a few days a few weeks ago but I want to seriously get into mining this time. If I can get this up and running successfully I have an identical laptop that I'd like use solely for mining cryptocurreny with.