3

I have a laptop with on-board Intel graphics. I have been using OpenCV for years with this machine and I have managed to avoid manual compilation so far. But in Ubuntu 13.10, when I try to install libopencv-dev from the repositories, it brings along libopencv-ocl, which seems to be dependent on nvidia drivers. Letting the driver install messes up my xserver completely and when I do glxinfo afterwards, I get this:

name of display: :0.0
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".

To solve this, I purge all nVidia drivers and reinstall xserver, much like it has been suggested here, and when I purge the nvidia drivers, OpenCV development libraries are also removed, as apt-get tells me they are no longer needed. This is foreign to me, because I expected a warning that I have installed packages that depend on this, but how can removing a dependency automatically remove the package I installed without warnings or asking? I understand it has something to do with nVidia being the provider of the libopencv-ocl in the repo. How could I get around it? I would rather not compile OpenCV if I can help it. I have seen similar questions, but not a suitable answer.

2 Answers2

4

I had the same problem, to get around it you can install an alternative provider of libopencl1. If there isn't one available for your specific graphics card (i.e. one for AMD/ATI appears to be absent from the repositories) you can use the generic one:

sudo apt-get install ocl-icd-libopencl1

If you already installed libopencv-dev, you will also want to remove the redundant packages it brought in:

sudo apt-get autoremove

Seems strange to me that the Nvidia provider is brought in by default rather than the generic one - maybe some packaging wizard can sort this out.

There is a bug for this issue here: https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/1245260

molesmoke
  • 56
  • 4
0
sudo apt-get install libopencv-highgui-dev

then compile from source, this also has a benefit that the nonfree moudle of SIFT and SURF is available.

arcticfox
  • 101