xkb not getting configured for Qt 5.x builds, getting "xkbcommon: ERROR: failed to add default include path auto"



  • When building against Qt 5.4.2, my application complains on startup and the keyboard does not respond to input:

    xkbcommon: ERROR: failed to add default include path auto
    Qt: Failed to create XKB context!
    Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
    

    I know that I can set QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb/ and this goes away, but how can I compile Qt or my application so that users are not forced to set this variable in order to get a working keyboard?
    Thanks.



  • I figured it out. I was building in a build farm environment and it turns out there are no xkb (xkeyboard-config) libraries there unless I explicitly request them. After doing so, the problem goes away.


  • Lifetime Qt Champion

    Hi,

    Glad you found out and thanks for sharing.

    Please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)


Log in to reply
 

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