Failed to build the project with CMake in Windows: warning MSB8003 and fatal error C1083 #984
ccartermices
started this conversation in
General
Replies: 1 comment
-
I have the same error, Visual Studio 2022, CUDA 11.8, Windows 10 As a workaround I've updated and added references to Universal CRT headers and libs to CudaToolkitIncludeDir and CudaToolkitcLibDir:
and
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I use CMake to build the project (on Windows, used in developer command prompt), with the command:
instant-ngp$ cmake . -B build
However, it failed:
Here are some of the log:
`-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at D:/cmake/share/cmake-3.24/Modules/CMakeDetermineCompilerId.cmake:739 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.
Compiler:
Build flags:
Id flags: --keep;--keep-dir;tmp -v
The output was:
1
.NET Framework Microsoft (R) 16.9.0+57a23d249
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(501,5):
MSBuild warning MSB8003: The property-name property is not defined. Some build tools may not be found.
[E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj]
InitializeBuildStatus:
“Debug\CompilerIdCUDA.tlog\unsuccessfulbuild”,“AlwaysCreate”。
AddCudaCompileDeps:
CudaBuildCore:
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\crtdefs.h(10):
fatal error C1083: Cannot open compiler intermediate file: “corecrt.h”: No such file
[E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj]
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA
11.7.targets(790,9): error MSB3721: command“"C:\Program Files\NVIDIA GPU
Computing Toolkit\CUDA\v11.7\bin\nvcc.exe"
-gencode=arch=compute_52,code="sm_52,compute_52" --use-local-env -ccbin
"C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64" -x cu
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include"
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include" -G
--keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static
-v -g -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FdDebug\vc142.pdb /FS /Zi
/RTC1 /MDd " -o
E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\x64\Debug\CMakeCUDACompilerId.cu.obj
"E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CMakeCUDACompilerId.cu"”,return code is
2。
[E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj]
“E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj”(CudaBuildCore
) - failed。
“E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj”
failed。
“E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj”(defalut target)
(1) ->
(PrepareForBuild target) ->
“E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj”(defalut target)
(1) ->
“E:\instant-ngp-master\build\CMakeFiles\3.24.1\CompilerIdCUDA\CompilerIdCUDA.vcxproj”(CudaBuildCore
target) (1:2) ->
(CudaBuildCore target) ->
used time 00:00:02.00
Call Stack (most recent call first):
D:/cmake/share/cmake-3.24/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
D:/cmake/share/cmake-3.24/Modules/CMakeDetermineCompilerId.cmake:48 (__determine_compiler_id_test)
D:/cmake/share/cmake-3.24/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:11 (project)
-- Configuring incomplete, errors occurred!
See also "E:/instant-ngp-master/build/CMakeFiles/CMakeOutput.log".
See also "E:/instant-ngp-master/build/CMakeFiles/CMakeError.log".`
Beta Was this translation helpful? Give feedback.
All reactions