pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
312 stars 63 forks source link

[Error] "This compiler appears to be too old to be supported by Eigen" in building rasterize #111

Open GiBucci opened 2 years ago

GiBucci commented 2 years ago

Hi everyone.

I am trying to install Dirt but I had lots of trouble with CUDA, version mismatches, OpenGL libraries and so on.

I tried many times to do a clean installation, and after many attempts I finally managed to solve CUDA problems, and now this happens:

Scanning dependencies of target rasterise
[ 16%] Building CXX object CMakeFiles/rasterise.dir/rasterise_egl.cpp.o
In file included from /mnt/c/Users/GiovanniBucci/Documents/Tests/dirt/csrc/rasterise_egl.cpp:24:
/home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h:3:2: warning: #warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file" [-Wcpp]
    3 | #warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file"
      |  ^~~~~~~
[ 33%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
In file included from /home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/Core:19,
                 from /home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/unsupported/Eigen/CXX11/Tensor:14,
                 from /home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
                 from /home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/tensorflow/core/framework/tensor.h:22,
                 from /mnt/c/Users/GiovanniBucci/Documents/Tests/dirt/csrc/rasterise_egl.cu:5:
/home/gbucci/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/util/Macros.h:674:2: error: #error This compiler appears to be too old to be supported by Eigen
  674 | #error This compiler appears to be too old to be supported by Eigen
      |  ^~~~~
make[2]: *** [CMakeFiles/rasterise.dir/build.make:76: CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/rasterise.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I am currently trying to install it in Ubuntu for Windows. Here you can find my system specifications:

System: Linux GiovanniBucci 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Nvidia-smi: NVIDIA-SMI 470.87 Driver Version: 472.56 CUDA Version: 11.4 GPU: NVIDIA GeForce RTX 3060 Laptop GPU

Configuration results: -- The CXX compiler identification is GNU 9.4.0 -- The CUDA compiler identification is NVIDIA 11.7.64 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working CUDA compiler: /usr/local/cuda-11.7/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda-11.7/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so found components: OpenGL EGL

CUDA_HOME=/usr/local/cuda-11.7 PATH=PATH=/usr/local/cuda-11.7/bin:/home/gbucci/anaconda3/envs/tf/bin:/home/gbucci/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:[........]

Let me know if you have any idea on why this happens, or if you need further information.

Waiting for your answer, thank you in advance, and have a nice day.

Giovanni

Ashurali commented 2 years ago

I got same error too when trying to compile on WSL2 Ubuntu using 3060 laptop GPU Changed the arch in CMakeLists to sm_86, otherwise untouched

strangenerd commented 1 year ago

I got same error too when trying to compile on WSL2 Ubuntu using 3060 laptop GPU Changed the arch in CMakeLists to sm_86, otherwise untouched

How to change arch to sm_86?