libGL does exists, but linker can't find it - Qt 4.8.7, CentOS 7.5
NickName:pau Ask DateTime:2018-06-03T03:33:47

libGL does exists, but linker can't find it - Qt 4.8.7, CentOS 7.5

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?

Copyright Notice:Content Author:「pau」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/50660460/libgl-does-exists-but-linker-cant-find-it-qt-4-8-7-centos-7-5

More about “libGL does exists, but linker can't find it - Qt 4.8.7, CentOS 7.5” related questions

libGL does exists, but linker can't find it - Qt 4.8.7, CentOS 7.5

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

Show Detail

g++ linker: /usr/lib/libGL.so.1: could not read symbols: Invalid operation

I'm trying to build a very simple OpenGL-app under Ubuntu 10.04 (I have a 32 bit system). When I'm trying to compile the file, I get the error message: g++ -L/usr/lib simple.cpp -lglut /usr/bin/l...

Show Detail

How to link shared library against alternate version of libGL?

I built a local version of OpenGL under my home directory. I want to link another shared library against it, but for some reason the linker still links it against the one under /usr/lib, as reporte...

Show Detail

libGL heap usage

I am working on a linux-based c++ OpenGL application, utilizing the Nvidia 290.10 64bit drivers. I am trying to reduce its memory footprint as it makes use of quite a lot of live data. I've been u...

Show Detail

OpenGL on Linux: dlopen libGL.so

Most applications (and libraries) using OpenGL on Linux load libGL.so at runtime using dlopen API, instead of dynamically linking against it. Why do they do this? The only reason I can imagine is...

Show Detail

rhel 7.1 octave gnuplot - resolving libGL error: failed to load driver: swrast

I have recently gone through a drill to resolve getting octave on rhel 7.1 to plot using gnuplot. Basically, I was getting the following ugly messages and no plot: $ export LIBGL_DEBUG=verbose...

Show Detail

How can I find the full file path given a library name like libfoo.so.1?

Without implementing a linker or using ldd, how can I find the full path to a library? Is there a standard library available for that on Linux? (POSIX maybe?) Using ldd and grep on a file that is

Show Detail

ATI propietary drivers renaming libGL.so

I recently re-installed linux (mint 17) and after I built and ran my project it complained about failing to load swrast. I figured I'd have to install the ati drivers and indeed it fixed the issue:

Show Detail

android studio emulator libGl error

Created a new device using android API 27, google inc. and x86. It's giving me following errors on launching. How to resolve this? 12:01 PM Emulator: libGL error: unable to load driver: i965_dr...

Show Detail

gDebugger libGL error on linux

I'm trying to debug my OpenGl project with gDEBugger, but unfortunately gDEBugger is not even starting: ~/bin/gDEBugger581-x86_64> ./gDEBugger-bin libGL error: failed to load driver: swrast li...

Show Detail