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

gl_ozone_egl.cc uses gl_surface_egl.h but gl_surface_egl.cc is never compiled/linked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.10.0, 5.10.1
    • WebEngine
    • None

    Description

      Hello, cross-building fails with this linker error (at libQt5WebEngineCore.so, I shortened this instruction and replaced a bunch of objects in the middle with [...] to reducde the clutter):

      arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/cs/qt5.10.0/sysroot -Wl,--no-undefined -Wl,--version-script,QtWebEngineCore.version -Wl,--gc-sections -Wl,-O1 -Wl,-z,now -Wl,-z,defs -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN -Wl,-rpath-link,/home/cs/qt5.10.0/sysroot/opt/vc/lib -Wl,-rpath-link,/home/cs/qt5.10.0/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/cs/qt5.10.0/sysroot/lib/arm-linux-gnueabihf -shared -Wl,-soname,libQt5WebEngineCore.so.5 -o libQt5WebEngineCore.so.5.10.0   -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Quick -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Gui -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Qml -lQt5Network -lQt5Core -lpthread -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Gui -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -L/home/cs/qt5.10.0/build/qtwebchannel/lib -lQt5WebChannel -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Qml -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Network -lQt5Core -lpthread -lQt5Qml -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Network -lQt5Core -lpthread -lQt5Network -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -L/home/cs/qt5.10.0/build/qtlocation/lib -lQt5Positioning -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5Core -lpthread -lpthread @/home/cs/qt5.10.0/build/qtwebengine/src/core/release/Qt5WebEngineCore.rsp -Wl,--start-group /home/cs/qt5.10.0/build/qtwebengine/src/core/release/obj/base/libbase.a [...]  /home/cs/qt5.10.0/build/qtwebengine/src/core/release/obj/third_party/hunspell/libhunspell.a -Wl,--end-group -L/home/cs/qt5.10.0/sysroot/usr/lib/arm-linux-gnueabihf -lQt5Quick -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Gui -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Qml -lQt5Network -lQt5Core -lpthread -lQt5Gui -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5WebChannel -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Qml -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Network -lQt5Core -lpthread -lQt5Qml -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Network -lQt5Core -lpthread -lQt5Network -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5Positioning -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5Core -lpthread -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lpthread -ldl -lrt -lnss3 -lnssutil3 -lsmime3 -lplds4 -lplc4 -lnspr4 -levent -lresolv -lfreetype -lfontconfig -ljpeg -lpng16 -lwebpmux -lwebpdemux -lwebp -lexpat -lre2 -lpci -lopus -lasound -lm -lz -ldbus-1 -lxml2 -lxslt -L/home/cs/qt5.10.0/build/qtwebengine/src/core/api/release -Wl,-whole-archive -lqtwebenginecoreapi -Wl,-no-whole-archive -lEGL -lGLESv2 -lQt5Quick -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Gui -L/home/cs/qt5.10.0/build/qtdeclarative/lib -lQt5Qml -lQt5Network -lQt5Core -lpthread -lQt5Gui -L/home/cs/qt5.10.0/sysroot/opt/vc/lib -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5Qml -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Network -lQt5Core -lpthread -lQt5Network -L/home/cs/qt5.10.0/build/qtbase/lib -lQt5Core -lpthread -lQt5Core -lpthread -lGLESv2 -lbcm_host -lvcos -lvchiq_arm
      /home/cs/qt5.10.0/build/qtwebengine/src/core/release/obj/ui/ozone/common/common/gl_ozone_egl.o:gl_ozone_egl.cc:function ui::GLOzoneEGL::InitializeGLOneOffPlatform(): error: undefined reference to 'gl::GLSurfaceEGL::InitializeOneOff(int)'
      

      Upon inspection it turned out that

      1. qt-everywhere-src-5.10.0/qtwebengine/src/3rdparty/chromium/ui/ozone/common/gl_ozone_egl.cc includes header file ui/gl/gl_surface_egl.h
      2. header gl_surface_egl.h declares class gl::GLSurfaceEGL and also its static method InitializeOneOff(int), the one the linker is missing
      3. class gl::GLSurfaceEGL is implemented in ui/gl/gl_surface_egl.cc, but
      4. ui/gl/gl_surface_egl.cc gets never compiled and linked to libQt5WebEngineCore.so, thus leading to the linker failure in my build

      The last point can be demonstrated by running find . -name 'gl_surface*' in your build directory which in my case only yíelds:

      $ find . -name 'gl_surface*'
      ./qtwebengine/src/core/Release/obj/QtWebEngineCore/gl_surface_qt.o
      ./qtwebengine/src/core/Release/obj/ui/gl/gl/gl_surface.o
      ./qtwebengine/src/core/Release/obj/ui/gl/gl/gl_surface_overlay.o
      ./qtwebengine/src/core/Release/obj/ui/gl/gl/gl_surface_osmesa.o
      ./qtwebengine/src/core/Release/obj/ui/gl/gl/gl_surface_stub.o
      

      To see if it helps I removed the two references to the missing class gl::GLSurfaceEGL in gl_ozone_egl.cc. In method InitializeGLOneOffPlatform() I simply replaced the whole method body with return false;.

      I then called make again to continue the build from where it had failed, and indeed, the build finished through until the end without further problems (runs very nice on the Pi).

      First attempts to add gl_surface_egl.{cc|o} myself failed with lots of linker conflicts, it seems it's not meant to be mixed in. How can this be fixed?

      What will my crude workaround break (couldn't find any problems so far), what is Ozone?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            chschnell Christian Schnell
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes