How to use Wayland? (Platform plugin?)



  • Hi,

    I have been developing a desktop environment for Linux for quite a while now. I'd like to develop my own integrated window manager, but at this point in time it's not really worth the trouble trying to wrap my head around X11 anymore, since Wayland is generally considered to be the way forward.

    I think I understand how it works, roughly. I have the Weston compositor installed, and I can run that on my system. Inside Weston, I can run Qt apps (for example, the Dolphin file manager) using the --platform wayland argument)

    However I am unable to do this with my own app. I have installed Qt 5.8 which doesn't seem to have this plugin. It is however installed as part of my OS (Kubuntu 15.10) in /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/

    I have tried copying libqwayland-egl.so and libqwayland-generic.so to my Qt 5.8 installation plugins folder, and sure enough, whenever I try to launch my app using --platform wayland, the message

    This application failed to start because it could not find or load the Qt platform plugin "wayland"
    in "".

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, xcb.

    now appears. I'm guessing it doesn't work because they're from an older Qt installation?

    I'm not supposed to compile Qt 5.8 myself to get the wayland plugin, am I? If it isn't included by default, why not? Is there a way to obtain the correct plugin for Qt 5.8 otherwise?

    Thank you for reading


  • Lifetime Qt Champion

    Hi,

    No, you don't need to rebuild all of Qt. Just clone the QtWayland module and build it with your 5.8 Qt. Don't forget to call make install afterward.



  • @SGaist
    Interesting. I cloned QtWayland from here (https://github.com/qt/qtwayland),
    and made sure I have all the dependencies installed for Ubuntu (described here https://wiki.qt.io/QtWayland)

    Next I opened qtwayland.pro with QtCreator and attempted to build it, but it now fails with a bunch of errors:

    make[1]: Leaving directory '/download/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Release/src'
    Makefile:44: recipe for target 'sub-src-make_first' failed
    /usr/bin/ld: warning: libicuuc.so.56, needed by /development/qt/5.8/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)
    /usr/bin/ld: warning: libicudata.so.56, needed by /development/qt/5.8/gcc_64/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_clone_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_close_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_setAttribute_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_setSubstChars_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_close_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openTimeZoneIDEnumeration_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_fromUnicode_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `uenum_close_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getDefaultName_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_inDaylightTime_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_compareNames_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_open_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getAlias_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_countAvailable_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `u_strToLower_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getDefaultTimeZone_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openCountryTimeZones_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getDSTSavings_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_close_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openTimeZones_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getStandardName_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_countAliases_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_open_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_open_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_setMillis_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_get_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `uenum_next_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getMaxCharSize_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_strcoll_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `u_errorName_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getAvailableName_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getTimeZoneDisplayName_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `u_strToUpper_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_toUnicode_56'
    /development/qt/5.8/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_getSortKey_56'
    collect2: error: ld returned 1 exit status
    make[2]: *** [../../bin/qtwaylandscanner] Error 1
    make[1]: *** [sub-qtwaylandscanner-make_first] Error 2
    make: *** [sub-src-make_first] Error 2
    11:55:01: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project qtwayland (kit: Desktop Qt 5.8.0 GCC 64bit)
    When executing step "Make"
    11:55:01: Elapsed time: 00:00.
    

    Am I doing wrong or do I lack some dependencies still?


  • Lifetime Qt Champion

    Do you have the development package of ICU installed ?



  • @SGaist

    Yes

    libicu-dev is already the newest version (57.1-4).
    libicu-dev set to manually installed.
    

  • Lifetime Qt Champion

    It looks like it's searching for the 56 version.

    I'm not sure whether the official package comes with a bundled version but I think so. Can you check that ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.