Project ERROR: Unknown module(s) in QT: waylandclient-private



  • Thank you for all things Qt, and I apologize if this is not the right forum to seek assistance about this issue.

    I have Qt 5.8 installed with QtCreator 4.2.1, all of which I installed using the downloadable installer script from the Qt web site. Using Fedora 23.

    I have cloned https://github.com/cordlandwehr/fosdem-2017-talk-qtwayland and have opened the demo.pro project in QtCreator. However, the "General Messages" panel displays:

    Project ERROR: Unknown module(s) in QT: waylandclient-private
    Project ERROR: Unknown module(s) in QT: waylandclient-private
    Project ERROR: Unknown module(s) in QT: waylandcompositor-privatea

    Would anyone please be able to tell me why I see these messages, and what I need to do in order to squelch them and build the demo project?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You need to first clone and build the module before you can use it with your project.



  • Should I build the QtWayland project with QtCreator? Here's what I've done.

    I've cloned the qtwayland repo, and I've opened the project, using qtwayland.pro in QtCreator. Apologies for the error dump here, but I see the following General Messages:

    Project ERROR: Could not find feature wayland-client.
    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandClient -version 5.9.0 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandCompositor -version 5.9.0 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.

    Are those project errors telling me it can't find certain dependencies?
    I currently have wayland built from source and installed in ~/install, for development. Should I install wayland as a package on my system, or should I somehow point my project to ~/install/lib ?


  • Lifetime Qt Champion

    You should add something like

    qmake "INCLUDEPATH += /path/to/wayland/includes" "LIBS +=-L/path/to/wayland/libraries"

    You can add these parameters also in Qt Creator.



  • Thank you @SGaist I appreciate the help. I have modified my qtwayland.pro file, which now contains:

    requires(linux:!android)
    load(qt_parts)
    INCLUDEPATH += /home/ybakos/install/include
    LIBS +=-L/home/ybakos/install/lib
    

    But I still see the following General Messages:

    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandClient -version 5.9.0 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandCompositor -version 5.9.0 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    Project ERROR: Could not find feature wayland-client.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Could not find feature wayland-egl.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'wayland-client' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.
    [Inexact] Project ERROR: Library 'wayland-server' is not defined.
    [Inexact] Project ERROR: Library 'xcomposite' is not defined.

    My ~/install/include contains the Wayland header files, and my ~/install/lib contains the library files (eg. libwayland-client.so, etc).

    I did clear the message pane and re-open the project.


  • Lifetime Qt Champion

    Ok, I've missed something, you have the dev branch checked out. There's been a big rework of the build handling.
    I'm not yet used to the internal details but I think you need to use something like:

    QMAKE_LIBDIR_XCOMPOSITE+=/path/to/xcomposite/libs/
    QMAKE_INCDIR_XCOMPOSITE+=/path/to/xcomposite/includes/
    

    in place of the INCLUDEPATH and LIBS variables.



  • Is xcomposite a separate dependency from libxkbcommon? If so, it doesn't seem that the xcomposite dependency is documented anywhere.



  • I've built xcomposite from source and installed in ~/install/lib.

    I am indeed on the dev branch of qtwayland. I've pulled the latest HEAD.

    My qtwayland.pro contains:

    requires(linux:!android)
    load(qt_parts)
    INCLUDEPATH += /home/ybakos/install/include
    LIBS +=-L/home/ybakos/install/lib
    QMAKE_INCDIR_XCOMPOSITE+=/home/ybakos/install/include
    QMAKE_LIBDIR_XCOMPOSITE+=/home/ybakos/install/lib
    

    Yet I still see the same errors in the General Messages panel.

    I also get the same results when commenting out INCLUDEPATH and LIBS and just using the QMAKE* config vars.

    I also get the same results when using the 5.8 branch.

    I've now also tried building qtwayland without using QtCreator. The output of just qmake (no additional options passed) is:

    Info: creating cache file /home/ybakos/projects/qtwayland/.qmake.cache
    
    Running configuration tests...
    Checking for Wayland client library... yes
    Checking for Wayland cursor library... yes
    Checking for wayland-scanner... yes
    Checking for DRM EGL Server... yes
    Checking for libhybris EGL Server... no
    Checking for Wayland EGL library... yes
    Checking for XComposite... yes
    Checking for GLX... yes
    Checking for wayland-server... yes
    Done running configuration tests.
    
    Configure summary:
    
    Qt Wayland Drivers:
      EGL .................................... yes
      Rasberry Pi ............................ no
      XComposite EGL ......................... yes
      XComposite GLX ......................... yes
      DRM EGL ................................ yes
      libhybris EGL .......................... no
    Qt Wayland Client ........................ yes
    Qt Wayland Compositor .................... yes
    

    However, running make results in a linker error: http://pastebin.com/3bL8c7Jy

    Thank you for any tips, @SGaist .


  • Lifetime Qt Champion

    Do you have the dev package from libxkbcommon installed ? If so which version ?



  • Thank you again, @SGaist . I installed libxcbcommon from source, which is installed in the same place as my wayland libs and includes. I am going to install the package, try rebuilding and report back.



  • All right. I have now installed the libxkbcommon-devel package, version 0.6.1.

    $ rpm -q libxkbcommon-devel
    libxkbcommon-devel-0.6.1-1.fc23.x86_64
    

    I also pulled the latest xkbcommon, built and reinstalled in ~/install/lib.

    When rebuilding qtwayland, I see the same error.

    The contents of my ~/install/lib are listed in a pastebin here.

    Thanks again, @SGaist .


  • Lifetime Qt Champion

    Did you check in the build log that you are using your own build of libxkbcommon ?



  • @SGaist I haven't found a reference to libxkbcommon anywhere in the log produced by make. I've pasted the entire results of make here.

    Am I looking in the wrong place?



  • I'm seeing similar problems with using Wayland compositor and then in my attempts to build the QtWayland module (Qt 5.8). It would be good if some comprehensive instructions (incl. dependencies) could be provided.



  • qwaylandxkb.cpp only includes

    #include <xkbcommon/xkbcommon-keysyms.h>
    

    Yet xkb_keysym_to_utf32 is defined in xkbcommon/xkbcommon.h.

    But even if I include that header in qwaylandxkb.cpp, I still get the same error.

    Grrrr!

    I do notice that in my config.cache there is no mention of xkbcommon, unlike the other dependencies.



  • Ah, but qwaylandxkb.cpp does include qwaylandxkb.h, which in turn includes xkbcommon/xkbcommon.h.

    I've perhaps noticed another clue. During a make clean I see the error:

    Project ERROR: Library 'xkbcommon_evdev' is not defined.

    I've also found the possibly relevant bugs:



  • I've filed a new bug report:
    https://bugreports.qt.io/browse/QTBUG-58839


  • Lifetime Qt Champion

    Thanks for sharing your findings and the link !



  • But isn't there something I can do to fix this? (Is it a build config?)

    I'm open to suggestions.

    In the mean time, I'm going to set up a dev env on Fedora 25 and see if I get the same error.



  • Same environment configuration on Fedora 25, and the same build error occurs.
    Is there some detail regarding the config/make of libxkbcommon that is missing?


  • Lifetime Qt Champion

    I'm not yet used to the new feature build, so there might be a -lxkbcommon generation line missing somewhere but I don't know yet where to exactly look for it.



  • I found a similar build issue in another project to see if I could find some clues. It too mentions something about a -lxkbcommon issue.

    On my machine, the output of pkg-config --libs xkbcommon

     -L/home/ybakos/install/lib -lxkbcommon 
    

    I've tried building with:

    LDFLAGS="-L/home/ybakos/install/lib -lxkbcommon" CFLAGS="-I/home/ybakos/install/include" make
    

    But still have the same error.

    The output of uname -a is:

    Linux hades-fedora-localdomain 4.7.3-100.fc23.x86_64 #1 SMP Wed Sep 7 17:26:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    

  • Lifetime Qt Champion

    Try rather at the qmake level: qmake LIBS+="-L/home/ybakos/install/lib -I/home/ybakos/install/include -lxkbcommon"



  • Thanks @SGaist ... but after removing prior qmake configs, running qmake LIBS+="-L/home/ybakos/install/lib -I/home/ybakos/install/include -lxkbcommon", and then make, I get the same error. Also the same when I run make with the LDFLAGS and CFLAGS set.



  • I've just now tried opening the qtwayland project in Qt Creator again for the first time since trying to build from the command line.

    The good (?) news is that the only error I am seeing in the General Messages are:

    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandClient -version 5.8.1 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    [Inexact] Project MESSAGE: perl -w /home/ybakos/Qt/5.8/gcc_64/bin/syncqt.pl -module QtWaylandCompositor -version 5.8.1 -outdir /home/ybakos/projects/build-qtwayland-Desktop_Qt_5_8_0_GCC_64bit-Debug /home/ybakos/projects/qtwayland
    
    Project ERROR: Library 'xkbcommon_evdev' is not defined.
    

    To my knowledge, xkbcommon_evdev isn't a separate library... how can I squelch this error? I feel like this is somehow related to my build issue.


  • Lifetime Qt Champion

    Do you have a QMAKE_USE= somewhere ?



  • @SGaist My apologies, but I'm not familiar with that config var. Where/how do I use it?


  • Lifetime Qt Champion

    Sorry, I was talking about the sources of the module.



  • @SGaist There are QMAKE_USE declarations throughout the various .pro files. For example:

    QMAKE_USE += wayland-client wayland-server
    

    In ivi-shell.pro, compositor.pro, and wayland_wrapper.pri I do see:

    QMAKE_USE += xkbcommon_evdev
    

  • Lifetime Qt Champion

    Comment that one and you should be able to go further.



  • @SGaist Thank you (again) but I've commented out every occurrence of QMAKE_USE += xkbcommon_evdev, re-run qmake and make, and still observe the same build error.



  • Developers have chimed in with a patch.
    https://codereview.qt-project.org/#/c/187132/


  • Lifetime Qt Champion

    Nice ! Thanks for sharing



  • I have encountered this error during documentation-only build on Mint Linux 18.2. In fact the build error is not now actual, but the file ./qtwayland/tests/auto/compositor/compositor/compositor.pro contains the following strings:

    qtConfig(xkbcommon-evdev)
        QMAKE_USE += xkbcommon_evdev
    

    which produce the error.

    I removed these strings temporarily to eliminate the error and received successful build.


Log in to reply
 

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