/usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: classe ELF errata: ELFCLASS64

I have installed cuda 9.1 with the driver 390.77
nvidia-smi gives
stefano@tesla:~$ nvidia-smi
Thu Aug 23 17:40:26 2018
±----------------------------------------------------------------------------+
| NVIDIA-SMI 390.77 Driver Version: 390.77 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla C2075 Off | 00000000:02:00.0 Off | 0 |
| 30% 57C P0 77W / N/A | 0MiB / 5301MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 1 Tesla C2075 Off | 00000000:03:00.0 Off | 0 |
| 30% 52C P0 78W / N/A | 0MiB / 5301MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 2 Tesla C2075 Off | 00000000:83:00.0 Off | 0 |
| 30% 59C P0 80W / N/A | 0MiB / 5301MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 3 Tesla C2075 Off | 00000000:84:00.0 Off | 0 |
| 30% 59C P0 78W / N/A | 0MiB / 5301MiB | 0% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+

But if I try to compile the file prova.cu with the command nvcc I get
stefano@tesla:~$ nvcc prova.cu
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: error loading plugin: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: classe ELF errata: ELFCLASS64
collect2: error: ld returned 1 exit status

Moreover the command
nvcc -ccbin=clang-3.8 prova.cu
does’nt give errors
but the
cudaRuntimeGetVersion(&runtimeVersion); inside the file “prova.cu”
gives the code error 35 while
cudaDriverGetVersion(&driverVersion); returns a success.
Thank you
Stefano

Tesla C2075 is not supported by CUDA 9.1

The last CUDA version supporting those GPUs is CUDA 8.0

You should also be sure that your linux distro version, kernel version, and gcc version are suitable based on the information in the linux install guide for CUDA 8.0

[url]https://docs.nvidia.com/cuda/archive/8.0/cuda-installation-guide-linux/index.html[/url]

OK. But I have previously installed cuda 8.0 and I got the same things, i.e.
nvcc prova.cu
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: error loading plugin: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: classe ELF errata: ELFCLASS64

and moreover the command
nvcc -ccbin=clang-3.8 prova.cu
does’nt give errors
but the
cudaRuntimeGetVersion(&runtimeVersion); inside the file “prova.cu”
gives the code error 35 while
cudaDriverGetVersion(&driverVersion); returns a success.
The last functioning version was cuda 6.5, but now the installation isn’t more possible because of other dependencies.
How I can get more detail about this error?
nvidia-smi was working.
Stefano

Thank you
Stefano

what is the result of:

uname -a

and

gcc --version

?

stefano@tesla:~$ uname -a
Linux tesla 4.17.0-2-amd64 #1 SMP Debian 4.17.14-1 (2018-08-13) x86_64 GNU/Linux
stefano@tesla:~$ gcc --version
gcc (Debian 8.2.0-4) 8.2.0
Copyright (C) 2018 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.

But if I use another gcc I get the same error

stefano@tesla:~$ nvcc -ccbin=gcc-6 prova.cu
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: error loading plugin: /usr/lib/gcc/x86_64-linux-gnu/6/liblto_plugin.so: classe ELF errata: ELFCLASS64
collect2: error: ld returned 1 exit status
stefano@tesla:~$ nvcc -ccbin=gcc-7 prova.cu
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/…/x86_64-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so: error loading plugin: /usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so: classe ELF errata: ELFCLASS64
collect2: error: ld returned 1 exit status
stefano@tesla:~$ nvcc -ccbin=gcc-5 prova.cu
/usr/lib/gcc/x86_64-linux-gnu/5/…/…/…/…/x86_64-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so: error loading plugin: /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so: classe ELF errata: ELFCLASS64
collect2: error: ld returned 1 exit status

Stefano

Those aren’t supported linux kernels and gcc version for use with CUDA 8.