Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Qt 5.3 build from Qnx : unable to run: (11 Items)
   
Qt 5.3 build from Qnx : unable to run  
Hello, 

I was working with a personnal compilation of Qt 5.3.
Then I tried Qnx's compilation... impossible to run my application (called Screen) on my imx6 board:
This application failed to start because it could not find or load the Qt platform plugin "qnx".

Here is the output of the console using QT_DEBUG_PLUGINS = 1

-----ONLINE-----
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/sdhc/graphics/opt/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqminimal.so, metadata=
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqoffscreen.so, metadata=
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so"
Found metadata in lib /mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so, metadata=
Got keys from plugin meta data ("qnx")
QFactoryLoader::QFactoryLoader() checking directory path "/dev/shmem" ...
QFactoryLoader::QFactoryLoader() looking at "/dev/shmem/inetd.pid"
QElfParser: '/dev/shmem/inetd.pid' is not an ELF object (file too small)
"'/dev/shmem/inetd.pid' is not an ELF object (file too small)"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/dev/shmem/Screen"
"Plugin verification data mismatch in '/dev/shmem/Screen'"
not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/sdhc/graphics/opt/qt5/plugins" ...
loaded library "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so"
QLibraryPrivate::loadPlugin failed on "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so" : "Cannot load library /
mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so: (Library cannot be found)"
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/dev/shmem/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/sdhc/graphics/opt/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so"
"Cannot load library /mnt/sdhc/graphics/opt/qt5/plugins/platforms/libqqnx.so: (Library cannot be found)"
not a plugin
This application failed to start because it could not find or load the Qt platform plugin "qnx".
Abort (core dumped) 
Application finished with exit code 134.

Any ideas ?
Regards,

Paul
Re: Qt 5.3 build from Qnx : unable to run  
Here is my environment variables : 

LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/font:/mnt/sdhc/rescue:/mnt/sdhc/python32/lib:/usr/lib/
graphics/iMX6X:/lib/dll:/proc/boot:/mnt/sdhc/graphics/opt/qt5/lib:/mnt/sdhc/pci
OPTIND=1
PATH=/proc/boot:/bin:/sbin:/opt/bin:/usr/sbin:/usr/bin:/mnt/sdhc/rescue:/mnt/sdhc/python32/bin:/mnt/sdhc/pci
PPID=1
PS1='$(pwd) #'
PS2='> '
PS3='#? '
PS4='+ '
PWD=/
QML2_IMPORT_PATH=/mnt/sdhc/graphics/opt/qt5/imports
QML_IMPORT_PATH=/mnt/sdhc/graphics/opt/qt5/imports
QQNX_PHYSICAL_SCREEN_SIZE=148,46
QT_PLUGIN_PATH=/mnt/sdhc/graphics/opt/qt5/plugins
QT_QPA_FONTDIR=/mnt/sdhc/graphics/opt/qt5/lib/fonts
QT_QPA_PLATFORM_PLUGIN_PATH=/mnt/sdhc/graphics/opt/qt5/plugins/platforms
QT_QWS_FONTDIR=/mnt/sdhc/graphics/opt/qt5/lib/fonts
QWS_DISPLAY=qnx
QWS_KEYBOARD=qnx
QWS_MOUSE_PROTO=qnx
RANDOM=6077
SECONDS=1205
SHELL=/bin/sh
TERM=qansi
TMOUT=0
TMPDIR=/tmp
USER=bee
_=set
bootpath=/mnt/sdhc/rescue
qpath=/mnt/sdhc/graphics/opt/qt5
Re: Qt 5.3 build from Qnx : unable to run  
What is the value of the QT_PLUGIN_PATH env var in the shell where you start the app?
Re: Qt 5.3 build from Qnx : unable to run  
The same I posted earlier : /mnt/sdhc/graphics/opt/qt5/plugins

I even tried to put it again in Qt Creator unduer Run Environment options... but nothing...
RE: Qt 5.3 build from Qnx : unable to run  
Try LD_DEBUG=libs <name of app> it will show you what libs it's trying to load. I saw the claim "plugin not found" 
because the system was not smart enough to show what really is missing (e.g. libfontconfig)

> -----Original Message-----
> From: Thilloy Paul [mailto:community-noreply@qnx.com]
> Sent: Monday, August 04, 2014 3:28 PM
> To: general-qt
> Subject: Re: Qt 5.3 build from Qnx : unable to run
> 
> The same I posted earlier : /mnt/sdhc/graphics/opt/qt5/plugins
> 
> I even tried to put it again in Qt Creator unduer Run Environment
> options... but nothing...
> 
> 
> 
> _______________________________________________
> 
> Qt General
> http://community.qnx.com/sf/go/post111293
> To cancel your subscription to this discussion, please e-mail general-
> qt-unsubscribe@community.qnx.com
Re: RE: Qt 5.3 build from Qnx : unable to run  
Good point! But this is valid only for libs loaded by QPA (the "qnx" platform plugin). libfontconfig is loaded esle 
where.
Re: Qt 5.3 build from Qnx : unable to run  
You usually do not need to set QT_QPA_PLATFORM_PLUGIN_PATH. QT_PLUGIN_PATH should be sufficient. Which SDP are you on? 
Why is all this QWS* stuff in? I greatly doubt Qt5 will work on QWS... QWS was in use before QPA came up
Re: Qt 5.3 build from Qnx : unable to run  
It is coming from Qt 4.8 on SDP 6.5

Now we're running on SDP 6.6 (without Apps and Media installed for now)
but the old env var should come from old setup...

with LD_DEBUG set to libs Screen :

libs: load_object: attempt load of libpps.so.1
libs: /proc/boot/libpps.so.1: found; real path:/proc/boot/libpps.so.1
libs: load_elf: Shared library base: 0x78000000
libs: load_elf: libpps.so.1 relro segment is now lazy mapping; 78004000-78005000
libs: load_elf: loaded lib at addr 78000000(text) 78004f00(data)
libs: object libpps.so.1 loaded; real soname: libpps.so.1 loaded from: /proc/boot/libpps.so.1
libs: load_object: attempt load of libPpsLib.so
libs: /mnt/sdhc/rescue/libPpsLib.so: found; real path:/mnt/sdhc/rescue/libPpsLib.so
libs: load_elf: Shared library base: 0x78006000
libs: load_elf: libPpsLib.so relro segment is now lazy mapping; 78008000-78009000
libs: load_elf: loaded lib at addr 78006000(text) 78008f24(data)
libs: object libPpsLib.so loaded; real soname: libPpsLib.so loaded from: /mnt/sdhc/rescue/libPpsLib.so
libs: load_object: attempt load of libRemoteDebugLib.so
libs: /mnt/sdhc/rescue/libRemoteDebugLib.so: found; real path:/mnt/sdhc/rescue/libRemoteDebugLib.so
libs: load_elf: Shared library base: 0x7800a000
libs: load_elf: libRemoteDebugLib.so relro segment is now lazy mapping; 7800d000-7800e000
libs: load_elf: loaded lib at addr 7800a000(text) 7800dcb8(data)
libs: object libRemoteDebugLib.so loaded; real soname: libRemoteDebugLib.so loaded from: /mnt/sdhc/rescue/
libRemoteDebugLib.so
libs: load_object: attempt load of libQt5Widgets.so.5
libs: /mnt/sdhc/graphics/opt/qt5/lib/libQt5Widgets.so.5: found; real path:/mnt/sdhc/graphics/opt/qt5/lib/libQt5Widgets.
so.5
libs: load_elf: Shared library base: 0x78100000
libs: load_elf: libQt5Widgets.so.5 relro segment is now lazy mapping; 785a6000-785ba000
libs: load_elf: loaded lib at addr 78100000(text) 785a6da0(data)
libs: object libQt5Widgets.so.5 loaded; real soname: libQt5Widgets.so.5 loaded from: /mnt/sdhc/graphics/opt/qt5/lib/
libQt5Widgets.so.5
libs: load_object: attempt load of libQt5Network.so.5
libs: /mnt/sdhc/graphics/opt/qt5/lib/libQt5Network.so.5: found; real path:/mnt/sdhc/graphics/opt/qt5/lib/libQt5Network.
so.5
libs: load_elf: Shared library base: 0x78600000
libs: load_elf: libQt5Network.so.5 relro segment is now lazy mapping; 78724000-78727000
libs: load_elf: loaded lib at addr 78600000(text) 7872439c(data)
libs: object libQt5Network.so.5 loaded; real soname: libQt5Network.so.5 loaded from: /mnt/sdhc/graphics/opt/qt5/lib/
libQt5Network.so.5
libs: load_object: attempt load of libsocket.so.3
libs: /proc/boot/libsocket.so.3: found; real path:/proc/boot/libsocket.so.3
libs: load_elf: Shared library base: 0x78010000
libs: load_elf: libsocket.so.3 relro segment is now lazy mapping; 7802e000-7802f000
libs: load_elf: loaded lib at addr 78010000(text) 7802e6d4(data)
libs: object libsocket.so.3 loaded; real soname: libsocket.so.3 loaded from: /proc/boot/libsocket.so.3
libs: load_object: attempt load of libQt5Sql.so.5
libs: /mnt/sdhc/graphics/opt/qt5/lib/libQt5Sql.so.5: found; real path:/mnt/sdhc/graphics/opt/qt5/lib/libQt5Sql.so.5
libs: load_elf: Shared library base: 0x78040000
libs: load_elf: libQt5Sql.so.5 relro segment is now lazy mapping; 7807b000-7807c000
libs: load_elf: loaded lib at addr 78040000(text) 7807b394(data)
libs: object libQt5Sql.so.5 loaded; real soname: libQt5Sql.so.5 loaded from: /mnt/sdhc/graphics/opt/qt5/lib/libQt5Sql.so
.5
libs: load_object: attempt load of libQt5Xml.so.5
libs: /mnt/sdhc/graphics/opt/qt5/lib/libQt5Xml.so.5: found; real path:/mnt/sdhc/graphics/opt/qt5/lib/libQt5Xml.so.5
libs: load_elf: Shared library base: 0x78080000
libs: load_elf: libQt5Xml.so.5 relro segment is now lazy mapping; 780b7000-780b8000
libs: load_elf: loaded lib at addr 78080000(text) 780b74dc(data)
libs: object libQt5Xml.so.5 loaded; real soname: libQt5Xml.so.5 loaded from:...
View Full Message
Re: Qt 5.3 build from Qnx : unable to run  
Then your build was made with fontconfig, but it is not available on the target. This is strange since you say, you do 
not use Apps&Media for now. Did you add fontconfig on your own? 
Re: Qt 5.3 build from Qnx : unable to run  
Sorry, I now read your first post more carefully. The build provided by QNX is made with Apps&Media. It is not going to 
work on a target which does not have it on board. You need to make your own build again if you do not like/need/may use 
Apps&Media.
Re: Qt 5.3 build from Qnx : unable to run  
You got it right !

libfontconfig and libfreetype were missing but after a quick copy and the copy of correct fonts it is now working great 
:) !

Fonts are much sharper, really nice.

Thank you very much for your help.
Regards