graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.68k stars 1.93k forks source link

glog was not properly included? #715

Open truncs opened 8 months ago

truncs commented 8 months ago

Stacktrace

c++ -MMD -MF /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-311/ext.o.d -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/lib/python3.11/site-packages/torch/include -I/usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3.11/site-packages/torch/include/TH -I/usr/lib/python3.11/site-packages/torch/include/THC -I/opt/cuda/include -I/zfs/aditya/workspace/gaussian-splatting/env/include -I/usr/include/python3.11 -c -c /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/ext.cpp -o /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-311/ext.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1017"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++17
      In file included from /usr/include/c10/util/logging_is_google_glog.h:50,
                       from /usr/include/c10/util/Logging.h:26,
                       from /usr/include/ATen/core/ivalue_inl.h:25,
                       from /usr/include/ATen/core/ivalue.h:1551,
                       from /usr/include/ATen/core/List_inl.h:4,
                       from /usr/include/ATen/core/List.h:490,
                       from /usr/include/ATen/core/IListRef_inl.h:3,
                       from /usr/include/ATen/core/IListRef.h:631,
                       from /usr/include/ATen/WrapDimUtils.h:3,
                       from /usr/include/ATen/TensorNames.h:3,
                       from /usr/include/ATen/NamedTensorUtils.h:3,
                       from /usr/include/torch/csrc/autograd/variable.h:11,
                       from /usr/include/torch/csrc/autograd/autograd.h:3,
                       from /usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /usr/include/torch/extension.h:5,
                       from /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/ext.cpp:12:
      /usr/include/glog/logging.h:60:4: error: #error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
         60 | #  error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
            |    ^~~~~
      In file included from /usr/include/glog/logging.h:63:
      /usr/include/glog/flags.h:45:4: error: #error <glog/flags.h> was not included correctly. See the documention for how to consume the library.
         45 | #  error <glog/flags.h> was not included correctly. See the documention for how to consume the library.
            |    ^~~~~
      In file included from /usr/include/glog/logging.h:77:

Env

Pytorch

torch.__version__
2.2.0

CUDA

CUDA Version: 12.4

Linux Kernel

uname -a
Linux earth 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC 

Thoughts?

SRaent commented 7 months ago

i got around this issue by modifying my /usr/include/c10/util/Logging.h file. There i found in line 25 a precompiler statement: #ifdef C10_USE_GLOG i just made the precompiler always choose the else case so that #include <c10/util/logging_is_not_google_glog.h> is included instead of #include <c10/util/logging_is_google_glog.h>

Furthermore i had to add the following line to submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.h #include <cstdint>