Solved QT 5.15.2 compilation failing on beaglebone (Undefined ref QXkbCommon)
-
See below error message. It appears it is trying to use a qt supplied xkbcommon lib. I can't find any indication of how to select the system verion. using -system-xkbcommon gives "invalid boolean" result.
make[6]: Entering directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms/xcb' rm -f libQt5XcbQpa.so.5.15.2 libQt5XcbQpa.so libQt5XcbQpa.so.5 libQt5XcbQpa.so.5.15 g++ -Wl,--no-undefined -Wl,--version-script,QtXcbQpa.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN -shared -Wl,-soname,libQt5XcbQpa.so.5 -o libQt5XcbQpa.so.5.15.2 .obj/qxcbclipboard.o .obj/qxcbconnection.o .obj/qxcbintegration.o .obj/qxcbkeyboard.o .obj/qxcbmime.o .obj/qxcbscreen.o .obj/qxcbwindow.o .obj/qxcbbackingstore.o .obj/qxcbwmsupport.o .obj/qxcbnativeinterface.o .obj/qxcbcursor.o .obj/qxcbimage.o .obj/qxcbxsettings.o .obj/qxcbsystemtraytracker.o .obj/qxcbeventqueue.o .obj/qxcbeventdispatcher.o .obj/qxcbconnection_basic.o .obj/qxcbconnection_screens.o .obj/qxcbconnection_xi2.o .obj/qxcbatom.o .obj/qxcbdrag.o .obj/qxcbsessionmanager.o .obj/qxcbglintegrationfactory.o .obj/qxcbglintegration.o .obj/qxcbnativeinterfacehandler.o .obj/qxcbvulkaninstance.o .obj/qxcbvulkanwindow.o .obj/moc_qxcbclipboard.o .obj/moc_qxcbconnection.o .obj/moc_qxcbmime.o .obj/moc_qxcbnativeinterface.o .obj/moc_qxcbsystemtraytracker.o .obj/moc_qxcbeventqueue.o .obj/moc_qxcbeventdispatcher.o .obj/moc_qxcbconnection_basic.o .obj/moc_qxcbglintegrationplugin.o /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5ServiceSupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5ThemeSupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5FontDatabaseSupport.a -lfontconfig -lfreetype -lz /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5XkbCommonSupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5LinuxAccessibilitySupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5AccessibilitySupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5VulkanSupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5Gui.so /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5EdidSupport.a /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5DBus.so /home/debian/qt-everywhere-src-5.15.2/qtbase/lib/libQt5Core.so -lpthread -lX11-xcb -lxcb-icccm -lxcb-image -lxcb-shm -lxcb-util -lxcb-keysyms -lxcb-randr -lxcb-render-util -lxcb-render -lxcb-shape -lxcb-sync -lxcb-xfixes -lxcb-xinerama -lxcb-xkb -lxcb-xinput -lxcb -lXext -lX11 -lm -lSM -lICE -lxkbcommon-x11 -lxkbcommon -ldl -lgthread-2.0 -lglib-2.0 /usr/bin/ld: .obj/qxcbkeyboard.o: in function `QXcbKeyboard::possibleKeys(QKeyEvent const*) const': qxcbkeyboard.cpp:(.text+0x10e): undefined reference to `QXkbCommon::possibleKeys(xkb_state*, QKeyEvent const*, bool, bool)' /usr/bin/ld: .obj/qxcbkeyboard.o: in function `QXcbKeyboard::updateKeymap()': qxcbkeyboard.cpp:(.text+0x1564): undefined reference to `QXkbCommon::verifyHasLatinLayout(xkb_keymap*)' /usr/bin/ld: .obj/qxcbkeyboard.o: in function `QXcbKeyboard::handleKeyEvent(unsigned int, QEvent::Type, unsigned char, unsigned short, unsigned int, bool)': qxcbkeyboard.cpp:(.text+0x183c): undefined reference to `QXkbCommon::lookupString(xkb_state*, unsigned int)' /usr/bin/ld: qxcbkeyboard.cpp:(.text+0x186e): undefined reference to `QXkbCommon::keysymToQtKey(unsigned int, QFlags<Qt::KeyboardModifier>, xkb_state*, unsigned int, bool, bool)' /usr/bin/ld: .obj/qxcbkeyboard.o: in function `QXcbKeyboard::initialize()': qxcbkeyboard.cpp:(.text+0x3ba): undefined reference to `QXkbCommon::setXkbContext(QPlatformInputContext*, xkb_context*)' collect2: error: ld returned 1 exit status make[6]: *** [Makefile.xcb_qpa_lib:337: ../../../../lib/libQt5XcbQpa.so.5.15.2] Error 1 make[6]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms/xcb' make[5]: *** [Makefile:46: sub-xcb_qpa_lib-pro-make_first-ordered] Error 2 make[5]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms/xcb' make[4]: *** [Makefile:101: sub-xcb-make_first] Error 2 make[4]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms' make[3]: *** [Makefile:105: sub-platforms-make_first] Error 2 make[3]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src/plugins' make[2]: *** [Makefile:618: sub-plugins-make_first] Error 2 make[2]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase/src' make[1]: *** [Makefile:51: sub-src-make_first] Error 2 make[1]: Leaving directory '/home/debian/qt-everywhere-src-5.15.2/qtbase' make: *** [Makefile:82: module-qtbase-make_first] Error 2
configure output:
Build type: linux-g++ (arm, CPU features: <none>) Compiler: gcc 8.3.0 Configuration: compile_examples enable_new_dtags largefile precompile_header shared shared rpath release c++11 c++14 c++17 c++1z concurrent dbus reduce_exports stl Build options: Mode ................................... release Optimize release build for size ........ no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++17 Using ccache ........................... no Using new DTAGS ........................ yes Relocatable ............................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. no Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... yes Using system zlib ...................... yes Zstandard support ...................... no Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ yes GLib ................................... yes iconv .................................. no ICU .................................... yes Built-in copy of the MIME database ..... yes Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ yes DTLS ................................... yes OCSP-stapling .......................... yes SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ yes Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... yes PNG .................................. yes Using system libpng ................ yes Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... no OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. yes Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. no xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... no xkbcommon-x11 ........................ yes QPA backends: DirectFB ............................... no EGLFS .................................. no LinuxFB ................................ yes VNC .................................... yes XCB: Using system-provided xcb-xinput ..... yes Native painting (experimental) ....... no GL integrations: GLX Plugin ......................... no EGL-X11 Plugin ..................... no Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... yes Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... yes Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. yes OCI (Oracle) ........................... no ODBC ................................... yes PostgreSQL ............................. yes SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... yes Qt Testlib: Tester for item models ................. yes Serial Port: ntddmodm ............................... no Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes SerialPort Support ..................... yes Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. yes WEBP ................................... yes Using system libwebp ................. no Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML just-in-time compiler .............. yes QML sequence object .................... yes QML XML http request ................... yes QML Locale ............................. yes Qt QML Models: QML list model ......................... yes QML delegate model ..................... yes Qt Quick: Direct3D 12 ............................ no AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes QtQuick3D: Assimp ................................. yes System Assimp .......................... no Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no Native Win32 Bluetooth ................. no WinRT Bluetooth API (desktop & UWP) .... no WinRT advanced bluetooth low energy API (desktop & UWP) . no Qt Sensors: sensorfw ............................... no Qt Quick Controls 2: Styles ................................. Default Fusion Imagine Material Universal Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes QtXmlPatterns: XML schema support ..................... yes Qt Multimedia: ALSA ................................... yes GStreamer 1.0 .......................... no GStreamer 0.10 ......................... no Video for Linux ........................ yes OpenAL ................................. no PulseAudio ............................. yes Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. no Windows Media Foundation ............... no Qt TextToSpeech: Flite .................................. no Flite with ALSA ........................ no Speech Dispatcher ...................... no Qt Tools: Qt Assistant ........................... yes Qt Designer ............................ yes Qt Distance Field Generator ............ yes kmap2qmap .............................. yes Qt Linguist ............................ yes Mac Deployment Tool .................... no makeqpf ................................ yes pixeltool .............................. yes qdbus .................................. yes qev .................................... yes Qt Attributions Scanner ................ yes qtdiag ................................. yes qtpaths ................................ yes qtplugininfo ........................... yes Windows deployment tool ................ no WinRT Runner Tool ...................... no Qt Tools: QDoc ................................... no Qt WebEngine Build Tools: Use System Ninja ....................... no Use System Gn .......................... no Jumbo Build Merge Limit ................ 8 Developer build ........................ no Sanitizer .............................. no QtWebEngine required system libraries: fontconfig ........................... yes dbus ................................. yes nss .................................. no khr .................................. yes glibc ................................ yes QtWebEngine required system libraries for qpa-xcb: x11 .................................. yes libdrm ............................... yes xcomposite ........................... yes xcursor .............................. yes xi ................................... yes xtst ................................. yes Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . no opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. yes zlib ................................. yes minizip .............................. no libevent ............................. no jsoncpp .............................. no protobuf ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. yes JPEG ................................. yes harfbuzz ............................. yes freetype ............................. yes Note: Also available for Linux: linux-clang linux-icc Note: The following modules are not being compiled in this configuration: webenginecore webengine webenginewidgets pdf pdfwidgets WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. On Windows, you must set LLVM_INSTALL_DIR to the installation path. WARNING: Tool gperf is required to build QtWebEngine. WARNING: Tool gperf is required to build QtPdf. WARNING: QtWebEngine will not be built. WARNING: QtPdf will not be built.
-
Hi,
How did you get the sources ?
Recent versions of Qt do not provide XkbCommon anymore so it uses the one provided by the system. Your error comes from the backend itself that is built on top of it.
-
I downloaded the qt source tar directly from qt.io
the libxkbcommon-dev and libxkbcommon-x11-dev packages were obtained via apt repos. I am compiling on debian10.
configure command used to get output
./configure -release -opensource -confirm-license -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5.15 -no-use-gold-linker -v -no-egl -no-opengl -linuxfb -xcb -xcb-xlib
-
I started over from scratch and have been successful. Unfortunately I didn't keep track of everything so I can't say for certain what caused it. I did add a swap file to deal with any issues running out of ram while compiling. And its entirely possible I had previously used the -bundled-xcb-xinput flag without starting from a new source directory. Will mark resolved.