jwyang / faster-rcnn.pytorch

A faster pytorch implementation of faster r-cnn
MIT License
7.65k stars 2.33k forks source link

LinkError: command 'gcc' failed with exit status 1 #795

Open miracleagi opened 4 years ago

miracleagi commented 4 years ago

gcc -pthread -shared -std=c99 ./_nms.o ./home/ssd1/test/faster-rcnn.pytorch/lib/model/nms/src/nms_cuda.o /home/ssd1/test/faster-rcnn.pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o -L/home/work/python/build/lib -lpython2.7 -o ./_nms.so /usr/bin/ld: cannot find -lpython2.7 collect2: ld returned 1 exit status Traceback (most recent call last): File "build.py", line 37, in ffi.build() File "/home/work/python_env/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 184, in build _build_extension(ffi, cffi_wrapper_name, target_dir, verbose) File "/home/work/python_env/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 108, in _build_extension outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname) File "/home/work/python_env/lib/python2.7/site-packages/cffi/api.py", line 684, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/home/work/python_env/lib/python2.7/site-packages/cffi/recompiler.py", line 1484, in recompile compiler_verbose, debug) File "/home/work/python_env/lib/python2.7/site-packages/cffi/ffiplatform.py", line 20, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/home/work/python_env/lib/python2.7/site-packages/cffi/ffiplatform.py", line 56, in _build raise VerificationError('%s: %s' % (e.class.name, e)) cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1

Using torch 0.4.0 CUDA 9.0 -arch sm_61 and modify the CUDA path and python path, but this LinkError remains not solved. Anyone can give me any suggestion?

xxxjw-fighting commented 3 years ago

Try to update gcc.