Skip to content
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

Error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1 #346

Closed
basit26374 opened this issue Feb 18, 2020 · 2 comments
Closed

Comments

@basit26374
Copy link

When I compile deformable convolutional layers

cd external/DCNv2 python setup.py build develop

I got this error

error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

Environment info:
Ubuntu 18.04
CUDA 9.0
python 3.6
torch== 1.1.0
torchvision=== 0.2.0

@dbolya
Copy link
Owner

dbolya commented Feb 19, 2020

Did the error message print anything else out? That just means compilation failed. I can't really help without knowing where it failed.

@basit26374
Copy link
Author

basit26374 commented Feb 19, 2020

@dbolya thanks for your reply. I solved this problem. Actually problems with gcc and g++ version.
I have installed gcc and g++ 6.5.0 version but this is not compatible with CUDA 9.0.
see this
facebookresearch/maskrcnn-benchmark#25 (comment)

Environment info:
Ubuntu 18.04
CUDA 9.0
python 3.6
torch== 1.1.0
torchvision=== 0.2.0
gcc and g++ version 6.5.0

Step to solve this problem:

  1. sudo apt-get install gcc-5 g++-5

  2. link from gcc 6 g++ 6 to gcc 5 g++ 5
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5 --slave /usr/bin/gcov gcov /usr/bin/gcov-5

sudo update-alternatives --config gcc

and select gcc 5 version

see this blog post
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/

  1. compile deformable convolutional layers
    cd external/DCNv2
    python setup.py build develop

and Done !!!

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

2 participants