Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Can't compile with CUDA 9.1 #606

Closed
RGhost77 opened this issue Dec 18, 2017 · 11 comments
Closed

Can't compile with CUDA 9.1 #606

RGhost77 opened this issue Dec 18, 2017 · 11 comments

Comments

@RGhost77
Copy link

Hello!

Trying to compile latest DEV with CUDA Toolkit 9.1 under Windows 7.
Got error:
"C:\xmr-stak-dev\build\install.vcxproj" (default target) (1) -> "C:\xmr-stak-dev\build\ALL_BUILD.vcxproj" (default target) (3) -> "C:\xmr-stak-dev\build\xmrstak_cuda_backend.vcxproj" (default target) (7) -> (CustomBuild target) -> d:\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-dev\build\xmrstak_cuda_backend.vcxproj]
With CUDA 8 have no problems. Any suggestions?

@ChaosMarc
Copy link
Contributor

I had the same problem and fixed it by editing the host_config.h file in line 133
#if _MSC_VER < 1600 || _MSC_VER > 1912
After I changed the max value of the check to 1912 (or higher) the build was successful.

@franklinviniciusra
Copy link

It did not work out for me. The error disappeared, but I got other errors.

Specify --help for usage, or press the help button on the CMake GUI.

C:\xmr-stak-master>cd build

C:\xmr-stak-master\build>cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64
..
-- Set miner currency to 'monero' and 'aeon'
-- Configuring done
-- Generating done
-- Build files have been written to: C:/xmr-stak-master/build

C:\xmr-stak-master\build>cmake --build . --config Release --target install
Microsoft(R) Build Engine versão 15.5.180.51428 para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

Compilação de 18/12/2017 12:03:49 iniciada.
Projeto "C:\xmr-stak-master\build\install.vcxproj" no nó 1 (destinos padrão).
O projeto "C:\xmr-stak-master\build\install.vcxproj" (1) está compilando "C:\xm
r-stak-master\build\ZERO_CHECK.vcxproj" (2) no nó 1 (destinos padrão).
InitializeBuildStatus:
Criando "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" porque "Al
waysCreate" foi especificado.
CustomBuild:
Todas as saídas estão atualizadas.
FinalizeBuildStatus:
Excluindo o arquivo "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild
".
Tocando "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Projeto de compilação pronto "C:\xmr-stak-master\build\ZERO_CHECK.vcxproj" (des
tinos padrão).

O projeto "C:\xmr-stak-master\build\install.vcxproj" (1) está compilando "C:\xm
r-stak-master\build\ALL_BUILD.vcxproj" (3) no nó 1 (destinos padrão).
O projeto "C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (3) está compilando "C:
xmr-stak-master\build\xmr-stak.vcxproj" (4) no nó 1 (destinos padrão).
O projeto "C:\xmr-stak-master\build\xmr-stak.vcxproj" (4) está compilando "C:\x
mr-stak-master\build\xmr-stak-backend.vcxproj" (5) no nó 1 (destinos padrão).
O projeto "C:\xmr-stak-master\build\xmr-stak-backend.vcxproj" (5) está compilan
do "C:\xmr-stak-master\build\xmr-stak-c.vcxproj" (6) no nó 1 (destinos padrão).
InitializeBuildStatus:
Criando "xmr-stak-c.dir\Release\xmr-stak-c.tlog\unsuccessfulbuild" porque "Al
waysCreate" foi especificado.
CustomBuild:
Todas as saídas estão atualizadas.
ClCompile:
Todas as saídas estão atualizadas.
Lib:
Todas as saídas estão atualizadas.
xmr-stak-c.vcxproj -> C:\xmr-stak-master\build\bin\Release\xmr-stak-c.lib
FinalizeBuildStatus:
Excluindo o arquivo "xmr-stak-c.dir\Release\xmr-stak-c.tlog\unsuccessfulbuild
".
Tocando "xmr-stak-c.dir\Release\xmr-stak-c.tlog\xmr-stak-c.lastbuildstate".
Projeto de compilação pronto "C:\xmr-stak-master\build\xmr-stak-c.vcxproj" (des
tinos padrão).

InitializeBuildStatus:
Criando "xmr-stak-backend.dir\Release\xmr-stak-backend.tlog\unsuccessfulbuild
" porque "AlwaysCreate" foi especificado.
CustomBuild:
Todas as saídas estão atualizadas.
ClCompile:
Todas as saídas estão atualizadas.
Todas as saídas estão atualizadas.
Todas as saídas estão atualizadas.
Lib:
Todas as saídas estão atualizadas.
xmr-stak-backend.vcxproj -> C:\xmr-stak-master\build\bin\Release\xmr-stak-bac
kend.lib
FinalizeBuildStatus:
Excluindo o arquivo "xmr-stak-backend.dir\Release\xmr-stak-backend.tlog\unsuc
cessfulbuild".
Tocando "xmr-stak-backend.dir\Release\xmr-stak-backend.tlog\xmr-stak-backend.
lastbuildstate".
Projeto de compilação pronto "C:\xmr-stak-master\build\xmr-stak-backend.vcxproj
" (destinos padrão).

InitializeBuildStatus:
Criando "xmr-stak.dir\Release\xmr-stak.tlog\unsuccessfulbuild" porque "Always
Create" foi especificado.
CustomBuild:
Todas as saídas estão atualizadas.
ClCompile:
Todas as saídas estão atualizadas.
Link:
Todas as saídas estão atualizadas.
xmr-stak.vcxproj -> C:\xmr-stak-master\build\bin\Release\xmr-stak.exe
FinalizeBuildStatus:
Excluindo o arquivo "xmr-stak.dir\Release\xmr-stak.tlog\unsuccessfulbuild".
Tocando "xmr-stak.dir\Release\xmr-stak.tlog\xmr-stak.lastbuildstate".
Projeto de compilação pronto "C:\xmr-stak-master\build\xmr-stak.vcxproj" (desti
nos padrão).

O projeto "C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (3) está compilando "C:
xmr-stak-master\build\xmrstak_cuda_backend.vcxproj" (7) no nó 1 (destinos padrã
o).
InitializeBuildStatus:
Tocando "xmrstak_cuda_backend.dir\Release\xmrstak_.500667A6.tlog\unsuccessful
build".
CustomBuild:
Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/bac
kend/nvidia/nvcc_code/Release/xmrstak_cuda_backend_generated_cuda_core.cu.obj
cuda_core.cu
CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the conf
igured host compiler. Flag will be ignored. [C:\xmr-stak-master\build\xmrstak_c
uda_backend.vcxproj]
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 valu
e [C:\xmr-stak-master\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 valu
e [C:\xmr-stak-master\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 valu
e [C:\xmr-stak-master\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 valu
e [C:\xmr-stak-master\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 val
ue [C:\xmr-stak-master\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 val
ue [C:\xmr-stak-master\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 val
ue [C:\xmr-stak-master\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 val
ue [C:\xmr-stak-master\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-master\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<
, int>" has no member "type" [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcx
proj]
detected during instantiation of type "std::enable_if_t<, int>"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xutility(543): here

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-master\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-master\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-master\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-master\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<
, void>" has no member "type" [C:\xmr-stak-master\build\xmrstak_cuda_backend.vc
xproj]
detected during instantiation of type "std::enable_if_t<, void>"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xstring(1693): here

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-master\build\xmrstak_cuda_backend.vcxproj]

16 errors detected in the compilation of "C:/Users/FRANKL~1.ARA/AppData/Local
/Temp/tmpxft_00002774_00000000-18_cuda_core.compute_70.cpp1.ii".
CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the conf
igured host compiler. Flag will be ignored. [C:\xmr-stak-master\build\xmrstak_c
uda_backend.vcxproj]
cuda_core.cu
CMake Error at xmrstak_cuda_backend_generated_cuda_core.cu.obj.Release.cmake:
279 (message):
Error generating file
C:/xmr-stak-master/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backen
d/nvidia/nvcc_code/Release/xmrstak_cuda_backend_generated_cuda_core.cu.obj

Projeto de compilação pronto "C:\xmr-stak-master\build\xmrstak_cuda_backend.vcx
proj" (destinos padrão) -- FALHA.

O projeto "C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (3) está compilando "C:
xmr-stak-master\build\xmrstak_opencl_backend.vcxproj" (8) no nó 1 (destinos pad
rão).
InitializeBuildStatus:
Criando "xmrstak_opencl_backend.dir\Release\xmrstak_.019DFA26.tlog\unsuccessf
ulbuild" porque "AlwaysCreate" foi especificado.
CustomBuild:
Todas as saídas estão atualizadas.
ClCompile:
Todas as saídas estão atualizadas.
Link:
Todas as saídas estão atualizadas.
xmrstak_opencl_backend.vcxproj -> C:\xmr-stak-master\build\bin\Release\xmrsta
k_opencl_backend.dll
FinalizeBuildStatus:
Excluindo o arquivo "xmrstak_opencl_backend.dir\Release\xmrstak_.019DFA26.tlo
g\unsuccessfulbuild".
Tocando "xmrstak_opencl_backend.dir\Release\xmrstak_.019DFA26.tlog\xmrstak_op
encl_backend.lastbuildstate".
Projeto de compilação pronto "C:\xmr-stak-master\build\xmrstak_opencl_backend.v
cxproj" (destinos padrão).

Projeto de compilação pronto "C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (dest
inos padrão) -- FALHA.

Projeto de compilação pronto "C:\xmr-stak-master\build\install.vcxproj" (destin
os padrão) -- FALHA.

FALHA da compilação.

"C:\xmr-stak-master\build\install.vcxproj" (destino padrão) (1) ->
"C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (destino padrão) (3) ->
"C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj" (destino padrão) (7) ->
(CustomBuild destino) ->
CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the co
nfigured host compiler. Flag will be ignored. [C:\xmr-stak-master\build\xmrstak
_cuda_backend.vcxproj]
CUSTOMBUILD : nvcc warning : The -std=c++11 flag is not supported with the co
nfigured host compiler. Flag will be ignored. [C:\xmr-stak-master\build\xmrstak
_cuda_backend.vcxproj]

"C:\xmr-stak-master\build\install.vcxproj" (destino padrão) (1) ->
"C:\xmr-stak-master\build\ALL_BUILD.vcxproj" (destino padrão) (3) ->
"C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj" (destino padrão) (7) ->
(CustomBuild destino) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(504): error : expression must have a constant va
lue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(505): error : expression must have a constant va
lue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(506): error : expression must have a constant va
lue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(538): error : expression must have a constant va
lue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(1043): error : expression must have a constant v
alue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(1558): error : expression must have a constant v
alue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(2371): error : expression must have a constant v
alue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\type_traits(2371): error : expression must have a constant v
alue [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xutility(543): error : expression must have a constant value
[C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xtr1common(58): error : class "std::enable_if<, int>" has no member "type" [C:\xmr-stak-master\build\xmrstak_cuda_backend.v
cxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xmemory0(390): error : expression must have a constant value
[C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xmemory0(1002): error : expression must have a constant valu
e [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xmemory0(1322): error : expression must have a constant valu
e [C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xstring(1693): error : expression must have a constant value
[C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xtr1common(58): error : class "std::enable_if<, void>" has no member "type" [C:\xmr-stak-master\build\xmrstak_cuda_backend.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\1
4.12.25827\include\xutility(298): error : expression must have a constant value
[C:\xmr-stak-master\build\xmrstak_cuda_backend.vcxproj]

2 Aviso(s)
16 Erro(s)

@ChaosMarc
Copy link
Contributor

try building with toolset v140 and the old dependency release

@bomb-on
Copy link

bomb-on commented Dec 21, 2017

Can you try to uninstall current VS version and install v15.4.5 (you can find it here) and try to compile with CUDA 9 (and toolset v141) again? (You don't have to modify host_config.h in that case)

@ChaosMarc
Copy link
Contributor

@bomb-on that works perfectly. I could successfully build with VS v15.4.5, CUDA v9.1, Toolset v141 and Dependencies v2
Thank you very much :)

@franklinviniciusra
Copy link

Its works !!! Big THANKS !!!

@nonvtec
Copy link

nonvtec commented Dec 22, 2017

This worked for me too! Thanks

VS v15.4.5, CUDA v9.1, Toolset v141 and Dependencies v2

@bomb-on
Copy link

bomb-on commented Dec 22, 2017

You are more than welcome! ;) Enjoy your mining!

@RGhost77
Copy link
Author

Yeah, works. Tnx!

@fireice-uk
Copy link
Owner

Our new release fixes this too.

@iformas
Copy link

iformas commented Dec 30, 2017

@fireice-uk i have the same issue on release 2.2.0 with Visual Studio 2017 Enterpirse 15.5.2 , VC++ 141 and CUDA 9.1
switching xmrstak_cuda_backend toolchain from v1.411 to v1.40 didn't work for me

dam-ien added a commit to dam-ien/xmr-stak that referenced this issue Jan 15, 2018
Fix for fireice-uk#750, fireice-uk#626, fireice-uk#606, fireice-uk#534, without having to downgrade and do not require modification of host_config.h
Require an additional component during VS2017 installation (VC++ 2017 version 15.4 v14.11 toolset) and an additional command execution before compilation.


,  without having to downgrade
Add instructions for compiling with
dam-ien added a commit to dam-ien/xmr-stak that referenced this issue Jan 15, 2018
Fix for fireice-uk#750, fireice-uk#626, fireice-uk#606, fireice-uk#534, without having to downgrade and do not require modification of host_config.h
Require an additional component during VS2017 installation (VC++ 2017 version 15.4 v14.11 toolset) and an additional command execution before compilation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants