Comments (13)
Windows 7 Professional
Visual Studio 2017 (14.12.25827)
Cuda 9.1.85
cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 ..
- OK
cmake --build . --config Release --target install
- BAD
I did as You wrote above
Add CMakeLists.txt:
set(CUDA_HOST_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/HostX64/x64/cl.exe")
list(APPEND CUDA_NVCC_FLAGS --cl-version=2017)
I am getting the following error:
c:\program files\nvidia gpu computing toolkit\cuda\v9.1\include\crt/host_config.h(135): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported! [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj]
I tried to change C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include\crt\host_config.h
#if _MSC_VER < 1600 || _MSC_VER > 1911
=> #if _MSC_VER < 1600
and got even more errors
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(504): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(505): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(506): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(538): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(1043): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(1558): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(2371): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\type_traits(2371): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility(543): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtr1common(58): error : class "std::enable_if<<error-constant>, int>" has no member "type" [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0(390): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0(1002): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0(1322): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring(1693): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtr1common(58): error : class "std::enable_if<<error-constant>, void>" has no member "type" [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility(298): error : expression must have a constant value [C:\xmr-stak\build\xmrstak_cuda_backend.vcxproj]
from xmr-stak.
I have managed to build this and it seems to be a cmake issue.
Microsoft changed the default toolkit directory to a different scheme. The cmake variable CUDA_HOST_COMPILER is set to $(VCInstallDir)bin which is no longer correct. I have set this to a absolute path like:
set(CUDA_HOST_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX64/x64/cl.exe")
(note the forward slashes)
Finally i have set the --cl-version flag to nvcc compiler but i do not know if this is required:
list(APPEND CUDA_NVCC_FLAGS --cl-version=2017)
After those changes i have managed to successfully build this.
from xmr-stak.
exactly my problems...
from xmr-stak.
You used this cmake -G "Visual Studio 15 2017 Win64"
CMake command but the documentation say cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 ..
Please follow exactly the WINDOWS compile guide https://github.com/fireice-uk/xmr-stak/blob/dev/doc/compile_Windows.md#compile
from xmr-stak.
Thank you very much, i downloaded and installed the v140 and you were right, it now compiles correctly.
Keep in mind that the latest version of Visual Studio 2017 by default ships with the windows toolkit v141.
I now get some runtime errors related to cuda_extra.cu file. If you want any help trying to build this with the 141 version i am willing to try it out and provide logs. Thank you again
from xmr-stak.
from xmr-stak.
I also get this error. Fresh install of visual studio (v141) + cuda 9.0 fails.
This is the error message:
Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/Release/xmrstak_cuda_backend_generated_cuda_core.cu.obj CMake Error at xmrstak_cuda_backend_generated_cuda_core.cu.obj.Release.cmake:222 (message): Error generating C:/Users/MAIN/github/xmr-stak/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/Release/xmrstak_cuda_backend_generated_cuda_core.cu.obj
from xmr-stak.
CUDA header says
#if _MSC_VER < 1600 || _MSC_VER > 1911
So it isn't CUDA <-> VS incompatibility.
from xmr-stak.
from xmr-stak.
@psychocrypt just noting here that setting it to an absolute path is a bad idea for a general usage - it will change with VS service packs.
from xmr-stak.
❗️ The problem is Visual Studio 2017 15.5 failed to support CUDA 9
Or vice-versa. Either way the CUDA community is pretty pissed.
from xmr-stak.
so is it possible to uninstall 141 toolset and install 140
would this fix this whole mess? did anyone tried?
from xmr-stak.
so is it possible to uninstall 141 toolset and install 140
would this fix this whole mess? did anyone tried?
I am already using 14.0 but still getting the same error..
from xmr-stak.
Related Issues (20)
- 'make install' compilation fails due to invalid conversion HOT 6
- Graft new algo
- i have 2 Nvidia GPUs but only mine with GPU0
- Memory Alloc Failed : mlock failed
- Compile failed on x86 platform with msvc , error MSB3721: The command "ml.exe ... exited with code 1. [F:\Fireice-uk\xmr-stak\build_x86\xmr-stak-asm.vcxproj]
- Can't find bbscoin to mine HOT 1
- Issue running `make install` on arch linux HOT 2
- Aeon missing?
- Virus found HOT 5
- NVIDIA Invalid Result GPU ID 0 HOT 4
- Issue with Cryptonight_R algorithm and CUDA
- Windows 10 Deleting Files upon Extraction HOT 1
- lee
- It does not detect my GPU
- 3N1P2rDthVX2wPPSQ5nUutkqSPqtShcL8m
- error -- unsupported GNU version! gcc versions later than 8 are not supported!
- Ubuntu 20.04.5 - kernel 5.13.0-52-generic - AMDGPU 21.50 - CryptoNightGPU - MEMORY ALLOC FAILED HOT 1
- Ubuntu 20.04.5 - kernel 5.13.0-52-generic - AMDGPU 21.50 - CryptoNightGPU - Running miner in background gives low hash-rate HOT 2
- Modernizing XMRstak
- SOCKET ERROR. Can't login to pool. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmr-stak.