faster_rcnn_pytorch
faster_rcnn_pytorch copied to clipboard
/usr/bin/ld: this linker was not configured to use sysroots
Hi, I am getting this error while compiling the roi pooling layer on RHEL 7.4 . I already changed the compute capabilty to the correct value, but still I am getting this error.
gcc -pthread -shared -B /u/shanukum/anaconda2/envs/pytorch2/compiler_compat -L/u/shanukum/anaconda2/envs/pytorch2/lib -Wl,-rpath=/u/shanukum/anaconda2/envs/pytorch2/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_roi_pooling.o ./u/shanukum/MSDN/faster_rcnn/roi_pooling/src/roi_pooling.o ./u/shanukum/MSDN/faster_rcnn/roi_pooling/src/roi_pooling_cuda.o /u/shanukum/MSDN/faster_rcnn/roi_pooling/src/cuda/roi_pooling.cu.o -L/u/shanukum/anaconda2/envs/pytorch2/lib -lpython2.7 -o ./_roi_pooling.so
/usr/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "build.py", line 34, in <module>
ffi.build()
File "/u/shanukum/anaconda2/envs/pytorch2/lib/python2.7/site-packages/torch/utils/ffi/__init__.py", line 184, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/u/shanukum/anaconda2/envs/pytorch2/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 "/u/shanukum/anaconda2/envs/pytorch2/lib/python2.7/site-packages/cffi/api.py", line 697, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/u/shanukum/anaconda2/envs/pytorch2/lib/python2.7/site-packages/cffi/recompiler.py", line 1520, in recompile
compiler_verbose, debug)
File "/u/shanukum/anaconda2/envs/pytorch2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/u/shanukum/anaconda2/envs/pytorch2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1
gcc configuration:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/gpfs/dcc09/99/optshare/share/gcc-5.4.0/x86_64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.4.0/configure --prefix=/opt/share/gcc-5.4.0/x86_64 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=all --disable-multilib --with-ld=/usr/bin/ld --with-nm=/usr/bin/nm --with-as=/usr/bin/as --disable-nls
Thread model: posix
gcc version 5.4.0 (GCC)
Can you please help me with this and why is this error occuring? Thanks