When running an app that uses Qt 4.7 on my Fedora 19 box I am getting the following errors from the application:
libGL: screen 0 does not appear to be DRI2 c
We were able to get rid of the same error messages for octave-4.0.0-rc1 which also use Qt. The bug hunting history can be found here.
It turned out to be an incorrect runpath in a shared library (.so). The runpath contained /usr/lib64. Hence at runtime the /usr/lib64/libGL.so was loaded, instead of the right nvidia /usr/X11R6/lib64/libGL.so.
ldd
and chrpath -l
chrpath -r
chrpath -r $(chrpath -l liboctgui.so | cut -d '=' -f '2' | awk '{gsub(/\/usr\/lib64/, "")}; 1') liboctgui.so
The incorrect runpath was picked up at compilation time from an irrelevant
-L/usr/lib64
in libQt*.la
files located in /usr/lib64.
The comment #18 explains why it is wrong.
And indeed, lib*.la
files should not be packaged, according to OpenSUSE own recommendations
Avoid packaging libtool config files (.la files). If you do not package a static library, and if you are also placing the shared library in a standard search directory (i.e. %_lib, /usr/%_lib), they will not be needed.
Removing lib*.la
from /usr/lib64 and rebuilding fixed the problem for good.