[Interest] Qt6 fails to compile on linux Ubuntu 22.04

Nuno Santos nuno.santos at imaginando.pt
Thu Jan 5 17:24:34 CET 2023


Hi,

I’m trying to compile Qt 6.4.1 on Linux from source but I’m having the following error:

/usr/bin/ld: qtbase/lib/libQt6XcbQpa.a(qxcbkeyboard.cpp.o): in function `QXcbKeyboard::possibleKeys(QKeyEvent const*) const':
qxcbkeyboard.cpp:(.text._ZNK12QXcbKeyboard12possibleKeysEPK9QKeyEvent+0x2e): undefined reference to `QXkbCommon::possibleKeys(xkb_state*, QKeyEvent const*, bool, bool)'
/usr/bin/ld: qtbase/lib/libQt6XcbQpa.a(qxcbkeyboard.cpp.o): in function `QXcbKeyboard::initialize()':
qxcbkeyboard.cpp:(.text._ZN12QXcbKeyboard10initializeEv+0x24): undefined reference to `QXkbCommon::setXkbContext(QPlatformInputContext*, xkb_context*)'
/usr/bin/ld: qtbase/lib/libQt6XcbQpa.a(qxcbkeyboard.cpp.o): in function `QXcbKeyboard::updateKeymap()':
qxcbkeyboard.cpp:(.text._ZN12QXcbKeyboard12updateKeymapEv+0xe2): undefined reference to `QXkbCommon::verifyHasLatinLayout(xkb_keymap*)'
/usr/bin/ld: qtbase/lib/libQt6XcbQpa.a(qxcbkeyboard.cpp.o): in function `QXcbKeyboard::handleKeyEvent(unsigned int, QEvent::Type, unsigned char, unsigned short, unsigned int, bool)':
qxcbkeyboard.cpp:(.text._ZN12QXcbKeyboard14handleKeyEventEjN6QEvent4TypeEhtjb+0xee): undefined reference to `QXkbCommon::lookupString(xkb_state*, unsigned int)'
/usr/bin/ld: qxcbkeyboard.cpp:(.text._ZN12QXcbKeyboard14handleKeyEventEjN6QEvent4TypeEhtjb+0x12e): undefined reference to `QXkbCommon::keysymToQtKey(unsigned int, QFlags<Qt::KeyboardModifier>, xkb_state*, unsigned int, bool, bool)'
collect2: error: ld returned 1 exit status
[18/3272] Building CXX object qtsvg/src/svgwidgets/CMakeFiles/SvgWidgets.dir/cmake_pch.hxx.gch
ninja: build stopped: subcommand failed.

Does anyone knows why is it failing?

Regards,

Best,

Nuno



More information about the Interest mailing list