Skip to content

NVCC problem #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jxgu1016 opened this issue Apr 16, 2017 · 3 comments
Closed

NVCC problem #9

jxgu1016 opened this issue Apr 16, 2017 · 3 comments

Comments

@jxgu1016
Copy link

when compiling Cython with cuda 8.0(cudnn included), I met this problem. Can anyone help me solve this? My python version is 2.7 and maybe that's the source of my pro...

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... ./make.sh: 行 10: nvcc: 未找到命令 Including CUDA code. /home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling generating /tmp/tmpEk3p3S/_roi_pooling.c running build_ext building '_roi_pooling' extension creating home creating home/e1126 creating home/e1126/faster_rcnn_pytorch creating home/e1126/faster_rcnn_pytorch/faster_rcnn creating home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling creating home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/e1126/anaconda2/include/python2.7 -c _roi_pooling.c -o ./_roi_pooling.o gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/e1126/anaconda2/include/python2.7 -c /home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling.c -o ./home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling.o gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/e1126/anaconda2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/e1126/anaconda2/include/python2.7 -c /home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling_cuda.c -o ./home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling_cuda.o gcc -pthread -shared -L/home/e1126/anaconda2/lib -Wl,-rpath=/home/e1126/anaconda2/lib,--no-as-needed ./_roi_pooling.o ./home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling.o ./home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/roi_pooling_cuda.o /home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/cuda/roi_pooling.cu.o -L/home/e1126/anaconda2/lib -lpython2.7 -o ./_roi_pooling.so gcc: error: /home/e1126/faster_rcnn_pytorch/faster_rcnn/roi_pooling/src/cuda/roi_pooling.cu.o: 没有那个文件或目录 Traceback (most recent call last): File "build.py", line 34, in <module> ffi.build() File "/home/e1126/anaconda2/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/e1126/anaconda2/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/e1126/anaconda2/lib/python2.7/site-packages/cffi/api.py", line 672, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/home/e1126/anaconda2/lib/python2.7/site-packages/cffi/recompiler.py", line 1475, in recompile compiler_verbose, debug) File "/home/e1126/anaconda2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 29, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/home/e1126/anaconda2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 65, in _build raise VerificationError('%s: %s' % (e.__class__.__name__, e)) cffi.ffiplatform.VerificationError: LinkError: command 'gcc' failed with exit status 1

@AceCoooool
Copy link

这个问题主要在于你没装nvidia-drive, cuda或者你没将其加入到.bashrc下:可以参考nvidia cuda
主要在你的.bashrc文件下加入:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

@jxgu1016
Copy link
Author

Thx! You successfully solved my pro~

@ypymy
Copy link

ypymy commented Apr 16, 2018

hello, i have mended the path, but it remains to have the same pro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants