cascade-rcnn_Pytorch icon indicating copy to clipboard operation
cascade-rcnn_Pytorch copied to clipboard

sh make.sh error

Open Tuyota opened this issue 6 years ago • 2 comments

I use python3.6(anaconda) and CUDA8.0 and sm_52(TITAN X) when I run sh make.sh, error occurs: Traceback (most recent call last): File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile extra_postargs) File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/home/zhushiwei/anaconda3/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/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension depends=ext.depends) File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/home/zhushiwei/anaconda3/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 35, in ffi.build() File "/home/zhushiwei/anaconda3/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/zhushiwei/anaconda3/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/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/api.py", line 690, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/recompiler.py", line 1515, in recompile compiler_verbose, debug) File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/home/zhushiwei/anaconda3/lib/python3.6/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 zhushiwei@node3:~/cascade-rcnn_Pytorch/lib$ yum install libsmbclient-devel You need to be root to perform this command. looking forward for your reply

Tuyota avatar Jun 05 '19 11:06 Tuyota

@Tuyota i think it ,u have used python3.6 . i have same problem zhu shi xiong

YYZ-rose avatar Jun 05 '19 13:06 YYZ-rose

@Tuyota i had the same problem. note the error: 'for' loop initial declarations are only allowd in C99 or C11 mode(for (size_t i =0 ; i<=len; i++)). it seems like the 'i' need to be declared first.
So, i solved the problem by modify the THMath.h . like size_t i =0; for (i;i<=len;i++) ...

wwuvinn avatar Jun 12 '19 12:06 wwuvinn