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

windows10 build error #178

Closed
quinwu opened this issue Feb 19, 2022 · 4 comments
Closed

windows10 build error #178

quinwu opened this issue Feb 19, 2022 · 4 comments

Comments

@quinwu
Copy link

quinwu commented Feb 19, 2022

when I use cmake . -B build,cmd printed the following output, I think my build was successful:

(ngp) C:\Users\xxx\Desktop\instant-ngp>cmake . -B build
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30140.0
-- The CXX compiler identification is MSVC 19.29.30140.0
-- The CUDA compiler identification is NVIDIA 11.2.67
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Using Win32 for window creation
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- OptiX_INSTALL_DIR value: C:\ProgramData\NVIDIA Corporation\OptiX SDK 7.4.0
-- Found Python: C:/ProgramData/Anaconda3/envs/ngp/python.exe (found suitable version "3.8.12", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
-- pybind11 v2.7.1
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeDependentOption.cmake:84 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run "cmake --help-policy CMP0127" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
dependencies/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
-- Targeting GPU architectures: 86
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/xxx/Desktop/instant-ngp/build

but when i run cmake --build build --config RelWithDebInfo -j 16, an error seems to have occurred:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory(308): error : e
xpected a "(" [C:\Users\xxx\Desktop\instant-ngp\build\optix_program.vcxproj]
detected during:
instantiation of "void std::_Destroy_in_place(_Ty &) [with _Ty=size_t]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\valarray(552): here
instantiation of "void std::valarray<_Ty>::_Tidy_deallocate() [with _Ty=size_t]"
(47): here
instantiation of "std::_Tidy_deallocate_guard<_Ty>::~_Tidy_deallocate_guard() [with _Ty=std::valarray]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\valarray(534): here
instantiation of "void std::valarray<_Ty>::_Grow(size_t, const _Ty *, size_t) [with _Ty=size_t]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\valarray(90): here
instantiation of "std::valarray<_Ty>::valarray(const std::valarray<_Ty> &) [with _Ty=size_t]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\valarray(1509): here
glfw_objects.vcxproj -> C:\Users\xxx\Desktop\instant-ngp\build\dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo
\glfw_objects.lib
Error limit reached.
100 errors detected in the compilation of "C:/Users/xxx/Desktop/instant-ngp/src/optix/raytrace.cu".
Compilation terminated.
raytrace.cu
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.t
argets(785,9): error MSB3721: 命令“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin\nvcc.exe" -gencode=arch=
compute_52,code="sm_52,compute_52" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Commun
ity\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64" -x cu -I"C:\Users\xxx\Desktop\instant-ngp\dependencies" -I"C:\Users\y
ckj\Desktop\instant-ngp\dependencies\eigen" -I"C:\Users\xxx\Desktop\instant-ngp\dependencies\filesystem" -I"C:\Users\y
ckj\Desktop\instant-ngp\dependencies\glfw\include" -I"C:\Users\xxx\Desktop\instant-ngp\dependencies\imgui\gl3w" -I"C:
Users\xxx\Desktop\instant-ngp\dependencies\nanovdb" -I"C:\ProgramData\NVIDIA Corporation\OptiX SDK 7.4.0\include" -I"C
:\Users\xxx\Desktop\instant-ngp\dependencies\tiny-cuda-nn\include" -I"C:\Users\xxx\Desktop\instant-ngp\dependencies\t
iny-cuda-nn\dependencies" -I"C:\Users\xxx\Desktop\instant-ngp\dependencies\tinylogger" -I"C:\Users\xxx\Desktop\instan
t-ngp\include" -I"C:\Users\xxx\Desktop\instant-ngp\build" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
include" --keep-dir x64\RelWithDebInfo -maxrregcount=0 --machine 64 -ptx -cudart static --expt-relaxed-constexpr
-std=c++14 -Xcompiler="/EHsc -Zi -Ob1" -o optix_program.dir\RelWithDebInfo\raytrace.ptx -D_WINDOWS -DNDEBUG -DTCNN_MIN
_GPU_ARCH=86 -DTCNN_SHAMPOO -DNGP_GUI -DNGP_OPTIX -D"NGP_VERSION="1.0dev"" -D"CMAKE_INTDIR="RelWithDebInfo"" -D_MBC
S -D"CMAKE_INTDIR="RelWithDebInfo"" "C:\Users\xxx\Desktop\instant-ngp\src\optix\raytrace.cu"” abort, return code is 1。 [C:\Users\xxx\Desktop\instant-ngp\build\optix_program.vcxproj]

@ADTClone
Copy link

I have a potentially similar set of errors.

Here's a couple of resources I'm looking into atm:

Indicating there could be an issue with a minor version upgrade of VS 2019 (from 16.9 to 16.10-11?). A recommendation (from the first link) was to download an older version of MSVC and force cmake to use that instead. However there is a potential bug in cmake which makes it ignore the specification of a minor toolset version when there's a later version installed.

So overall quite frustrating. Let me know if this helps at all - I'm going to play around with CUDA and VS versions to see if some of the later releases fix these issues.

@ADTClone
Copy link

Found the following historical issues potentially related:

Both recommend upgrading to CUDA 11.6 along with a couple of other upgrades. I'm upgrading from 11.3 to 11.6 now will update whether it resolves the issue.

@ADTClone
Copy link

Can confirm I successfully built the project after upgrading to CUDA 11.6

@Tom94 Tom94 closed this as completed Feb 21, 2022
@quinwu
Copy link
Author

quinwu commented Feb 23, 2022

When I upgraded cuda to 11.6 and also upgraded msvc to the latest version, there was still no compilation result.
Same log as this one #213

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

3 participants