longcw/faster_rcnn_pytorch

_roi_pooling.c:492:19: fatal error: TH/TH.h: No such file or directory

lixiang0 opened this issue · 2 comments

I run ./make.sh then get this error.
build log follows:

running build_ext
skipping 'utils/bbox.c' Cython extension (up-to-date)
skipping 'utils/nms.c' Cython extension (up-to-date)
skipping 'nms/cpu_nms.c' Cython extension (up-to-date)
skipping 'nms/gpu_nms.cpp' Cython extension (up-to-date)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
Compiling roi pooling kernels by nvcc...
Including CUDA code.
/home/yyddl/faster_rcnn_pytorch/faster_rcnn/roi_pooling
generating /tmp/tmpaFC7e2/_roi_pooling.c
setting the current directory to '/tmp/tmpaFC7e2'
running build_ext
building '_roi_pooling' extension
creating home
creating home/yyddl
creating home/yyddl/faster_rcnn_pytorch
creating home/yyddl/faster_rcnn_pytorch/faster_rcnn
creating home/yyddl/faster_rcnn_pytorch/faster_rcnn/roi_pooling
creating home/yyddl/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src
gcc -pthread -B /home/yyddl/anaconda3/envs/rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/yyddl/anaconda3/envs/rcnn/include/python2.7 -c _roi_pooling.c -o ./_roi_pooling.o
_roi_pooling.c:492:19: fatal error: TH/TH.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "build.py", line 34, in
ffi.build()
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/cffi/api.py", line 690, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/cffi/recompiler.py", line 1515, in recompile
compiler_verbose, debug)
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/yyddl/anaconda3/envs/rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1

Hey @lixiang0 Have you solved this issue?

@nullkatar Sorry, I don't how to solve it.