Bug#907069: nvcc problems with gcc

Stefano Simonucci stefano.simonucci at unicam.it
Thu Aug 23 18:42:56 BST 2018


Package: nvidia-cuda-toolkit
Version: 9.2.148-1
Severity: important

Dear Maintainer,
      I can't compile a very simple program

#include <stdio.h>

#define NQ 100
#define PI 3.14159265358979323848
#include <math.h>

// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>
#include <curand_kernel.h>

/**
  * Host main routine
  */
int
main(void)
{
     // Error code to check return values for CUDA calls
     cudaError_t err = cudaSuccess;

     // Print the vector length to be used, and compute its size
     int runtimeVersion,driverVersion;
     err=cudaRuntimeGetVersion(&runtimeVersion);
     printf("Error runtime =%d\n",err);
     err=cudaDriverGetVersion(&driverVersion);
     printf("Error version =%d\n",err);
     printf("%d %d\n",runtimeVersion,driverVersion);
     return 0;
}

because I get the following error  from the command   nvcc <name>.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

Next I have tried with the command nvcc -ccbin=clang-4.0 <name>.cu
and the program is correctly compiled.
But in the execution I get
./a.out
Error runtime =35
Error version =0
32765 5000

The output of nvidia-smi is
nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

Previous installation from the .run files (cuda 6.5) was functioning.
nvidia-detect gives
nvidia-detect
Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G98 [Quadro 
NVS 295] [10de:06fd] (rev a1)
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110GL 
[Tesla C2050 / C2075] [10de:1096] (rev a1)
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110GL 
[Tesla C2050 / C2075] [10de:1096] (rev a1)
83:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110GL 
[Tesla C2050 / C2075] [10de:1096] (rev a1)
84:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110GL 
[Tesla C2050 / C2075] [10de:1096] (rev a1)

Checking card:  NVIDIA Corporation G98 [Quadro NVS 295] (rev a1)
Your card is only supported up to the 340 legacy drivers series.
It is recommended to install the
     nvidia-legacy-340xx-driver
package.

Checking card:  NVIDIA Corporation GF110GL [Tesla C2050 / C2075] (rev a1)
Your card is supported by all driver versions.
It is recommended to install the
     nvidia-driver
package.

Checking card:  NVIDIA Corporation GF110GL [Tesla C2050 / C2075] (rev a1)
Your card is supported by all driver versions.
It is recommended to install the
     nvidia-driver
package.

Checking card:  NVIDIA Corporation GF110GL [Tesla C2050 / C2075] (rev a1)
Your card is supported by all driver versions.
It is recommended to install the
     nvidia-driver
package.

Checking card:  NVIDIA Corporation GF110GL [Tesla C2050 / C2075] (rev a1)
Your card is supported by all driver versions.
It is recommended to install the
     nvidia-driver
package.
Best regards

Stefano

-- System Information:
Debian Release: buster/sid
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-2-amd64 (SMP w/24 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), 
LANGUAGE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages nvidia-cuda-toolkit depends on:
ii  clang-3.8                        1:3.8.1-27
ii  clang-4.0                        1:4.0.1-10+b1
ii  g++-5                            5.5.0-12
ii  g++-6                            6.4.0-20
ii  g++-7                            7.3.0-28
ii  gcc-4.8                          4.8.4-1
ii  gcc-4.9                          4.9.2-10
ii  gcc-5                            5.5.0-12
ii  gcc-6                            6.4.0-20
ii  gcc-7                            7.3.0-28
ii  libc6                            2.27-5
ii  libgcc1                          1:8.2.0-4
ii  libnvvm3                         9.2.148-1
ii  libstdc++6                       8.2.0-4
ii  nvidia-cuda-dev                  9.2.148-1
ii  nvidia-profiler                  9.2.148-1
ii  ocl-icd-opencl-dev [opencl-dev]  2.2.12-1

Versions of packages nvidia-cuda-toolkit recommends:
ii  nvidia-cuda-doc         9.2.148-1
ii  nvidia-cuda-gdb         9.2.148-1
ii  nvidia-visual-profiler  9.2.148-1

Versions of packages nvidia-cuda-toolkit suggests:
ii  libcupti-dev   9.2.148-1
ii  nvidia-driver  396.51-1

-- no debconf information



More information about the pkg-nvidia-devel mailing list