7

I have CentOS Linux release 7.5.1804 with Qt 4.8.7 installed from base repo. I installed NVidia driver version 390.59 release date 2018.5.16. I have libGL-mesa and libGL-mesa-devel INSTALLED also. My graphics card Quadro K4000M is doing just fine - for example, glxgears 60fps, Qt Demos (OpenGL) work.

But when I am trying to compile the chip example, I am getting the following error:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [chip] Error 1

Here is the ls command output:

[user@centos-7 ~]$ ls -h /usr/lib64/ | grep "libGL"
libGLdispatch.so.0
libGLESv1_CM_nvidia.so.1
libGLESv1_CM_nvidia.so.390.59
libGLESv1_CM.so
libGLESv1_CM.so.1
libGLESv1_CM.so.1.2.0
libGLESv2_nvidia.so.2
libGLESv2_nvidia.so.390.59
libGLESv2.so
libGLESv2.so.2
libGLESv2.so.2.1.0
libGL.la
libGL.so
libGL.so.1
libGL.so.1.7.0
libGLU.so
libGLU.so.1
libGLU.so.1.3.1
libGLX_indirect.so.0
libGLX_nvidia.so.0
libGLX_nvidia.so.390.59
libGLX.so
libGLX.so.0

How to solve the problem?

pau
  • 352
  • 3
  • 14
  • Have a look at this https://unix.stackexchange.com/questions/364944/ld-cannot-find-lgl-on-centos-7 – Varius Jun 02 '18 at 20:42
  • Stock Qt is built against mesa drivers. If you want it to use other drivers, you may have to build it yourself. – dtech Jun 02 '18 at 20:42
  • @dtech Demo apps, provided with Qt in binary form, works fine - I mean OpenGL is supported. And they are using `/usr/lib64/libGL.so` - the lib, that `ld` can't find somehow while linking the same example. If demos work using NVIDIA drivers installed, why I can't link the same example? – pau Jun 05 '18 at 18:48
  • 1
    Well, I wish I could help you with that, but I don't have any ideas. I will reopen your question, maybe someone else will help. You might want to improve the title to a more descriptive form, this way it may not get that much attention. – dtech Jun 05 '18 at 19:12
  • @dtech I have just uninstalled NVIDIA driver and building **chip** project now goes without any errors ... :-/ Screen resolution is ugly, but OpenGL is supported as it was when NVIDIA driver was installed - I mean Qt demos and examples. – pau Jun 05 '18 at 20:38
  • Maybe there is some way to specify a particular driver to be used by Qt, like there is one for the windows platform. – dtech Jun 05 '18 at 22:50

1 Answers1

5

The problem is solved - I install NVIDIA the latest driver (version: 390.67 release Date: 2018.6.5) in this way: http://www.advancedclustering.com/act_kb/installing-nvidia-drivers-rhel-centos-7/.

pau
  • 352
  • 3
  • 14