DeepIM-PyTorch icon indicating copy to clipboard operation
DeepIM-PyTorch copied to clipboard

Problems building: nvcc fatal : Failed to preprocess host compiler properties.

Open dscho15 opened this issue 4 years ago • 1 comments

I'm trying to build the project, I'm running ubuntu 20.04, PyTorch 1.8.0 and Cuda 11.4.

At the fourth bullet point

cd $ROOT/lib/point_matching_loss
sudo python setup.py install

I get the following error:

/usr/lib/python3/dist-packages/torch/include/ATen/core/TensorBody.h:338:30: note: declared here
  338 |   DeprecatedTypeProperties & type() const {
      |                              ^~~~
/usr/bin/nvcc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c point_matching_loss_kernel.cu -o build/temp.linux-x86_64-3.8/point_matching_loss_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1013" -DTORCH_EXTENSION_NAME=pml_cuda -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
gcc: No such file or directory
nvcc fatal   : Failed to preprocess host compiler properties.
error: command '/usr/bin/nvcc' failed with exit status 1

Not really sure how to fix it, anyone experiencing the same?

dscho15 avatar Oct 29 '21 22:10 dscho15

I think the problem is about your gcc. try if you have gcc on your machine

SiciliaLeco avatar Nov 04 '21 07:11 SiciliaLeco