Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71488

QtWebEngine: can load wrong libGL.so in certain circumstances

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.1
    • 5.12.0 Beta 3
    • QPA: X11/XCB, WebEngine
    • None
    • Debian GNU/Linux with NVIDIA video drivers
    • Linux/X11
    • 4538dd7ec4efcce5760f87dc1751b142b8f35479 (qt/qtbase/5.12)

    Description

      As noted in bug #415733, there is a problem with the mesa code dlopen-ing libGL.so rather than the correct library name (libGL.so or libGL.so.1); this can cause a problem if the NVIDIA libraries are installed, as the system libGL.so might be loaded instead of the NVIDIA one (which on Debian at least is only installed as libGL.so.1). This is what I wrote in that bug report:

      So I think I may have found the source of this bug: it's in line 1079 of src/3rdparty/chromium/third_party/mesa/src/src/egl/drivers/glx/egl_glx.c (in qtwebengine), which reads:

      handle = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
      

      Note that the library name is hard-coded without a .1 suffix. In src/3rdparty/chromium/ui/ozone/platform/x11/gl_ozone_glx.cc and src/3rdparty/chromium/ui/gl/init/gl_initializer_x11.cc, there is a macro for defining the correct library name, which checks for OS_OPENBSD. Patching egl_glx.c to use a macro in the same way in place of the hard-coded library name would presumably fix this bug.

      I also reported it upstream to: https://bugs.chromium.org/p/chromium/issues/detail?id=878026 and they replied that mesa is no longer in the chromium source repository.  So it would be good to either fix this one small bug, or better still, in the longer term, to update the chromium subproject of qtwebengine to use the up-to-date chromium repository which has switched to SwiftShader.

      Thanks!

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-71488
          # Subject Branch Project Status CR V

          Activity

            People

              michal Michal Klocek
              jdg Julian Gilbey
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes