AdderNetCuda icon indicating copy to clipboard operation
AdderNetCuda copied to clipboard

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

Open NewDeepLearner opened this issue 5 years ago • 4 comments

Hi @jdnie

Your code is impressive. However, when I try to use the cuda and run "python setup.py install", there are a lot of error.

What is the reason? I follow your instruction to use pytorch 1.2.0 and torchvision 0.4.0.

NewDeepLearner avatar Apr 20 '20 08:04 NewDeepLearner

you can run the 'nvcc --version' to check the nvcc is valid.

~$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:01_CDT_2018 Cuda compilation tools, release 10.0, V10.0.130

jdnie avatar Apr 21 '20 08:04 jdnie

you can run the 'nvcc --version' to check the nvcc is valid.

~$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:01_CDT_2018 Cuda compilation tools, release 10.0, V10.0.130

The nvcc is valid, but my version is different from yours:

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Sep__1_21:08:03_CDT_2017 Cuda compilation tools, release 9.0, V9.0.176

Is this the reason of the error?

NewDeepLearner avatar Apr 21 '20 08:04 NewDeepLearner

I test a new conda environment, it's ok. please check your environment.

~$ conda create -n test_env ~$ source activate test_env ~$ conda install pytorch=1.2.0 torchvision=0.4.0 cudatoolkit=10.0 ~$ python setup.py install ~$ nvidia-smi Tue Apr 21 19:59:46 2020
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 410.48 Driver Version: 410.48 | |-------------------------------+----------------------+----------------------+

$ g++ --version g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cd .. $ git status 位于分支 master 您的分支与上游分支 'origin/master' 一致。

无文件要提交,干净的工作区

maybe you should set $LD_LIBRARY_PATH.

~$ export PATH="/usr/local/cuda-10.0/bin:$PATH" ~$ export LD_LIBRARY_PATH="/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH"

jdnie avatar Apr 21 '20 12:04 jdnie

In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

@jdnie I tried to use the solution provided here, but I had x86_64-linux-gnu-gcc: error: gcc-8: No such file or directory instead.

Note that I already had gcc-8 installed.

Could you advise ?

buttercutter avatar Apr 30 '20 06:04 buttercutter