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

Build, compile and run xmr-stak from Visual Studio-2017 for CPU #2082

Open vasilevskykv opened 5 years ago

vasilevskykv commented 5 years ago

I would like to build, compile and run xmr-stak for CPU from VS2017

vasilevskykv commented 5 years ago

Please, help me to build, compile and run xmr-stak-cpu from VS2017 for working on CPU, not GPU. Where to write not to demand CUDA, for example? In .md files you wrote how to build, compile and run only for GPU-s. Please, write in details, how to do it.

vasilevskykv commented 5 years ago

Can't build xmr-stak 2.6.0.
Warnings 0: Errors: 1 --Configuring incomplete, errors occured Log file shows only system

psychocrypt commented 5 years ago

please post all the command and the output

vasilevskykv commented 5 years ago

This is the command: cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 -DXMR-STAK_CURRENCY=monero -DCMAKE_BUILD_TYPE=DEBUG -DXMR_STAK_COMPILE=generic -DCUDA_ENABLE=ON -DCUDA_ARCH=61 DOpenSSL_ENABLE=OFF ..

And the output is: Warnings: 0 Errors: 1 Time passed: 00:00:00.34 Exit code: 1 --Configuring incomplete, errors occured! See also "../../build/CMakeFiles/CMakeOutput.log"

And CMakeOutput.log: The system is: Windows - 10.0.17134 - AMD64

psychocrypt commented 5 years ago

and before the error there was no output? I missed all output where cmake search the dependancies. Please use always a new build folder. Also post the command you used to load visual studio.

Please send alwas ALL output and not only the error

psychocrypt commented 5 years ago

please also remove the currency from the cmake string this is no option. Debug is case sensitive and must be "Debug"

vasilevskykv commented 5 years ago

The problem was in version. I wrote v141 and build was made. But in Visual studio 8 errors appeared: C1047 in libhwloc.lib, LNK2001 in xmr_opencl_backend and in xmr_stak_cuda_backend in SSL_CTX_set_options and in TLS_method of this projects. Also LNK1120 in xmr_opencl_backend and in xmr_cuda_backend And LNK1257 in xmr_stak

vasilevskykv commented 5 years ago

And details about errors: LINK2001: unresolved external symbol TLS_method. This error appears both in xmr_stak_cuda_backend and in xmr_opencl_backend. LINK2001: unresolved external symbol SSL_CTX_set_options. This error appears both in xmr_stak_cuda_backend and in xmr_opencl_backend. С1047: ....\xmr-stak-dep\hwloc\lib\libhwloc.lib was created with an older compiler than other objects; rebuild old objects and libraries

psychocrypt commented 5 years ago

please post the full commands and all output and not only snippeds. I need all in chronologically order. Please remove the build folder and than start with loading VS. DO NOT REMOVE ANY LINE FROM THE OUTPUT.

vasilevskykv commented 5 years ago

