Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Static build of Qt + Wayland
QtWS25 Last Chance

Static build of Qt + Wayland

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • HerzenscheinH Offline
    HerzenscheinH Offline
    Herzenschein
    wrote on last edited by
    #1

    Hello, I'm relatively new to Qt, so forgive my ignorance.
    I'm doing this as a learning experience.

    I have done the following steps to build Qt6.5 (dev) statically:

    ./init-repository --module-subset=qtbase,qtdeclarative,qtshadertools,qtwayland
    ./configure -prefix ../qt6dot5 -static -release -nomake tests -nomake examples
    cmake --build . --parallel
    cmake --install .
    

    (I think I also tried it with Qt6.2, so I don't think the Qt version is the issue, but I can try again if needed.)

    It builds successfully after installing Mesa's OpenGL and the needed xcb/X11 development libraries.

    Now, if I import this self built Qt6.5 in QtCreator and run my applications, it works okay, on XWayland. I'd like my apps to run natively on Wayland (I'm on Linux, KDE Plasma 5.26.2, the Wayland compositor is KWin). This works fine with dynamic linking IIRC.

    I figured I needed a qt_import_plugins() call in my CMakeLists.txt to INCLUDE a Qt::QWaylandIntegrationPlugin, since I need to manually add plugins when using a static build. But then I get this error with QT_DEBUG_PLUGINS=1:

    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QStyleFactoryInterface" since plugins are disabled in static builds
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
    qt.qpa.wayland: No shell integration named "xdg-shell" found
    qt.qpa.wayland: No shell integration named "wl-shell" found
    qt.qpa.wayland: No shell integration named "ivi-shell" found
    qt.qpa.wayland: No shell integration named "qt-shell" found
    qt.qpa.wayland: Loading shell integration failed.
    qt.qpa.wayland: Attempted to load the following shells QList("xdg-shell", "wl-shell", "ivi-shell", "qt-shell")
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
    qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl"
    qt.qpa.wayland: Available client buffer integrations: QList()
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleFactoryInterface" since plugins are disabled in static builds
    qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleBridgeFactoryInterface" since plugins are disabled in static builds
    

    I can't figure out how to proceed from there. My guess for the next step would be to use QT_WAYLAND_SHELL_INTEGRATION in some way, or maybe I'm missing something for QtWayland.

    B 1 Reply Last reply
    0
    • HerzenscheinH Herzenschein

      Hello, I'm relatively new to Qt, so forgive my ignorance.
      I'm doing this as a learning experience.

      I have done the following steps to build Qt6.5 (dev) statically:

      ./init-repository --module-subset=qtbase,qtdeclarative,qtshadertools,qtwayland
      ./configure -prefix ../qt6dot5 -static -release -nomake tests -nomake examples
      cmake --build . --parallel
      cmake --install .
      

      (I think I also tried it with Qt6.2, so I don't think the Qt version is the issue, but I can try again if needed.)

      It builds successfully after installing Mesa's OpenGL and the needed xcb/X11 development libraries.

      Now, if I import this self built Qt6.5 in QtCreator and run my applications, it works okay, on XWayland. I'd like my apps to run natively on Wayland (I'm on Linux, KDE Plasma 5.26.2, the Wayland compositor is KWin). This works fine with dynamic linking IIRC.

      I figured I needed a qt_import_plugins() call in my CMakeLists.txt to INCLUDE a Qt::QWaylandIntegrationPlugin, since I need to manually add plugins when using a static build. But then I get this error with QT_DEBUG_PLUGINS=1:

      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QStyleFactoryInterface" since plugins are disabled in static builds
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
      qt.qpa.wayland: No shell integration named "xdg-shell" found
      qt.qpa.wayland: No shell integration named "wl-shell" found
      qt.qpa.wayland: No shell integration named "ivi-shell" found
      qt.qpa.wayland: No shell integration named "qt-shell" found
      qt.qpa.wayland: Loading shell integration failed.
      qt.qpa.wayland: Attempted to load the following shells QList("xdg-shell", "wl-shell", "ivi-shell", "qt-shell")
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
      qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl"
      qt.qpa.wayland: Available client buffer integrations: QList()
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleFactoryInterface" since plugins are disabled in static builds
      qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleBridgeFactoryInterface" since plugins are disabled in static builds
      

      I can't figure out how to proceed from there. My guess for the next step would be to use QT_WAYLAND_SHELL_INTEGRATION in some way, or maybe I'm missing something for QtWayland.

      B Offline
      B Offline
      baltic
      wrote on last edited by
      #2

      @Herzenschein I've solved it by adding Qt${QT_VERSION_MAJOR}::WaylandClientPrivate
      to target_link_libraries() of the app.
      Also add -system-freetype -fontconfig to configure, to not see squares instead of letters. And -no-prefix instead of -prefix ... makes it easier, since you wont have to install.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved