Compiling QT application on PX2

I’m trying to my QT based application on PX2 (Ubuntu 16.04).
I have cross-compiled QT version 5.9 (application’s requirements) on my host for PX2 target and it seems to be compiled OK, but once I’m trying to run my test application, I have got the following error message:

nvidia@nvidia:~$ ./test
This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms:/usr/lib/aarch64-linux-gnu/qt4/plugins/platforms”.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)
nvidia@nvidia:~$

After digging a little bit, I have found that the problem is due to missing elements in libQt5XcbQpa, as detailed below:
nvidia@nvidia:~$ ldd -r -d /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so
linux-vdso.so.1 => (0x0000007f7e651000)
libQt5XcbQpa.so.5 => /usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5 (0x0000007f7e52a000)
libQt5Gui.so.5 => /usr/lib/aarch64-linux-gnu/libQt5Gui.so.5 (0x0000007f7e0b9000)
libQt5Core.so.5 => /usr/lib/aarch64-linux-gnu/libQt5Core.so.5 (0x0000007f7dac8000)
libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f7d936000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f7d7f0000)
libX11-xcb.so.1 => /usr/lib/aarch64-linux-gnu/libX11-xcb.so.1 (0x0000007f7d7dd000)
libXi.so.6 => /usr/lib/aarch64-linux-gnu/libXi.so.6 (0x0000007f7d7bf000)
libxcb-render-util.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-render-util.so.0 (0x0000007f7d7ab000)
libSM.so.6 => /usr/lib/aarch64-linux-gnu/libSM.so.6 (0x0000007f7d792000)
libICE.so.6 => /usr/lib/aarch64-linux-gnu/libICE.so.6 (0x0000007f7d76a000)
libxcb-render.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-render.so.0 (0x0000007f7d752000)
libxcb.so.1 => /usr/lib/aarch64-linux-gnu/libxcb.so.1 (0x0000007f7d726000)
libxcb-image.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-image.so.0 (0x0000007f7d712000)
libxcb-icccm.so.4 => /usr/lib/aarch64-linux-gnu/libxcb-icccm.so.4 (0x0000007f7d6fd000)
libxcb-sync.so.1 => /usr/lib/aarch64-linux-gnu/libxcb-sync.so.1 (0x0000007f7d6e6000)
libxcb-xfixes.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-xfixes.so.0 (0x0000007f7d6cf000)
libxcb-shm.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-shm.so.0 (0x0000007f7d6bc000)
libxcb-randr.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-randr.so.0 (0x0000007f7d6a0000)
libxcb-shape.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-shape.so.0 (0x0000007f7d68c000)
libxcb-keysyms.so.1 => /usr/lib/aarch64-linux-gnu/libxcb-keysyms.so.1 (0x0000007f7d679000)
libxcb-xkb.so.1 => /usr/lib/aarch64-linux-gnu/libxcb-xkb.so.1 (0x0000007f7d653000)
libxkbcommon-x11.so.0 => /usr/lib/aarch64-linux-gnu/libxkbcommon-x11.so.0 (0x0000007f7d63b000)
libfontconfig.so.1 => /usr/lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000007f7d5ee000)
libfreetype.so.6 => /usr/lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000007f7d550000)
libglib-2.0.so.0 => /lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000007f7d449000)
libX11.so.6 => /usr/lib/aarch64-linux-gnu/libX11.so.6 (0x0000007f7d321000)
libxkbcommon.so.0 => /usr/lib/aarch64-linux-gnu/libxkbcommon.so.0 (0x0000007f7d2d6000)
libQt5DBus.so.5 => /usr/lib/aarch64-linux-gnu/libQt5DBus.so.5 (0x0000007f7d249000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f7d21d000)
/lib/ld-linux-aarch64.so.1 (0x0000005566793000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f7d171000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f7d150000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f7d138000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f7d125000)
libXext.so.6 => /usr/lib/aarch64-linux-gnu/libXext.so.6 (0x0000007f7d105000)
libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000007f7d0ef000)
libXau.so.6 => /usr/lib/aarch64-linux-gnu/libXau.so.6 (0x0000007f7d0dc000)
libXdmcp.so.6 => /usr/lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000007f7d0c6000)
libxcb-util.so.1 => /usr/lib/aarch64-linux-gnu/libxcb-util.so.1 (0x0000007f7d0b0000)
libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000007f7d07b000)
libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f7d054000)
libpng12.so.0 => /lib/aarch64-linux-gnu/libpng12.so.0 (0x0000007f7d025000)
libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000007f7cfb3000)
undefined symbol: _ZN20QPlatformIntegration16openGLModuleTypeEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK21QPlatformBackingStore9toTextureERK7QRegionP5QSizeP6QFlagsINS_11TextureFlagEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK14QPlatformTheme14fileIconPixmapERK9QFileInfoRK6QSizeF6QFlagsINS_10IconOptionEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZTI20QEventDispatcherGlib (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16hasPendingEventsEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib22registerSocketNotifierEP15QSocketNotifier (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib24unregisterSocketNotifierEP15QSocketNotifier (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib13registerTimerEiiN2Qt9TimerTypeEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib15unregisterTimerEi (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16unregisterTimersEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK20QEventDispatcherGlib16registeredTimersEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib13remainingTimeEi (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib6wakeUpEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib9interruptEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib5flushEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16staticMetaObjectE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherUNIX6selectEiP6fd_setS1_S1_P8timespec (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK14QOpenGLContext6screenEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QPlatformIntegration16openGLModuleTypeEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN10QBasicDrag4moveEPK11QMouseEvent (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN10QBasicDrag4dropEPK11QMouseEvent (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface21handleWindowActivatedEP7QWindowN2Qt11FocusReasonE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface17handleExposeEventEP7QWindowRK7QRegion (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface16handleMouseEventEP7QWindowmRK7QPointFS4_6QFlagsIN2Qt11MouseButtonEES5_INS6_16KeyboardModifierEENS6_16MouseEventSourceE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface16handleLeaveEventEP7QWindow (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: ZN22QWindowSystemInterface16handleEnterEventEP7QWindowRK7QPointFS4 (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface24handleWindowStateChangedEP7QWindowN2Qt11WindowStateE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: ZN22QWindowSystemInterface20handleGeometryChangeEP7QWindowRK5QRectS4 (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN21QPlatformBackingStore15composeAndFlushEP7QWindowRK7QRegionRK6QPointP20QPlatformTextureListP14QOpenGLContextb (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK21QPlatformBackingStore9toTextureERK7QRegionP5QSizeP6QFlagsINS_11TextureFlagEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface16handleWheelEventEP7QWindowmRK7QPointFS4_6QPointS5_6QFlagsIN2Qt16KeyboardModifierEENS7_11ScrollPhaseENS7_16MouseEventSourceE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN22QWindowSystemInterface16handleTouchEventEP7QWindowmP12QTouchDeviceRK5QListINS_10TouchPointEE6QFlagsIN2Qt16KeyboardModifierEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16versionSupportedEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN27QEventDispatcherGlibPrivateC2EP13_GMainContext (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlibC2ER27QEventDispatcherGlibPrivateP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlibD2Ev (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK14QPlatformTheme14fileIconPixmapERK9QFileInfoRK6QSizeF6QFlagsINS_10IconOptionEE (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib11qt_metacastEPKc (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib11qt_metacallEN11QMetaObject4CallEiPPv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16hasPendingEventsEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib22registerSocketNotifierEP15QSocketNotifier (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib24unregisterSocketNotifierEP15QSocketNotifier (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib13registerTimerEiiN2Qt9TimerTypeEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib15unregisterTimerEi (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib16unregisterTimersEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK20QEventDispatcherGlib16registeredTimersEP7QObject (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib13remainingTimeEi (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib6wakeUpEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib9interruptEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherGlib5flushEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZNK21QPlatformFontDatabase28subpixelAntialiasingTypeHintEv (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)
undefined symbol: _ZN20QEventDispatcherUNIX6selectEiP6fd_setS1_S1_P8timespec (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5)

Presenting so file content yields that it’s true:

nvidia@nvidia:~$ nm -D /usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5|grep register
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
U _ZN13QDBusMetaType25registerMarshallOperatorsEiPFvR13QDBusArgumentPKvEPFvRKS0_PvE
U _ZN15QDBusConnection14registerObjectERK7QStringP7QObject6QFlagsINS_14RegisterOptionEE
U _ZN15QDBusConnection15registerServiceERK7QString
U _ZN15QDBusConnection16unregisterObjectERK7QStringNS_14UnregisterModeE
U _ZN15QDBusConnection17unregisterServiceERK7QString
U _ZN15QDBusConnection21registerVirtualObjectERK7QStringP18QDBusVirtualObjectNS_27VirtualObjectRegisterOptionE
U _ZN20QEventDispatcherGlib13registerTimerEiiN2Qt9TimerTypeEP7QObject
U _ZN20QEventDispatcherGlib15unregisterTimerEi
U _ZN20QEventDispatcherGlib16unregisterTimersEP7QObject
U _ZN20QEventDispatcherGlib22registerSocketNotifierEP15QSocketNotifier
U _ZN20QEventDispatcherGlib24unregisterSocketNotifierEP15QSocketNotifier
U _ZN20QEventDispatcherUNIX13registerTimerEiiN2Qt9TimerTypeEP7QObject
U _ZN20QEventDispatcherUNIX15unregisterTimerEi
U _ZN20QEventDispatcherUNIX16unregisterTimersEP7QObject
U _ZN20QEventDispatcherUNIX22registerSocketNotifierEP15QSocketNotifier
U _ZN20QEventDispatcherUNIX24unregisterSocketNotifierEP15QSocketNotifier
U _ZN21QPlatformFontDatabase12registerFontERK7QStringS2_S2_N5QFont6WeightENS3_5StyleENS3_7StretchEbbibRK24QSupportedWritingSystemsPv
U ZN21QPlatformFontDatabase25registerAliasToFontFamilyERK7QStringS2
U _ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice
U _ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject
U _ZN9QMetaType25registerConverterFunctionEPKN9QtPrivate25AbstractConverterFunctionEii
U _ZN9QMetaType25registerNormalizedTypedefERK10QByteArrayi
U _ZN9QMetaType27unregisterConverterFunctionEii
U _ZNK20QEventDispatcherGlib16registeredTimersEP7QObject
U _ZNK20QEventDispatcherUNIX16registeredTimersEP7QObject

Since all involved libs are inherent part of PX2 environment which includes QT version 5.5, and since the involved functions are older than version 5.5, I really wonder what may be the reason for this problem.

Does anyone can help?

Once running my test application with QT debug information, I get the following info.
I really wonder why there is an undefined symbol. If it’s a reason of using the original QT5.5 XCB’s .so files (libqxcb.so and libQt5XcbQpa.so), I wonder how I can force the QT builder’s configuration to build those binaries as well.

nvidia@nvidia:~$ QT_DEBUG_PLUGINS=1 ./test
QFactoryLoader::QFactoryLoader() checking directory path “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms” …
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“eglfs”
]
},
“className”: “QEglFSIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“eglfs”)
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“linuxfb”
]
},
“className”: “QLinuxFbIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“linuxfb”)
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimal.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“minimal”
]
},
“className”: “QMinimalIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“minimal”)
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“minimalegl”
]
},
“className”: “QMinimalEglIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“minimalegl”)
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“offscreen”
]
},
“className”: “QOffscreenIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“offscreen”)
QFactoryLoader::QFactoryLoader() looking at “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so”
Found metadata in lib /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“xcb”
]
},
“className”: “QXcbIntegrationPlugin”,
“debug”: false,
“version”: 328961
}

Got keys from plugin meta data (“xcb”)
QFactoryLoader::QFactoryLoader() checking directory path “/home/nvidia” …
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/config.status”
QElfParser: ‘/home/nvidia/config.status’ is not an ELF object
“’/home/nvidia/config.status’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/examples.desktop”
QElfParser: ‘/home/nvidia/examples.desktop’ is not an ELF object
“’/home/nvidia/examples.desktop’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5Core.so.5.old”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5Core.so.5.old’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5DBus.so.5.9.0”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5DBus.so.5.9.0’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5Gui.so.5.old”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5Gui.so.5.old’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5Widgets.so.5.old”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5Widgets.so.5.old’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5XcbQpa.so.5.9.0”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5XcbQpa.so.5.9.0’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/libQt5XcbQpa.so.5.9.1”
“Failed to extract plugin meta data from ‘/home/nvidia/libQt5XcbQpa.so.5.9.1’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/nm.log”
QElfParser: ‘/home/nvidia/nm.log’ is not an ELF object
“’/home/nvidia/nm.log’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/NVIDIA_Vibrante_4.1_for_Linux_DPX_References.zip”
QElfParser: ‘/home/nvidia/NVIDIA_Vibrante_4.1_for_Linux_DPX_References.zip’ is not an ELF object
“’/home/nvidia/NVIDIA_Vibrante_4.1_for_Linux_DPX_References.zip’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/recorder-config.json”
QElfParser: ‘/home/nvidia/recorder-config.json’ is not an ELF object
“’/home/nvidia/recorder-config.json’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/sample”
“Failed to extract plugin meta data from ‘/home/nvidia/sample’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/setQtVer.sh”
QElfParser: ‘/home/nvidia/setQtVer.sh’ is not an ELF object
“’/home/nvidia/setQtVer.sh’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/so.txt”
QElfParser: ‘/home/nvidia/so.txt’ is not an ELF object
“’/home/nvidia/so.txt’ is not an ELF object”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/test”
“Failed to extract plugin meta data from ‘/home/nvidia/test’”
not a plugin
QFactoryLoader::QFactoryLoader() looking at “/home/nvidia/test.old”
“Failed to extract plugin meta data from ‘/home/nvidia/test.old’”
not a plugin
Cannot load library /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN20QPlatformIntegration16openGLModuleTypeEv)
QLibraryPrivate::loadPlugin failed on “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so” : “Cannot load library /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN20QPlatformIntegration16openGLModuleTypeEv)”
QFactoryLoader::QFactoryLoader() checking directory path “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/platforms” …
QFactoryLoader::QFactoryLoader() checking directory path “/home/nvidia/platforms” …
This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms”.

Available platform plugins are: eglfs (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms), linuxfb (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms), minimal (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms), minimalegl (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms), offscreen (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms), xcb (from /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms).

Reinstalling the application may fix this problem.
Aborted (core dumped)

Dear zvika.galant

We don’t specifically install/support Qt in the PDK, what’s there are default installs from the Ubuntu Xenial RFS.
Maybe you should try the standard mechanism of using “ldd” to see what libraries are missing, may need to apt-get install them. Thanks.

Thanks, Steve.
As far as I (and you, as well) can see, the problem is not missing libraries (that may be installed) but missing symbols in existing libraries (libqxcb.so & libQt5XcbQpa.so).
I wonder why is that and if there is a way I can remake those libraries specifically for PX2 and fix this problem.

Can you please, at least, let me know how you created the 2 files mentioned above?

Dear zvika.galant,

Could you file a bug for this symptom? Thanks.

Dear zvika.galant,

Have you solved the problem?

It seems there is no suitable platform plugins for Qt to display.

Looks like I succeeded to compile QT including required plugins (especially xcb) so it looks OK right now.
Thanks for trying to help.

Good job.

Actually I just have the experience of compiling Qt for Arm, like Ti-335x, Ti-47xx etc.

Now I try to compile it for PX2.

Would you like to provide me with some detailed information about the compiling process?

Such as the environments needed: host’s linux version, qt version, and other components that must be installed first? the compiling configuration?

Look forward to your favorable reply.

I have finally succeeded to cross-compile my QT-based for PX2.
However, when running it on target machine, all included text is garbaged (shows a rectangle per each viewed character), no matter what manipulation I make to the used QFont.
Any idea?
crop.jpg
crop.jpg

crop.jpg

Have you solved the problem?

I have encountered the same problem before.

In my case, the English characters can be showed in the GUI, but the Chinese characters are black rectangles.

Finally, I found the ARM-System (Target) didn’t have the font library of Chinese, like the ttf files on Windows.

So, make sure you have the font files on px2 system.

Then, try to set QT_QPA_FONTDIR to the font-file directory.

Good luck.

Done that.
Most of the missing text problems have been solved. Thanks.
However some of the text (I have no font dealing in my code at all so the default font is supposed to take place) still appears in a much bigger size as expected (comparing to Windows version of the same app).

hello everyone.

I’m trying to my QT based application on PX2 (Ubuntu 16.04).
I have cross-compiled QT version 5.8.0 on my host for PX2 target and it seems to be compiled OK,
but every-time I try to run my test application, I’ll get core dump error, the back trace is as following:

nvidia@tegra-ubuntu:~/Desktop$ gdb ./hellopx2
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “aarch64-linux-gnu”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from ./hellopx2…done.
(gdb) r
Starting program: /home/nvidia/Desktop/hellopx2
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/aarch64-linux-gnu/libthread_db.so.1”.
[New Thread 0x7fb5c071d0 (LWP 2393)]
[New Thread 0x7fb54071d0 (LWP 2394)]
[New Thread 0x7fb4c071d0 (LWP 2395)]
[New Thread 0x7fb44071d0 (LWP 2396)]
[New Thread 0x7fb3c071d0 (LWP 2397)]
[New Thread 0x7fb34071d0 (LWP 2398)]
nvrm_gpu: Bug 1781434 workaround enabled.
nvrm_gpu: Bug 1778448 workaround enabled.
[New Thread 0x7fb28ac1d0 (LWP 2399)]
[9;0]
Thread 1 “hellopx2” received signal SIGSEGV, Segmentation fault.
0x0000007fb5ee0aa4 in ?? () from /usr/lib/libnvidia-glsi.so.381.00
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0x0000007fb5ee0aa4 in ?? () from /usr/lib/libnvidia-glsi.so.381.00
#1 0x0000007fb5ed892c in ?? () from /usr/lib/libnvidia-glsi.so.381.00
#2 0x0000007fb5f63490 in ?? () from /usr/lib/libEGL.so.1
#3 0x0000007fb5f64ac0 in ?? () from /usr/lib/libEGL.so.1
#4 0x0000007fb5f65240 in ?? () from /usr/lib/libEGL.so.1
#5 0x0000007fb5f70db4 in eglBindAPI () from /usr/lib/libEGL.so.1
#6 0x0000007fb618f3a0 in QEGLStreamConvenience::initialize (this=0x437d20, dpy=0x2) at qeglstreamconvenience.cpp:76
#7 0x0000007fb6188e58 in QEglFSKmsEglDeviceIntegration::createWindow (this=0x433be0, window=0x47dc00) at qeglfskmsegldeviceintegration.cpp:218
#8 0x0000007fb62853b8 in QEglFSIntegration::createPlatformWindow (this=0x433200, window=0x47dc00) at api/qeglfsintegration.cpp:192
#9 0x0000007fb73a3534 in QWindowPrivate::create (this=0x47dc60, recursive=false) at kernel/qwindow.cpp:406
#10 0x0000007fb73a3b44 in QWindow::create (this=0x47dc00) at kernel/qwindow.cpp:584
#11 0x0000007fb7a91f2c in QWidgetPrivate::create_sys (this=0x47d980, window=0, initializeWindow=true, destroyOldWindow=true)
at kernel/qwidget.cpp:1480
#12 0x0000007fb7a9165c in QWidget::create (this=0x47c9c0, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1342
#13 0x0000007fb7a91008 in QWidgetPrivate::init (this=0x47d980, parentWidget=0x0, f=…) at kernel/qwidget.cpp:1202
#14 0x0000007fb7a9085c in QWidget::QWidget (this=0x47c9c0, dd=…, parent=0x0, f=…) at kernel/qwidget.cpp:1054
#15 0x0000007fb7acb538 in QDesktopWidget::QDesktopWidget (this=0x47c9c0) at kernel/qdesktopwidget.cpp:183
#16 0x0000007fb7a50264 in QApplication::desktop () at kernel/qapplication.cpp:2814
#17 0x0000007fb7a91d68 in QWidgetPrivate::create_sys (this=0x46c3a0, window=0, initializeWindow=true, destroyOldWindow=true)
at kernel/qwidget.cpp:1454
#18 0x0000007fb7a9165c in QWidget::create (this=0x7fffffee38, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1342
#19 0x0000007fb7aa3100 in QWidget::setVisible (this=0x7fffffee38, visible=true) at kernel/qwidget.cpp:8163
#20 0x0000007fb7aa1f58 in QWidget::show (this=0x7fffffee38) at kernel/qwidget.cpp:7766
#21 0x0000000000403478 in main (argc=1, argv=0x7fffffefc8) at …/hellopx2/main.cpp:8

My Qt cross compile configure option is :
./configure -device drive-cx -device-option VIBRANTE_SDK_TOPDIR=/home/pyliu/installer/VibrantePDK/vibrante-t186ref-linux -device-option CROSS_COMPILE=/home/pyliu/installer/VibrantePDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux- -sysroot /home/pyliu/installer/VibrantePDK/toolchains/tegra-4.9-nv/usr/sysroot -opengl es2

Does anyone have similar experience or can offer some suggestions ? Many thanks