ruotianluo / pytorch-faster-rcnn

pytorch1.0 updated. Support cpu test and demo. (Use detectron2, it's a masterpiece)
MIT License
1.82k stars 474 forks source link

build roi_align error #150

Open gzydominating opened 5 years ago

gzydominating commented 5 years ago

gcc -pthread -B /home/gzy/anaconda3/envs/py36_pytorch041/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/gzy/anaconda3/envs/py36_pytorch041/include/python3.6m -c _crop_and_resize.c -o ./_crop_and_resize.o -std=c99 gcc -pthread -B /home/gzy/anaconda3/envs/py36_pytorch041/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/gzy/anaconda3/envs/py36_pytorch041/include/python3.6m -c /home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.c -o ./home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.o -std=c99 /home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.c: In function ‘CropAndResizePerBox’: /home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.c:30:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]

pragma omp parallel for

^ /home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.c: In function ‘crop_and_resize_forward’: /home/gzy/dev/faster-rcnn-pytorch-ver2/lib/layer_utils/roi_align/src/crop_and_resize.c:124:33: error: dereferencing pointer to incomplete type ‘THTensor {aka struct THTensor}’ const int batch_size = image->size[0]; ^ Traceback (most recent call last): File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile extra_postargs) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix % (cmd, exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension depends=ext.depends) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "build.py", line 41, in ffi.build() File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build _build_extension(ffi, cffi_wrapper_name, target_dir, verbose) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/cffi/api.py", line 723, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/cffi/recompiler.py", line 1526, in recompile compiler_verbose, debug) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/home/gzy/anaconda3/envs/py36_pytorch041/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build raise VerificationError('%s: %s' % (e.class.name, e)) cffi.VerificationError: CompileError: command 'gcc' failed with exit status 1

SherlockHolmes221 commented 5 years ago

I also met the problem. Have you solved it? Could you please tell me?