-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
error: ‘result_of_t’ is not a member of ‘std’ #116
Comments
what version of libc++ do you have? maybe you only have c++20 and perhaps the build only works until c++17 or c++19. can you build in one of the dockerized environments noted in #20 ? |
thank you for your reply first. I guess the standard of C++ may effect the process of compilation, so I added 'set(CMAKE_C_FLAGS "-std=c99") It works, and the error above is fixed. But another error appears: Consolidate compiler generated dependencies of target glfw_objects |
BTW, I checked the version of libstdc++ is libstdc++.so.6.0.24. |
hmm well the included cmake file already specifies c++14 Line 56 in 70b59a4
but maybe it needs an additional the docker container i cited above has |
Same question. How to solve this problem? |
Solved this by another version of CXX compiler using |
What version did you use? I still have this issue... Thanks! |
hi,How did you solve this problem in the end |
I solved it using this method: An error occurred : 然后,在CMakeList.txt 前面添加: add_compile_options(-fPIC) 再次执行 cmake --build build --config RelWithDebInfo -j 16 编译成功 |
hi!
When I input 'instant-ngp$ cmake --build build --config RelWithDebInfo -j 16', the Cmake compiling process ended with error ‘result_of_t’ is not a member of ‘std’.
The version of gcc is 8.3.1, and my environment meets the requirements. I guess such error is still related to the environment.
Here are the details:
-- Using X11 for window creation
-- !!! Warning OptiX_INSTALL_DIR not set in environment. using default
-- OptiX_INSTALL_DIR value: /usr/local/NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64
-- OptiX headers (optix.h and friends) not found.
CMake Warning at CMakeLists.txt:170 (message):
OptiX was not found. Neural graphics primitives will still compile and run
correctly. However, SDF training in 'raystab' and 'pathescape' modes will
be significantly slower.
-- pybind11 v2.7.1
-- Targeting GPU architectures: 75;75;75;75;75;75;75;75;75;75
-- Configuring done
-- Generating done
-- Build files have been written to: /hd4/yangsonglin/instant-ngp/build
Consolidate compiler generated dependencies of target glfw_objects
Consolidate compiler generated dependencies of target tiny-cuda-nn
[ 29%] Built target glfw_objects
[ 50%] Built target tiny-cuda-nn
Consolidate compiler generated dependencies of target ngp
[ 52%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui.cpp.o
[ 56%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui_tables.cpp.o
[ 56%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui_impl_glfw.cpp.o
[ 60%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/ImGuizmo.cpp.o
[ 60%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui_impl_opengl3.cpp.o
[ 61%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui_draw.cpp.o
[ 63%] Building CXX object CMakeFiles/ngp.dir/dependencies/imgui/imgui_widgets.cpp.o
[ 65%] Building CUDA object CMakeFiles/ngp.dir/src/marching_cubes.cu.o
[ 67%] Building CUDA object CMakeFiles/ngp.dir/src/camera_path.cu.o
[ 69%] Building CUDA object CMakeFiles/ngp.dir/src/common_device.cu.o
[ 70%] Building CUDA object CMakeFiles/ngp.dir/src/render_buffer.cu.o
[ 74%] Building CUDA object CMakeFiles/ngp.dir/src/testbed.cu.o
[ 74%] Building CUDA object CMakeFiles/ngp.dir/src/nerf_loader.cu.o
[ 76%] Building CUDA object CMakeFiles/ngp.dir/src/testbed_image.cu.o
[ 78%] Building CUDA object CMakeFiles/ngp.dir/src/testbed_sdf.cu.o
[ 80%] Building CUDA object CMakeFiles/ngp.dir/src/testbed_nerf.cu.o
[ 81%] Building CUDA object CMakeFiles/ngp.dir/src/testbed_volume.cu.o
[ 83%] Building CXX object CMakeFiles/ngp.dir/src/thread_pool.cpp.o
[ 85%] Building CUDA object CMakeFiles/ngp.dir/src/tinyexr_wrapper.cu.o
In file included from /hd4/yangsonglin/instant-ngp/src/thread_pool.cpp:15:0:
/hd4/yangsonglin/instant-ngp/include/neural-graphics-primitives/thread_pool.h:44:71: error: ‘result_of_t’ is not a member of ‘std’
auto enqueueTask(F&& f, bool highPriority = false) -> std::future<std::result_of_t<F()>> {
^
/hd4/yangsonglin/instant-ngp/include/neural-graphics-primitives/thread_pool.h:44:71: error: ‘result_of_t’ is not a member of ‘std’
/hd4/yangsonglin/instant-ngp/include/neural-graphics-primitives/thread_pool.h:44:90: error: type/value mismatch at argument 1 in template parameter list for ‘template class std::future’
auto enqueueTask(F&& f, bool highPriority = false) -> std::future<std::result_of_t<F()>> {
^
/hd4/yangsonglin/instant-ngp/include/neural-graphics-primitives/thread_pool.h:44:90: error: expected a type, got ‘( < F())’
/hd4/yangsonglin/instant-ngp/include/neural-graphics-primitives/thread_pool.h:44:91: error: expected initializer before ‘>’ token
auto enqueueTask(F&& f, bool highPriority = false) -> std::future<std::result_of_t<F()>> {
^
[ 87%] Building CXX object CMakeFiles/ngp.dir/src/tinyobj_loader_wrapper.cpp.o
gmake[2]: *** [CMakeFiles/ngp.dir/src/thread_pool.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/ngp.dir/all] Error 2
gmake: *** [all] Error 2
The text was updated successfully, but these errors were encountered: