I think I know what happened and that’s how I fixed it.
One year ago, I got a laptop with Optimus technology and tried to install Opensuse13.2 .
The display was highly unstable and I had to install Bumblebee 346.59-1.1. I had
some problems installing it, and I am reluctant to change it.
A few days ago , I stopped procrastinating and installed CUDA7.0 .
Choosing CUDA7.0 (vs 7.5) was intentional as it is 346.46, lower than Bumblebee and
hopefully less conflicting.
I used the rpm method and I am now pretty sure that the CUDA7.0 installer did not
install x11-video-nvidiaG03-346.46-0.x86_64.rpm on purpose because its version number
was lower than Bumblebee. Or some other reason, but anyway, it didn’t.
x11-video-nvidiaG03-346.46-0.x86_64.rpm contains the missing libnvidia-tls.so.346.46
So, I could install x11-video-nvidiaG03-346.46-0.x86_64 myself, right ? Except that
I was worried that it would interfere with Bumblebee and leave me with a bigger problem.
So, I did the following :
- Found x11-video-nvidiaG03-346.46-0.x86_64.rpm in /var/cuda-repo-7-0-local/
- Copied it in a /tmp/test directory to work on it without screwing it up
- Extracted a local copy with rpm2cpio x11-video-nvidiaG03-346.46-0.x86_64.rpm | cpio -idmv
- I copied the local usr/lib/libnvidia-tls.so.346.46 to usr/lib/libnvidia-tls.so.346.46
- I copied the local usr/lib64/libnvidia-tls.so.346.46 to usr/lib64/libnvidia-tls.so.346.46
That worked for bindlessTexture and all the 2_Graphics.
However it failed because ld: cannot find -lnvcuvid (missing libnvcuvid.so.346.46)
Again, I copied from the extracted libnvcuvid.so.346.46 for /usr/lib and /usr/lib64
This time i had to also create a symbolic link for each of them so the linker could find them:
libnvcuvid.so -> libnvcuvid.so.346.46
I still have some other warnings but the examples now compile.