2

I'm using Ubuntu 14.04 and I followed this tuto to get CUDA 6.5 working with nVidia drivers 340.29 : http://www.r-tutor.com/gpu-computing/cuda-installation/cuda6.5-ubuntu

But now the problem is that I can't install Wine without removing the CUDA installation.

I tried to install Wine first, but in this case, I can't install CUDA.

It seems that the conflict is between nvidia-libopencl1-340 and ocl-icd-libopencl1

Can someone help me please ? Thx :)

3
  • Are you using the manually installed proprietary drivers or the ones from the repository?
    – Chuck R
    Oct 23, 2014 at 2:16
  • Well, It automatically installs the 340.29 driver when I use : sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb sudo apt-get update sudo apt-get install cuda Oct 23, 2014 at 6:27
  • That complicates things. Can you remove nvidia-libopencl1-340 without removing the entire
    – Chuck R
    Oct 24, 2014 at 20:06

2 Answers 2

1

I had a similar problem when getting the NVIDIA-specific OpenCL library working when I installed the proprietary drivers from the GeForce site. The difference in my case, however, was that I used the manual installation of the drivers rather than the NVIDIA repository.

After examining the package dependencies, the conflict is actually between ocl-icd-libopencl1 and nvidia-opencl-icd-340 (and also nvidia-340 since it depends on nvidia-opencl-icd-340). This is because they both contain the files /usr/lib/x86_64-linux-gnu/libOpenCl.so.1.0.0 and /usr/lib/i386-linux-gnu/libOpenCL.so.1.0.0 as well as symlinks for those files.

For obvious reasons, you can't have two packages supplying the same file (what happens if you uninstall only one?).

So, of course, this is a predicament. Via apt alone, it's simply not possible to continue on this route. I was going to suggest modifying some package dependencies by first downloading certain packages and modifying the control file within, but then you're left having to do that every time there is an update for nvidia-340 or Wine which would be a pain to say the least.

Therefore, what I'm going to recommend is, instead, to use the manual installation method for the Cuda toolkit in order to bypass the dependency issues.
Of course, this also means no automatic updates to the Cuda toolkit.

For this you will need to download two separate files:

  1. Current Nvidia drivers available from Geforce.com
  2. The 64-bit or 32-bit Cuda 6.5 toolkit .run file as required.

Be sure to give both files execute permissions via chmod +x /path/to/file or the file browser.

You may as well also uninstall cuda-repo-ubuntu1404 -- these two files replace all of that.

  1. Log out of the desktop, then hit Ctrl-Alt-F1 and - after entering your user name and pasword - type sudo stop lightdm at the prompt.
  2. Navigate to the place where the NVIDIA driver is downloaded (probably ~/Downloads) and execute

    sudo ./NVIDIA-Linux*run

  3. Tell it 'yes' to DKMS registration and 32-bit libraries.

  4. Now, execute the Cuda 6.5 installer:

    sudo ./cuda_6.5.14_linux_64.run or sudo ./cuda_6.5.14_linux_32.run

  5. Do not install the bundled drivers (the drivers installed above should be newer), leave the locations default.

  6. Finally, when it's finished, reboot! (to activate the new video drivers)
  7. Lastly, double check that the file /etc/OpenCL/vendors/nvidia.icd exists. If not,

    sudo bash -c 'echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd'

If you have any issues, be sure to leave me a comment and I'll try to get back to you!

3
  • Thank you for your answer :) I finally fixed it by installing the cuda .run file here : developer.download.nvidia.com/compute/cuda/6_5/rel/installers/… from the default 14.04 kernel (3.13.0.37). Once I installed both nvidia driver and cuda, I installed a kernel above (3.13.11) then I installed Wine. It still asked to remove nvidia-libopencl1-340 but after the Wine installation, cuda is still working, don't ask me how :) Oct 27, 2014 at 14:25
  • If you could please set my answer as best, I'd greatly appreciate it! The Cuda toolkit isn't a system library. It's actually not needed to run Cuda applications, it's simply a toolset for developing Cuda-based applications -- it includes compiler, headers, and other things). Cuda support is built into the GPU driver kernel module. OpenCL applications should work as well, because of the /etc/OpenCL/vendors/nvidia.icd which points to a non-standard OpenCL library name (libnvidia-opencl.so instead of libOpenCL.so).
    – Chuck R
    Oct 27, 2014 at 16:31
  • It's also worth noting that the Cuda toolkit does come with (outdated) drivers as well -- the same drivers from the nvidia-340. However, if you installed newer drivers manually via a .run as I described you may want to re-run the installer just to make sure that nothing vital such as OpenCL acceleration was removed by those packages getting removed due to Wine installation.
    – Chuck R
    Oct 27, 2014 at 16:36
0

I am having a similar problem with fglrx. I have found 2 bug reports that might be of interest to you - see 14.10 wine and fglrx conflict

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .