daniilidis-group / neural_renderer

A PyTorch port of the Neural 3D Mesh Renderer
Other
1.12k stars 248 forks source link

Installation Error on Centos 7 #16

Closed Fanziapril closed 5 years ago

Fanziapril commented 5 years ago

Hi, Thanks for your nice work. I encountered a problem when executed python setup.py install:

running install running bdist_egg running egg_info writing neural_renderer.egg-info/PKG-INFO writing dependency_links to neural_renderer.egg-info/dependency_links.txt writing requirements to neural_renderer.egg-info/requires.txt writing top-level names to neural_renderer.egg-info/top_level.txt reading manifest file 'neural_renderer.egg-info/SOURCES.txt' writing manifest file 'neural_renderer.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext /home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning:

                           !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (g++ 4.8) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 4.9 and above. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6 for instructions on how to install GCC 4.9 or higher. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                          !! WARNING !!

warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler)) building 'neural_renderer.cuda.load_textures' extension gcc -pthread -B /home/fzwu/anaconda2/envs/torch4/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include/TH -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/fzwu/anaconda2/envs/torch4/include/python3.6m -c neural_renderer/cuda/load_textures_cuda.cpp -o build/temp.linux-x86_64-3.6/neural_renderer/cuda/load_textures_cuda.o -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] /usr/local/cuda/bin/nvcc -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include/TH -I/home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/fzwu/anaconda2/envs/torch4/include/python3.6m -c neural_renderer/cuda/load_textures_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/neural_renderer/cuda/load_textures_cuda_kernel.o -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 /home/fzwu/anaconda2/envs/torch4/lib/python3.6/site-packages/torch/lib/include/ATen/Half-inl.h(17): error: identifier "__half_as_short" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00007f3e_00000000-7_load_textures_cuda_kernel.cpp1.ii". error: command '/usr/local/cuda/bin/nvcc' failed with exit status 2

I am running on python3.6 with pytorch 0.4.1.

nkolot commented 5 years ago

Have you tried upgrading your GCC version?

nkolot commented 5 years ago

I am closing this issue for now.

Fanziapril commented 5 years ago

Yes, I upgrade the GCC version to 5.2 and the problem solved. Thanks for your help!