OK, Here is the output: 1>------ Build started: Project: xmr-stak, Configuration: Debug x64 ------ 2>------ Build started: Project: xmrstak_cuda_backend, Configuration: Debug x64 ------ 3>------ Build started: Project: xmrstak_opencl_backend, Configuration: Debug x64 ------ 2>libhwloc.lib(topology.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 1>libmicrohttpd.lib(daemon.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 2>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 1>LINK : fatal error C1047: The object or library file 'I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-dep\hwloc\lib\libhwloc.lib' was created with an older compiler than other objects; rebuild old objects and libraries 1>LINK : fatal error LNK1257: code generation failed 2> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.exp 2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>Done building project "xmr-stak.vcxproj" -- FAILED. 2>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol SSL_CTX_set_options 2>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol TLS_method 2>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_cuda_backend.dll : fatal error LNK1120: 2 unresolved externals 2>Done building project "xmrstak_cuda_backend.vcxproj" -- FAILED. 3>libhwloc.lib(topology.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 3>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 3> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.exp 3>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 3>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol SSL_CTX_set_options 3>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol TLS_method 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_opencl_backend.dll : fatal error LNK1120: 2 unresolved externals 3>Done building project "xmrstak_opencl_backend.vcxproj" -- FAILED. ========== Build: 0 succeeded, 3 failed, 5 up-to-date, 0 skipped ==========

psychocrypt commented 5 years ago

you missed again a bunch of useful information. were is the cmake command to create vs project files and all of this output.

vasilevskykv commented 5 years ago

OK, here is the output of CMake: I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0>"I:\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64


Visual Studio 2017 Developer Command Prompt v15.8.0 Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64' I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0>"I:\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"


Visual Studio 2017 MSBuild Command Prompt Copyright (c) 2017 Microsoft Corporation


I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0>cd build

I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build>set CMAKE_PREFIX_PATH=I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-dep\hwloc;I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-dep\libmicrohttpd;I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-dep\openssl

I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 -DCMAKE_BUILD_TYPE=DEBUG -DXMR_STAK_COMPILE=generic -DCUDA_ENABLE=ON -DCUDA_ARCH=61 DOpenSSL_ENABLE=OFF .. -- The C compiler identification is MSVC 19.15.26726.0

-- The CXX compiler identification is MSVC 19.15.26726.0

-- Check for working C compiler: I:/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe

-- Check for working C compiler: I:/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe -- works

-- Detecting C compiler ABI info -- Detecting C compiler ABI info - done

-- Detecting C compile features -- Detecting C compile features - done

-- Check for working CXX compiler: I:/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe

-- Check for working CXX compiler: I:/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features -- Detecting CXX compile features - done

-- Found CUDA: I:/Projects/Programming/NVIDIA GPU Computing/Toolkit/CUDA/v10.0 (found suitable version "10.0", minimum required is "7.5")

-- Looking for CL_VERSION_2_2

-- Looking for CL_VERSION_2_2 - not found

-- Looking for CL_VERSION_2_1

-- Looking for CL_VERSION_2_1 - not found

-- Looking for CL_VERSION_2_0

-- Looking for CL_VERSION_2_0 - not found

-- Looking for CL_VERSION_1_2

-- Looking for CL_VERSION_1_2 - found

-- Found OpenCL: I:/Projects/Programming/NVIDIA GPU Computing/Toolkit/CUDA/v10.0/lib/x64/OpenCL.lib (found version "1.2")

-- Found OpenSSL: I:/Python/Anaconda3/Library/lib/libeay32.lib (found version "1.0.2l")

-- The ASM_MASM compiler identification is MSVC

-- Found assembler: I:/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/ml64.exe

-- Configuring done

-- Generating done

-- Build files have been written to: I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build

vasilevskykv commented 5 years ago

And here is the full output from Visual Studio 2017: 1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------ 1>Checking Build System 1>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 2>------ Build started: Project: xmr-stak-asm, Configuration: Debug x64 ------ 2>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 2>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 2>Assembling I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto\asm\cryptonight_v8_main_loop.asm... 2>xmr-stak-asm.vcxproj -> I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmr-stak-asm.lib 3>------ Build started: Project: xmr-stak-c, Configuration: Debug x64 ------ 3>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 3>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 3>c_blake256.c 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto\c_blake256.c(232): warning C4244: 'function': conversion from 'uint64_t' to 'uint32_t', possible loss of data 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto\c_blake256.c(262): warning C4244: 'function': conversion from 'uint64_t' to 'uint32_t', possible loss of data 3>c_groestl.c 3>c_jh.c 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto\c_jh.c(274): warning C4244: '=': conversion from 'unsigned __int64' to 'DataLength', possible loss of data 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto\c_jh.c(275): warning C4244: '=': conversion from 'unsigned __int64' to 'DataLength', possible loss of data 3>c_keccak.c 3>c_skein.c 3>Generating Code... 3>xmr-stak-c.vcxproj -> I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmr-stak-c.lib 3>Done building project "xmr-stak-c.vcxproj". 4>------ Build started: Project: xmr-stak-backend, Configuration: Debug x64 ------ 4>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 4>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 4>backendConnector.cpp 4>cpuType.cpp 4>cryptonight_common.cpp 4>hwlocMemory.cpp 4>minethd.cpp 4>I:\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\xmemory0(881): warning C4267: 'initializing': conversion from 'size_t' to '_Objty', possible loss of data 4> with 4> [ 4> _Objty=unsigned int 4> ] 4>I:\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\vector(902): note: see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&>(_Alloc &,_Objty const ,size_t &)' being compiled 4> with 4> [ 4> _Alloc=std::allocator, 4> _Ty=unsigned int, 4> _Objty=unsigned int 4> ] 4>I:\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\vector(902): note: see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&>(_Alloc &,_Objty const ,size_t &)' being compiled 4> with 4> [ 4> _Alloc=std::allocator, 4> _Ty=unsigned int, 4> _Objty=unsigned int 4> ] 4>I:\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include\vector(919): note: see reference to function template instantiation 'void std::vector<std::_Vbase,std::allocator>::_Emplace_back_with_unused_capacity<size_t&>(size_t &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\autoAdjustHwloc.hpp(206): note: see reference to function template instantiation 'void std::vector<std::_Vbase,std::allocator>::emplace_back<size_t&>(size_t &)' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(782): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(632): note: see reference to function template instantiation 'void xmrstak::cpu::minethd::multiway_work_main<1>(void)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(838): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(583): note: see reference to function template instantiation 'void Cryptonight_hash<2>::hash<cryptonight_monero,false,false>(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(261): note: see reference to function template instantiation 'xmrstak::cpu::minethd::cn_hash_fun xmrstak::cpu::minethd::func_multi_selector<2>(bool,bool,xmrstak_algo,const std::string &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(838): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(845): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(845): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(845): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(845): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(959): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(605): note: see reference to function template instantiation 'void Cryptonight_hash_asm<1,0>::hash(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(605): note: see reference to function template instantiation 'void Cryptonight_hash_asm<1,0>::hash(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(986): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(607): note: see reference to function template instantiation 'void Cryptonight_hash_asm<2,0>::hash(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(867): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(583): note: see reference to function template instantiation 'void Cryptonight_hash<3>::hash<cryptonight_monero,false,false>(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(271): note: see reference to function template instantiation 'xmrstak::cpu::minethd::cn_hash_fun xmrstak::cpu::minethd::func_multi_selector<3>(bool,bool,xmrstak_algo,const std::string &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(867): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(867): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(874): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(896): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(583): note: see reference to function template instantiation 'void Cryptonight_hash<4>::hash<cryptonight_monero,false,false>(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(277): note: see reference to function template instantiation 'xmrstak::cpu::minethd::cn_hash_fun xmrstak::cpu::minethd::func_multi_selector<4>(bool,bool,xmrstak_algo,const std::string &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(896): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(896): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(896): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(903): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(925): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(583): note: see reference to function template instantiation 'void Cryptonight_hash<5>::hash<cryptonight_monero,false,false>(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(284): note: see reference to function template instantiation 'xmrstak::cpu::minethd::cn_hash_fun xmrstak::cpu::minethd::func_multi_selector<5>(bool,bool,xmrstak_algo,const std::string &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(925): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(925): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(925): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(925): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(932): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(809): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(583): note: see reference to function template instantiation 'void Cryptonight_hash<1>::hash<cryptonight_monero,false,false>(const void ,size_t,void ,cryptonight_ctx )' being compiled 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\minethd.cpp(627): note: see reference to function template instantiation 'xmrstak::cpu::minethd::cn_hash_fun xmrstak::cpu::minethd::func_multi_selector<1>(bool,bool,xmrstak_algo,const std::string &)' being compiled 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(816): warning C4244: 'initializing': conversion from 'uint64_t' to 'uint32_t', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\cpu\crypto/cryptonight_aesni.h(816): warning C4244: 'initializing': conversion from 'uint64_t' to 'const uint32_t', possible loss of data 4>globalStates.cpp 4>httpd.cpp 4>webdesign.cpp 4>console.cpp 4>executor.cpp 4>telemetry.cpp 4>uac.cpp 4>utility.cpp 4>jpsock.cpp 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\net\socks.hpp(38): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\net\socks.hpp(51): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\net\jpsock.cpp(250): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\net\jpsock.cpp(268): warning C4244: 'initializing': conversion from 'int64' to 'int', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\net\jpsock.cpp(626): warning C4267: 'argument': conversion from 'size_t' to 'rapidjson::SizeType', possible loss of data 4>socket.cpp 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\net\socks.hpp(38): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data 4>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\net\socks.hpp(51): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\net\socket.cpp(163): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data 4>version.cpp 4>Generating Code... 4>jconf.cpp 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\cpu\jconf.cpp(106): warning C4267: 'argument': conversion from 'size_t' to 'rapidjson::SizeType', possible loss of data 4>jconf.cpp 4>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\jconf.cpp(162): warning C4267: 'argument': conversion from 'size_t' to 'rapidjson::SizeType', possible loss of data 4>xmr-stak-backend.vcxproj -> I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmr-stak-backend.lib 4>Done building project "xmr-stak-backend.vcxproj". 5>------ Build started: Project: xmr-stak, Configuration: Debug x64 ------ 6>------ Build started: Project: xmrstak_cuda_backend, Configuration: Debug x64 ------ 7>------ Build started: Project: xmrstak_opencl_backend, Configuration: Debug x64 ------ 5>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 6>Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/Debug/xmrstak_cuda_backend_generated_cuda_core.cu.obj 7>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 5>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 7>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. 5>cli-miner.cpp 7>gpu.cpp 5>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\cli\cli-miner.cpp(391): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data 5>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\cli\cli-miner.cpp(879): warning C4244: 'initializing': conversion from 'unsigned __int64' to 'double', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(70): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(396): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(397): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(399): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(769): warning C4018: '<': signed/unsigned mismatch 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(894): warning C4267: 'argument': conversion from 'size_t' to 'cl_uint', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(950): warning C4267: '=': conversion from 'size_t' to 'cl_int', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(972): warning C4267: 'initializing': conversion from 'size_t' to 'cl_uint', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(1215): warning C4267: 'initializing': conversion from 'size_t' to 'cl_uint', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\amd_gpu\gpu.cpp(1246): warning C4267: '+=': conversion from 'size_t' to 'uint32_t', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak/picosha2/picosha2.hpp(195): warning C4244: 'argument': conversion from 'int64' to 'picosha2::word_t', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak/picosha2/picosha2.hpp(293): note: see reference to function template instantiation 'void picosha2::hash256_one_by_one::process(RaIter,RaIter)' being compiled 7> with 7> [ 7> RaIter=std::_String_const_iterator<std::_String_val<std::_Simple_types>> 7> ] 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak/picosha2/picosha2.hpp(325): note: see reference to function template instantiation 'void picosha2::impl::hash256_impl<InIter,OutIter>(RaIter,RaIter,OutIter,OutIter,int,std::random_access_iterator_tag)' being compiled 7> with 7> [ 7> InIter=std::_String_const_iterator<std::_String_val<std::_Simple_types>>, 7> OutIter=picosha2::byte_t , 7> RaIter=std::_String_const_iterator<std::_String_val<std::_Simple_types>> 7> ] 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak/picosha2/picosha2.hpp(346): note: see reference to function template instantiation 'void picosha2::hash256<InIter,picosha2::byte_t>(InIter,InIter,OutIter,OutIter,int)' being compiled 7> with 7> [ 7> InIter=std::_String_const_iterator<std::_String_val<std::_Simple_types>>, 7> OutIter=picosha2::byte_t * 7> ] 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak/picosha2/picosha2.hpp(360): note: see reference to function template instantiation 'void picosha2::hash256_hex_string<std::_String_const_iterator<std::_String_val<std::_Simple_types<_Ty>>>>(InIter,InIter,std::string &)' being compiled 7> with 7> [ 7> _Ty=char, 7> InIter=std::_String_const_iterator<std::_String_val<std::_Simple_types>> 7> ] 5>libmicrohttpd.lib(daemon.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 7>jconf.cpp 5>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 5>LINK : fatal error C1047: The object or library file 'I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-dep\hwloc\lib\libhwloc.lib' was created with an older compiler than other objects; rebuild old objects and libraries 5>LINK : fatal error LNK1257: code generation failed 5>Done building project "xmr-stak.vcxproj" -- FAILED. 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\jconf.cpp(104): warning C4267: 'argument': conversion from 'size_t' to 'rapidjson::SizeType', possible loss of data 7>minethd.cpp 7>i:\projects\programming\monero\xmr-stak\xmr-stak-2.6.0\xmrstak\backend\amd\autoAdjust.hpp(60): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\amd\minethd.cpp(223): warning C4267: 'initializing': conversion from 'size_t' to 'uint32_t', possible loss of data 7>Generating Code... 7>libhwloc.lib(topology.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 7>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 7> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.exp 7>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 7>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol SSL_CTX_set_options 7>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol TLS_method 7>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_opencl_backend.dll : fatal error LNK1120: 2 unresolved externals 7>Done building project "xmrstak_opencl_backend.vcxproj" -- FAILED. 6>cuda_core.cu 6>CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored. 6>CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored. 6>cuda_core.cu 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu(47): warning C4018: '<': signed/unsigned mismatch 6>Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/Debug/xmrstak_cuda_backend_generated_cuda_extra.cu.obj 6>cuda_extra.cu 6>CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored. 6>CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored. 6>cuda_extra.cu 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(256): warning C4297: 'cryptonight_extra_cpu_set_data': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(256): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(269): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(269): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(273): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(273): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(276): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(276): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(279): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(279): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(282): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(282): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(288): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(288): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(296): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(296): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(307): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(307): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(318): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(318): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(319): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(319): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(320): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(320): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(321): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(321): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(322): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(322): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(324): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(324): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(325): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(325): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(326): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(326): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(327): warning C4297: 'cryptonight_extra_cpu_init': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(327): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(344): warning C4297: 'cryptonight_extra_cpu_prepare': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(344): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(349): warning C4297: 'cryptonight_extra_cpu_prepare': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(349): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(354): warning C4297: 'cryptonight_extra_cpu_prepare': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(354): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(359): warning C4297: 'cryptonight_extra_cpu_prepare': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(359): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(367): warning C4297: 'cryptonight_extra_cpu_prepare': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(367): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(430): warning C4018: '<': signed/unsigned mismatch 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(380): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(380): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(381): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(381): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(385): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(385): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(393): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(393): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(401): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(401): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(410): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(410): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(417): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(417): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(418): warning C4297: 'cryptonight_extra_cpu_final': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(418): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(684): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(709): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(710): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(636): warning C4297: 'cuda_get_deviceinfo': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(636): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(638): warning C4297: 'cuda_get_deviceinfo': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(638): note: The function is extern "C" and /EHc was specified 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(640): warning C4297: 'cuda_get_deviceinfo': function assumed not to throw an exception but does 6>I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu(640): note: The function is extern "C" and /EHc was specified 6>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 6>CMake is re-running because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is out-of-date. 6> the file 'I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.obj.depend' 6> is newer than 'I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp.depend' 6> result='-1' 6>fatal: not a git repository (or any of the parent directories): .git 6>fatal: not a git repository (or any of the parent directories): .git 6>-- Configuring done 6>-- Generating done 6>-- Build files have been written to: I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build 6>jconf.cpp 6>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\xmrstak\backend\nvidia\jconf.cpp(121): warning C4267: 'argument': conversion from 'size_t' to 'rapidjson::SizeType', possible loss of data 6>minethd.cpp 6>Generating Code... 6>libhwloc.lib(topology.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 6>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 6> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.exp 6>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 6>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol SSL_CTX_set_options 6>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol TLS_method 6>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_cuda_backend.dll : fatal error LNK1120: 2 unresolved externals 6>Done building project "xmrstak_cuda_backend.vcxproj" -- FAILED. 8>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------ 8>Building Custom Rule I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/CMakeLists.txt 8>CMake does not need to re-run because I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/CMakeFiles/generate.stamp is up-to-date. ========== Build: 5 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

vasilevskykv commented 5 years ago

I've downloaded the latest version of hwloc and made build: Here is the output: 1>------ Build started: Project: xmr-stak, Configuration: Debug x64 ------ 2>------ Build started: Project: xmrstak_cuda_backend, Configuration: Debug x64 ------ 3>------ Build started: Project: xmrstak_opencl_backend, Configuration: Debug x64 ------ 1>libmicrohttpd.lib(daemon.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 3> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_opencl_backend.exp 1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 2> Creating library I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.lib and object I:/Projects/Programming/Monero/XMR-STAK/xmr-stak-2.6.0/build/bin/Debug/xmrstak_cuda_backend.exp 1>MSVCRTD.lib(initializers.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library 1>cli-miner.obj : error LNK2001: unresolved external symbol OPENSSL_init_crypto 1>cli-miner.obj : error LNK2001: unresolved external symbol OPENSSL_init_ssl 1>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol SSL_CTX_set_options 1>xmr-stak-backend.lib(socket.obj) : error LNK2001: unresolved external symbol TLS_method 1>xmr-stak-backend.lib(hwlocMemory.obj) : error LNK2001: unresolved external symbol hwloc_set_membind_nodeset 1>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmr-stak.exe : fatal error LNK1120: 5 unresolved externals 3>xmr-stak-backend.lib(hwlocMemory.obj) : error LNK2019: unresolved external symbol hwloc_set_membind_nodeset referenced in function "void cdecl bindMemoryToNUMANode(unsigned int64)" (?bindMemoryToNUMANode@@YAX_K@Z) 2>xmr-stak-backend.lib(hwlocMemory.obj) : error LNK2019: unresolved external symbol hwloc_set_membind_nodeset referenced in function "void cdecl bindMemoryToNUMANode(unsigned int64)" (?bindMemoryToNUMANode@@YAX_K@Z) 2>xmr-stak-backend.lib(socket.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_options referenced in function "private: void cdecl tls_socket::init_ctx(void)" (?init_ctx@tls_socket@@AEAAXXZ) 2>xmr-stak-backend.lib(socket.obj) : error LNK2019: unresolved external symbol TLS_method referenced in function "private: void __cdecl tls_socket::init_ctx(void)" (?init_ctx@tls_socket@@AEAAXXZ) 2>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_cuda_backend.dll : fatal error LNK1120: 3 unresolved externals 3>xmr-stak-backend.lib(socket.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_options referenced in function "private: void cdecl tls_socket::init_ctx(void)" (?init_ctx@tls_socket@@AEAAXXZ) 3>xmr-stak-backend.lib(socket.obj) : error LNK2019: unresolved external symbol TLS_method referenced in function "private: void __cdecl tls_socket::init_ctx(void)" (?init_ctx@tls_socket@@AEAAXXZ) 3>I:\Projects\Programming\Monero\XMR-STAK\xmr-stak-2.6.0\build\bin\Debug\xmrstak_opencl_backend.dll : fatal error LNK1120: 3 unresolved externals 1>Done building project "xmr-stak.vcxproj" -- FAILED. 3>Done building project "xmrstak_opencl_backend.vcxproj" -- FAILED. 2>Done building project "xmrstak_cuda_backend.vcxproj" -- FAILED. ========== Build: 0 succeeded, 3 failed, 5 up-to-date, 0 skipped ==========

vasilevskykv commented 5 years ago

I think that we have the problem with libhwloc.lib. The compiler asks for 2.0.2 version, but the real version is 1.11.7. I downloaded 2.0.2 version. The sizes are;

  1. libhwloc.lib 1.11.7 - 4 009 984 bytes
  2. libhwloc.lib 2.0.2 - 61 440 bytes
psychocrypt commented 5 years ago

You missed the minus before D in -DOpenSSL_ENABLE=OFF

vasilevskykv commented 5 years ago

BUILD_ALL has been made normally. I used v3 of xmr-stak-dep. But another problem appeared: it can't be run even from VS2017 15.9.3. Visual Studio writes: "Unable to start program. I:\Projects\Monero\xmr-stak-2.6.0\build\x64\Debug\ALL_BUILD. Access denied." But it normally runs if I simply execute xmr-stak.exe from Total Commander. Antivirus service has been stopped.

pekster85 commented 5 years ago

i have build issues too, any help is apreciated. am trying to compile for cpu only too. on windows, according to guide https://github.com/fireice-uk/xmr-stak/blob/master/doc/compile_Windows.md Got all the way down , and am stuck in the Cmake part.


C:\MINER\xmr-stak-2.7.0>cmake --build . --config Release --target install Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: install.vcxproj


my cmd story might explain a thing or two;

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Pekkie>cd C:\MINER\xmr-stak-2.7.0

C:\MINER\xmr-stak-2.7.0>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Com munity\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11


Visual Studio 2017 Developer Command Prompt v15.9.4 Copyright (c) 2017 Microsoft Corporation


[ERROR:vcvars.bat] Toolset directory for version '14.11' was not found. [ERROR:VsDevCmd.bat] VsDevCmd.bat encountered errors. Environment may be inc omplete and/or incorrect. [ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG =[value]' and then re-run [ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details. [ERROR:VsDevCmd.bat] Where [value] is: [ERROR:VsDevCmd.bat] 1 : basic debug logging [ERROR:VsDevCmd.bat] 2 : detailed debug logging [ERROR:VsDevCmd.bat] 3 : trace level logging. Redirection of output to a file when using this level is recommended. [ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3 [ERROR:VsDevCmd.bat] vsdevcmd.bat > vsdevcmd.trace.txt 2>&1

C:\MINER\xmr-stak-2.7.0> C:\MINER\xmr-stak-2.7.0>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Com munity\Common7\Tools\VsMSBuildCmd.bat"


Visual Studio 2017 MSBuild Command Prompt Copyright (c) 2017 Microsoft Corporation


C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator : Visual Studio 15 2017 Win64 Does not match the generator used previously: Visual Studio 15 2017 win64 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator toolset: v141,host=x64 Does not match the toolset used previously: Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T CMake Error: No toolset specified for -T

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -- The C compiler identification is MSVC 19.16.27025.1 -- The CXX compiler identification is MSVC 19.16.27025.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/ 2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/ 2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi o/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi o/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA _INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") CMake Error at CMakeLists.txt:207 (message): CUDA NOT found: use -DCUDA_ENABLE=OFF to build without NVIDIA GPU support

-- Configuring incomplete, errors occurred! See also "C:/MINER/xmr-stak-2.7.0/CMakeFiles/CMakeOutput.log".

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: The source directory "C:/MINER" does not appear to contain CMakeLis ts.txt. Specify --help for usage, or press the help button on the CMake GUI.

C:\MINER\xmr-stak-2.7.0>cmake --build . --config Release --target install Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: install.vcxproj

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator toolset: v141,host=x64 Does not match the toolset used previously: v141 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator toolset: v141,host=x64 Does not match the toolset used previously: v141 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. CMake Error: Error: generator toolset: v141,host=x64 Does not match the toolset used previously: v141 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a diffe rent binary directory.

C:\MINER\xmr-stak-2.7.0>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. -- The C compiler identification is MSVC 19.16.27025.1 -- The CXX compiler identification is MSVC 19.16.27025.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/ 2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/ 2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi o/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi o/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA _INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") CMake Error at CMakeLists.txt:207 (message): CUDA NOT found: use -DCUDA_ENABLE=OFF to build without NVIDIA GPU support

-- Configuring incomplete, errors occurred! See also "C:/MINER/CMakeFiles/CMakeOutput.log".

C:\MINER\xmr-stak-2.7.0>cmake --build . --config Release --target install Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: install.vcxproj

C:\MINER\xmr-stak-2.7.0>cd bin\Release The system cannot find the path specified.

C:\MINER\xmr-stak-2.7.0>copy C:\xmr-stak-dep\openssl\bin* . C:\xmr-stak-dep\openssl\bin\libeay32.dll C:\xmr-stak-dep\openssl\bin\ssleay32.dll 2 file(s) copied.

C:\MINER\xmr-stak-2.7.0>cmake --build . --config Release --target install Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: install.vcxproj

C:\MINER\xmr-stak-2.7.0>

psychocrypt commented 5 years ago

Toolset directory for version '14.11' was not found. says that you have not installed the toolchain 14.11. you can add it any time to your cisuals tudio. sometimes the option to add a second toolchain is a little bit hidden behind some advanced option. Check google for a how to to install two toolchains for VS.

pekster85 commented 5 years ago

but i did; VC++ 2017 version 15.4 v14.11 toolset is installed

vasilevskykv commented 5 years ago

pekster85, please try to do build your project according following instructions:

  1. Run cmd from your folder with xmr-stak-2.7.0. You will see something like this: C:\MINER\xmr-stak-2.7.0>

  2. Run something like this, using your path to Visual Studio. C:\MINER\xmr-stak-2.7.0>"D:\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64

  3. Run something like this, using your path to VS2017 C:\MINER\xmr-stak-2.7.0>"D:\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"

  4. mkdir build

  5. cd build

  6. C:\MINER\xmr-stak-2.7.0\build>set CMAKE_PREFIX_PATH=D:\Projects\Monero\xmr-stak-dep\hwloc;D:\Projects\Monero\xmr-stak-dep\libmicrohttpd;D:\Projects\Monero\xmr-stak-dep\openssl

  7. C:\MINER\xmr-stak-2.7.0\build>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 -DCMAKE_BUILD_TYPE=DEBUG -DXMR_STAK_COMPILE=generic -DCUDA_ENABLE=ON -DCUDA_ARCH=61 -DMICROHTTPD_REQUIRED=OFF -DOpenSSL_REQUIRED=OFF -DOpenSSL_ENABLE=OFF ..

vasilevskykv commented 5 years ago

I have a problem: 2 videoadapters:

  1. Intel(R) HD Graphics 630
  2. NVIDIA GeForce GTX 1050. The xmr-stak-2.7.1 doesn't see NVIDIA GeForce GTX 1050. And it didn't generate a file nvidia.txt with correct settings for my NVIDIA.
pekster85 commented 5 years ago

ok, from vasilevskykv 7th step i deleted "Win64" -T v141" and added "-DOpenCL_ENABLE=OFF" Wich seemed towork, it did its thing , and now i have a bunch of extra files with names like "xmr-stak-asm.vcxproj.filters" but now what do do with them?

pekster85 commented 5 years ago

so i opened "ALL_BUILD.vcxproj" in vs. Duckduck-go-ed a bit. Appears i had to go to (menu)Build>Configuration manager. Set the first dropdown to release, close manager window And then (menu)Build>Build all. Wich creates the .exe in "C:\Map\xmr-stak-2.7.0\bin\Release". So i finally build it. Forgot something tho. Since i'm trying to learn to compile this for a HPC cluster, i enabled OpenSSL. Wich wasnt present yet. Now it cant find the OpenSSl.dll and i dunno howto configure OpenSSL yet. Also useless to do so, cuzthis win isnt part of the linux HPC. My q; i have to re-do the whole story, but with OpenSSlEnabled=OFF?(on the win im using to tinker) Tip to author; wordpress tutorial with forum for xmr-stak, and mine with visitors/readers CPU. Wether they volunteer a contribution or not, compile with donation set to zero, as long as they use ure online edu materials, they r contributing.

vasilevskykv commented 5 years ago

[b]pekster85,[/b] you need to open ,sln file in VS at first. Then you should open Solution properties (right mouse button click on your solution)->Startup Project. Then choose "Multiple startup projects:" Set "start" on xmr-stak and None - to other projects.

Spudz76 commented 5 years ago

I have never opened anything in VS.

@pekster85 seems you didn't make a build subdirectory but instead used cmake . from the source root? This will spew files all over the place, you are required to use mkdir ./build && cd ./build && cmake .. for the compiled files and intermediates to be ignored by Git.

pekster85 commented 5 years ago

u tell me... i wish the author had... anyway, got this pig washed.

psychocrypt commented 5 years ago

You need to follow exactly the description we provide in the documentation. A comon issue is that someone used OpenSSL binaries whixh are compiles with v140 in the v141 tolchain (this will not work)

pekster85 commented 5 years ago

"You need to follow exactly the description we provide in the documentation. A comon issue is that someone used OpenSSL binaries whixh are compiles with v140 in the v141 tolchain (this will not work)"

OK, first off, ure instructions are incomplete my smart tinker friend. Highly appreciate the effort, But, without pre-existing knowledge, or help from users here, ure screwed. Literally try it on a clean WIN. Wont work.(5x:did laptop+quadcore+8core+2sorry excuses of pc's). One HAS to switch from CMD to involve CMAKE gui, preset and press configure, the CMAKE CMD build command doesnt work, so one HAS to open VS. One HAS to select the project,put it from debug to release, and BUILD. cuz ure cmd instructions wont. Dont get me worng, i apreciate the effort, i learned alot. But it took a couple expeditions. also tried the other (cuda) on another 2 pc's, wich wont work because it cant find CUDA(yes other dep zip). and only experienced users know how to include CUDA s location to the equiasion. upto now, not one openCL or AMD has succeeded. only CPU. wich is fine for me, but still, i have 2xgtx260 cards lying around catching dust... would be a pity. Spudz 76, u missed a part. mkdir was done before. nevermind.

vasilevskykv commented 5 years ago

pekster85, I simply installed CUDA 10.0 from its oficial site, and it has been included automatically to the environment variable "PATH". But another problem appeared: XMR-STAK doesn't mine on GPU. If CPU is included, it(xmr-stak) switches to CPU, if CPU isn't included, it(xmr-stak) simply collects works from the pool and doesn't do anything with them. But the hashrate of both CPU and GPU is being calculated. GPU is NVIDIA 1050 GTX. If you try to debug xmr-stak, you'll see that xmrstak_cuda_backend will have never used (you may insert breakpoint in any line of cuda_core.cu and you'll see that it can't be achieved).

pekster85 commented 5 years ago

@vasilevskykv , "and it has been included automatically to the environment variable "PATH". " weird, i tried 5 times."CUDA could not be found, no such path or directory" and i downed v10 too. "XMR-STAK doesn't mine on GPU" that does not seem to be the authors intention... Seems to me that CUDA libraries are required to enable communication between amd driver and XMR stak. But i'll have to read a TON of code lines before its gonna make sense... Did YOU try the precompiled Version? cuz thats my next step to check. test prebuild exe, test GPU only, try mining. one has 10yr old gtx260's, but they r wasted right now, so i get to learn and tinker, and repurpose dust-collectors ...

vasilevskykv commented 5 years ago

I tried the precompiled version. It is aslo being switched to CPU, though hashrate of GPU is being calculated

vasilevskykv commented 5 years ago

It seems to me - I found my problem. CUDA can't be fully integrated to Visual Studio 2017 and NSight can't debug. I tried to make the type of files .cu - CUDA C/C++. Visual Studio didn't showed me such type. And NSight debugger dosen't see my breakpoints in .cu files.

vasilevskykv commented 5 years ago

I tried to choose 'start' in Multiple startup projects of xmrstak_cuda_backend. But an error appeared: Cannot open include file 'CL/cl.h'. No such file or directory. An error appears in gpu.hpp of xmr-stak-backend

Spudz76 commented 5 years ago

If you refer to the (upstream) CMake documentation, the files it generates are not really meant to work in the IDE. They are for the MSBuild non-GUI tools to consume and output either a Debug or Release build.

I have never heard of opening the resulting project and attempting to do anything that way. If you don't like how it builds, edit the CMakeLists.txt

For a development IDE, use CLion or something.

What you are trying to do is literally unsupported, may be why it won't work?

pekster85 commented 5 years ago

@Spudz76 (1) who r u replying to? (2) why do you think we're trying Alternative approach? (3) "edit the CMakeLists.txt" ok. how? with what, and why.

(4) since the RTX series of graphics cards came out, suitable mining cards come available secondhand at fraction of their original price. Both Nvidia AND AMD. NO GRAPHICS CARD MINES on the PRECOMPILED stak. Now i'm no programmer, no Linux guru, just a guy who reads and follows instructions. And i'm telling you, THESE INSTRUCTIONS r INCOMPLETE.

As a contibutor, one might expect a word of explanation,
cuz stating "What you are trying to do is literally unsupported, may be why it won't work?" doesnt help anyone.

Spudz76 commented 5 years ago

(1) @vasilevskykv probably, considering those were the most recent three posts here, and it's their thread to begin with

(2) Stuff about opening the vcxproj file... what, why?

(3) For whatever it is you're trying to do, which is unclear, other than compile this project which has nothing to do with looking at any of the build files CMake generated, and especially not opening them in Visual Studio or attempting to build from the IDE. If CMake didn't build the EXE/DLL outputs then you've not set up your environment (PATH, INCLUDE, LIB... among others) correctly, or you're doing CMake wrong.

(4) Release binaries support anything supported by CUDA 10.0 (driver 4xx.xx or newer), and anything AMD provided you've also not installed the wrong drivers, all work with the precompiled. Anything dropped from CUDA 10.0 is no longer supported in the precompiled releases, but work fine given CUDA 8 SDK and your own compilation. There is not much reason to bother with any of the 9.x versions now, either.

(5) Yes releases used to be compiled for CUDA8 for a long long time, now it isn't. Holding everything else back to v140 toolkit was no longer worth it, and the new PoW math works pretty bad on Fermi anyway, so the release was bumped to CUDA 10.0 SDK. CUDA 8 app also does not work best when running 9.1/9.2/10.0 level drivers, for all other cards than Fermi. If you feel the need to be angry at someone, it'd be nVidia for dropping Fermi support before people were done using them, I guess.

psychocrypt commented 5 years ago

I lost the focus in this discussion. Is there still an open issue. Note: The compile instructions work if the environment finds cmake and you use the latest dependancy package with e.g. cuda 10 and the latest visual studio. I create the binaries with this combination for Cuda10 and 9. For AMD you can use the old AMD APP Sdk or better the OpenCLlight SDK (see the docu). The precompiled binaries for windows supports all NVIDIA devices from 3.0 to 7.X (turing).

vasilevskykv commented 5 years ago

I tried to make build for AMD. I installed drivers for AMD. But it can't find OpenCL . I don't understand how to install OpenCL for Windows 10. It seems to me that it can work only for Linux. I saw open64 sdk-s only for linux type systems

pekster85 commented 5 years ago

@Spudz76 @psychocrypt The issue is: neither @vasilevskykv or me, cant get ANY GPU miner to work. I'm trying Nvidia, seems @vasilevskykv is trying AMD. Neither the precompiled stak, nor the to-be-compiled stak, seem to find what they require. i've tried the precompiled, tried compiling on 5PC's. And i'm telling you, again, something in ure guide is off. first: "For CUDA 8 execute: cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 .. For CUDA 9 and/or AMD GPUs, CPU execute: cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .." Never works. It never finds what it needs, allthough all instrucions were followed and all named neccassary components were aquired. second; "cmake --build . --config Release --target install" does NEVER work. one HAS to open VS. put the build in release, and build. cuz otherwise, nothing happens. note: my cmake cmd/gui has NEVER been able to build,(always errors) yet VS does it in 30sec.

pekster85 commented 5 years ago

@vasilevskykv OpenCLis a langage dev'd by Aplle to make use of GPU/CPU simultaneously. Each NVIDIA driver contains OpenCL. So, install Nvidia driver, and u got OpenCL installed. if all esle fails, try the SDK's on https://www.khronos.org/opencl/resources

psychocrypt commented 5 years ago

Here is the link to our documentation and also the link to the AMD OpenCLlight package

https://github.com/fireice-uk/xmr-stak/blob/master/doc/compile_Windows.md#amd-driverocl-sdk-only-needed-for-amd-gpus

If cmake not find the installed OpenCL header and lib set the environment variable AMDAPPSDKROOT to the install folder.

psychocrypt commented 5 years ago

here is an example how I compile xmr-stak for NVIDA and AMD for the release:

set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
set PATH=%CUDA_PATH%\bin;%PATH%
set CMAKE_PREFIX_PATH=%CUDA_PATH%
set AMDAPPSDKROOT=C:\Program Files (x86)\OCL_SDK_Light
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl
%% goto the source code folder
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. -DXMR-STAK_COMPILE=generic -DCMAKE_LINK_STATIC=ON
cmake --build . --config Release --target install
cd bin\Release
copy C:\xmr-stak-dep\openssl\bin\* .
vasilevskykv commented 5 years ago

OK, I installed OpenCLight package. But now it can't find xmr-stak-dep. set CMAKE_PREFIX_PATH doesn't work. It shows me that microhttpd not found, hwloc not found and openssl not found. Without these dependences the backend for AMD can't be installed

vasilevskykv commented 5 years ago

I made build and compile with AMD. But a new problem came: Run-Time Check Failure #4 - Stack area around _alloca memory reserved by this function is corrupted Address: 0x000000B9B8EFDE90 Size: 8 Allocation number within this function: 3 Data: <@8'a > 40 38 27 61 0A 02 00 00 This Exception is thrown in gpu.cpp of xmr-stak-opencl-backend, line 995. The method is // RequestedDeviceIdxs is a list of OpenCL device indexes // NumDevicesRequested is number of devices in RequestedDeviceIdxs list // Returns 0 on success, -1 on stupid params, -2 on OpenCL API error size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx) {

cl_context opencl_ctx;
cl_int ret;
cl_uint entries;

if((ret = clGetPlatformIDs(0, NULL, &entries)) != CL_SUCCESS)
{
    printer::inst()->print_msg(L1,"Error %s when calling clGetPlatformIDs for number of platforms.", err_to_str(ret));
    return ERR_OCL_API;
}

// The number of platforms naturally is the index of the last platform plus one.
if(entries <= platform_idx)
{
    printer::inst()->print_msg(L1,"Selected OpenCL platform index %d doesn't exist.", platform_idx);
    return ERR_STUPID_PARAMS;
}

/*MSVC skimping on devel costs by shoehorning C99 to be a subset of C++? Noooo... can't be.*/

ifdef GNUC

cl_platform_id PlatformIDList[entries];

else

cl_platform_id* PlatformIDList = (cl_platform_id*)_alloca(entries * sizeof(cl_platform_id));

endif

if((ret = clGetPlatformIDs(entries, PlatformIDList, NULL)) != CL_SUCCESS)
{
    printer::inst()->print_msg(L1,"Error %s when calling clGetPlatformIDs for platform ID information.", err_to_str(ret));
    return ERR_OCL_API;
}

size_t infoSize;
clGetPlatformInfo(PlatformIDList[platform_idx], CL_PLATFORM_VENDOR, 0, NULL, &infoSize);
std::vector<char> platformNameVec(infoSize);
clGetPlatformInfo(PlatformIDList[platform_idx], CL_PLATFORM_VENDOR, infoSize, platformNameVec.data(), NULL);
std::string platformName(platformNameVec.data());
if(xmrstak::params::inst().openCLVendor == "AMD" && platformName.find("Advanced Micro Devices") == std::string::npos)
{
    printer::inst()->print_msg(L1,"WARNING: using non AMD device: %s", platformName.c_str());
}

if((ret = clGetDeviceIDs(PlatformIDList[platform_idx], CL_DEVICE_TYPE_GPU, 0, NULL, &entries)) != CL_SUCCESS)
{
    printer::inst()->print_msg(L1,"Error %s when calling clGetDeviceIDs for number of devices.", err_to_str(ret));
    return ERR_OCL_API;
}

// Same as the platform index sanity check, except we must check all requested device indexes
for(int i = 0; i < num_gpus; ++i)
{
    if(entries <= ctx[i].deviceIdx)
    {
        printer::inst()->print_msg(L1,"Selected OpenCL device index %lu doesn't exist.\n", ctx[i].deviceIdx);
        return ERR_STUPID_PARAMS;
    }
}

ifdef GNUC

cl_device_id DeviceIDList[entries];

else

cl_device_id* DeviceIDList = (cl_device_id*)_alloca(entries * sizeof(cl_device_id));

endif

if((ret = clGetDeviceIDs(PlatformIDList[platform_idx], CL_DEVICE_TYPE_GPU, entries, DeviceIDList, NULL)) != CL_SUCCESS)
{
    printer::inst()->print_msg(L1,"Error %s when calling clGetDeviceIDs for device ID information.", err_to_str(ret));
    return ERR_OCL_API;
}

// Indexes sanity checked above

ifdef GNUC

cl_device_id TempDeviceList[num_gpus];

else

cl_device_id* TempDeviceList = (cl_device_id*)_alloca(entries * sizeof(cl_device_id));

endif

for(int i = 0; i < num_gpus; ++i)
{
    ctx[i].DeviceID = DeviceIDList[ctx[i].deviceIdx];
    TempDeviceList[i] = DeviceIDList[ctx[i].deviceIdx];
}

opencl_ctx = clCreateContext(NULL, num_gpus, TempDeviceList, NULL, NULL, &ret);
if(ret != CL_SUCCESS)
{
    printer::inst()->print_msg(L1,"Error %s when calling clCreateContext.", err_to_str(ret));
    return ERR_OCL_API;
}

//char* source_code = LoadTextFile(sSourcePath);

const char *fastIntMathV2CL =
        #include "./opencl/fast_int_math_v2.cl"
;
const char *fastDivHeavyCL =
    #include "./opencl/fast_div_heavy.cl"
;
const char *cryptonightCL =
        #include "./opencl/cryptonight.cl"
;
const char *blake256CL =
        #include "./opencl/blake256.cl"
;
const char *groestl256CL =
        #include "./opencl/groestl256.cl"
;
const char *jhCL =
        #include "./opencl/jh.cl"
;
const char *wolfAesCL =
        #include "./opencl/wolf-aes.cl"
;
const char *wolfSkeinCL =
        #include "./opencl/wolf-skein.cl"
;

std::string source_code(cryptonightCL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_FAST_INT_MATH_V2"), fastIntMathV2CL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_FAST_DIV_HEAVY"), fastDivHeavyCL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_WOLF_AES"), wolfAesCL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_WOLF_SKEIN"), wolfSkeinCL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_JH"), jhCL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_BLAKE256"), blake256CL);
source_code = std::regex_replace(source_code, std::regex("XMRSTAK_INCLUDE_GROESTL256"), groestl256CL);

// create a directory  for the OpenCL compile cache
create_directory(get_home() + "/.openclcache");

std::vector<std::shared_ptr<InterleaveData>> interleaveData(num_gpus, nullptr);

for(int i = 0; i < num_gpus; ++i)
{
    const size_t devIdx = ctx[i].deviceIdx;
    if(interleaveData.size() <= devIdx)
    {
        interleaveData.resize(devIdx + 1u, nullptr);
    }
    if(!interleaveData[devIdx])
    {
        interleaveData[devIdx].reset(new InterleaveData{});
        interleaveData[devIdx]->lastRunTimeStamp = get_timestamp_ms();

    }
    ctx[i].idWorkerOnDevice=interleaveData[devIdx]->numThreadsOnGPU;
    ++interleaveData[devIdx]->numThreadsOnGPU;
    ctx[i].interleaveData = interleaveData[devIdx];
    ctx[i].interleaveData->adjustThreshold = static_cast<double>(ctx[i].interleave)/100.0;
    ctx[i].interleaveData->startAdjustThreshold = ctx[i].interleaveData->adjustThreshold;

    const std::string backendName = xmrstak::params::inst().openCLVendor;
    if( (ctx[i].stridedIndex == 2 || ctx[i].stridedIndex == 3) && (ctx[i].rawIntensity % ctx[i].workSize) != 0)
    {
        size_t reduced_intensity = (ctx[i].rawIntensity / ctx[i].workSize) * ctx[i].workSize;
        ctx[i].rawIntensity = reduced_intensity;
        printer::inst()->print_msg(L0, "WARNING %s: gpu %d intensity is not a multiple of 'worksize', auto reduce intensity to %d", backendName.c_str(), ctx[i].deviceIdx, int(reduced_intensity));
    }

    if((ret = InitOpenCLGpu(opencl_ctx, &ctx[i], source_code.c_str())) != ERR_SUCCESS)
    {
        return ret;
    }
}

return ERR_SUCCESS;

}