[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#913287: libqt5core5a: loads libGL.so instead of libGL.so.1, causing PyQt5 to crash on systems with NVIDIA libraries installed



On Fri, Nov 09, 2018 at 12:15:40AM +0000, Julian Gilbey wrote:
> It turns out that the bug lies in the libqt5core5a library, which
> tries loading libGL.so before trying libGL.so.1, which is the wrong
> order (in particular on Debian-based systems - see the above Debian
> bug report for a discussion of why).  I have created and tested the
> attached patch for the bug.
> 
> It would be great if this patch could be applied to Debian before
> buster is frozen; it probably won't make it into the upstream sources
> in time for buster (because it would presumably go into the 5.12.x
> tree).

Another thought: since on Debian-based systems, it is never correct to
dlopen("libGL.so"), the patch could even be simplified to only try
loading libGL.so.1 as follows:

--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -650,9 +650,7 @@
 #if QT_CONFIG(library)
                 extern const QString qt_gl_library_name();
 //                QLibrary lib(qt_gl_library_name());
-                QLibrary lib(QLatin1String("GL"));
+                QLibrary lib(QLatin1String("GL"), 1);
-                if (!lib.load())
-                    lib.setFileNameAndVersion(QLatin1String("GL"), 1);
                 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
 #endif
             }


Best wishes,

   Julian


Reply to: