Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Building Qt 5.7.1 for QNX 6.6.0 armle-v7: (10 Items)
   
Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
I am trying to build Qt 5.7.1 for QNX 6.6.0 running atop an i.MX6q processor (armle-v7). Actually, the build itself 
succeeded, but Qt refuses to start up. Here's what I did:

I essentially followed the instructions found here:
http://wiki.qt.io/Building_Qt_for_QNX_Neutrino_OS
and here:
http://wiki.qt.io/QNX-App-development-and-deployment

I used git to check out version 5.7.1 to my Debian host system and built Qt as per the instructions in the Qt Wiki. I 
then uploaded the Qt build (the folders bin, doc, examples, include, lib, mkspecs and plugins) to the target board to 
local eMMC storage (/home/qt5, although I have tried /opt/qt/ before with the same result). I set up the envvars needed 
for Qt as follows:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/qt5/lib
export QT_PLUGIN_PATH=/home/qt5/plugins
export QML2_IMPORT_PATH=/home/qt5/qml
export QML_IMPORT_PATH=/home/qt5/imports
export QQNX_PHYSICAL_SCREEN_SIZE="217,136"
export QT_DEBUG_PLUGINS=1
export QT_QPA_PLATFORM_PLUGIN_PATH=/home/qt5/plugins
export QT_QPA_FONTDIR=/home/qt5/lib/fonts

When I try to run a Qt binary, I get the following error (see attached file for full dump):
Got keys from plugin meta data ("qnx")
QFactoryLoader::QFactoryLoader() checking directory path "/home/qt5/examples/gui/analogclock/platforms" ...
Cannot load library /home/qt5/plugins/platforms/libqqnx.so: (Library cannot be found)
QLibraryPrivate::loadPlugin failed on "/home/qt5/plugins/platforms/libqqnx.so" : "Cannot load library /home/qt5/plugins/
platforms/libqqnx.so: (Library cannot be found)"
This application failed to start because it could not find or load the Qt platform plugin "qnx"
in "/home/qt5/plugins".

Those files are, however, exactly where they are supposed to be. Running ldd on the Qt binary didn't reveal any dead 
links, either. Screen does run and the gles-gears sample binaries work with no issues.

Please help. I'm stuck and I don't know what to do.

Thanks a lot!
Attachment: Text analogclock_full_dump.txt 3.03 KB
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
The target needs additional shared objects.  Run the application with LD_DEBUG=libs (e.g., LD_DEBUG=libs analogClock).  
It'll tell you what's missing.
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
You can get "could not find or load the Qt platform plugin "qnx"" if the freetype font system in non-functional.
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
Okay guys, thanks for your help so far. The problem was indeed that the /usr/lib/libfontconfig.so and .so.1 were missing
. I added them to my build and now I Qt does start up and show something (though not always) - analogclock does show 
something (I'll attach a screenshot, I have a sneaky feeling it's missing some letters?)

In general, fonts don't show. I noticed that the folder QT_QPA_FONTDIR=/home/qt5/lib/fonts doesn't exist. Did I miss 
something during my first build? I do have two files libfreetype.so and .so.1:
# ls -la /usr/lib/libfreetype.so*
-rwxr-xr-x   1 1002      1002         390379 Feb 23  2014 /usr/lib/libfreetype.so
-rwxr-xr-x   1 1002      1002         390379 Feb 23  2014 /usr/lib/libfreetype.so.1

I also sometimes get error messages about a missing library glesv2-sc-dlls:
libs: load_object: attempt load of /usr/lib/graphics/iMX6X/glesv2-sc-dlls
libs: dlopen: Library cannot be found
libs: dlopen("glesv2-sc-dlls",1536)
Mode: LOCAL GROUP

libs: load_object: attempt load of glesv2-sc-dlls
libs: dlopen: Library cannot be found
libs: dlopen("/usr/lib/graphics/iMX6X/glesv2-sc-dlls.so",1536)
Mode: LOCAL GROUP

libs: load_object: attempt load of /usr/lib/graphics/iMX6X/glesv2-sc-dlls.so
libs: dlopen: Library cannot be found
libs: dlopen("glesv2-sc-dlls.so",1536)
Mode: LOCAL GROUP

libs: load_object: attempt load of glesv2-sc-dlls.so
libs: dlopen: Library cannot be found
libs: dlopen("/usr/lib/graphics/iMX6X/libGLSLC.so",1536)
Mode: LOCAL GROUP

Thanks a lot!
Attachment: Image analogclock.jpg 37.91 KB
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
I sent you a pdf vIa email containing more info about the QNX font system.  Let me know if you don't get it.

Regarding the screen dll errors, I haven't encountered that.  Since it only happens "sometimes", it sounds like timing.

Dennis
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
Thanks. I didn't get an email yet.

Sorry, I didn't express myself very well. The error does occur for some programs, but not for others. It does always 
occur for the qt/examples/opengl/cube/cube binary. The analogclock binary never produces such an error.
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
It sounds like the error occurs when gles2 is requjired.  Widget programs, like the clock only require gles1.  QML 
programs require gles2.

Try gles2-gears - it must work before you try QML programs!.

It "sounds like" your screen driver contains "mixed" version components.

D
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
Thanks for the pdf, I got the font system to work with Qt now. Thanks a lot!!!

I still get that weird error about the glesv2-sc-dlls failing to load... The gles2gears example runs fine, but it does 
give me the same error message. I got the Qt hellowindow example to run ok, too, but also with the same error.
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
If everything works (gles2gears, qt) then I suspect the messages are bogus - likely a bug perhaps already fixed.  You 
might try posting to the discussion at  http://community.qnx.com/sf/discussion/do/listTopics/projects.graphics/
discussion.advanced_graphics... but not sure how well that discussion is monitored.  If you post, stick to the simple 
case of the errors  with gles2grears.
Re: Building Qt 5.7.1 for QNX 6.6.0 armle-v7  
Thanks, I just created a post.

Thanks again for your help!