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.
Workaround
- Find the lib or executable which has the incorrect runpath with
ldd <app or lib>
andchrpath -l <app or lib>
- Replace the wrong path with the correct one (without the offending /usr/lib64) using
chrpath -r <correct path> <app or lib>
The following one-liner did this for liboctgui.so. Just replace "liboctgui.so" by your value.chrpath -r $(chrpath -l liboctgui.so | cut -d '=' -f '2' | awk '{gsub(/\/usr\/lib64/, "")}; 1') liboctgui.so
Origin
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.