Forum Topic - Run Qt 5.3 App on QNX 6.6 target: Page 2 of 2 (38 Items)
   
RE: Run Qt 5.3 App on QNX 6.6 target  
A "standard layout" with tons of unknown components isn't a great workaround for lack of documentation. A list of what's
 required - libs, binaries, enviroment variables, fonts, would be totally sufficient. Embedded designers need to 
understand what their system actually consists of. "Standard layouts" are the source of most security vulnerabilities in
 other OSs, let alone bloated memory requirements and slow boot times. 

> -----Original Message-----
> From: Vladimir Minenko [mailto:community-noreply@qnx.com]
> Sent: Thursday, July 24, 2014 4:29 PM
> To: general-qt
> Subject: Re: Run Qt 5.3 App on QNX 6.6 target
> 
> There should be no need for moving fonts back and forth, when Qt is
> configured to use fontconfig and the "QNX target" has a "standard
> layout".
> 
> Generally, the problem is that there is no standard for QNX targets:
> people do their own OS images and get surprised that things stop
> working. Some people see this as an advantage of flexibility, but for
> complex frameworks with tons of equations on the table, like Qt, this
> advantage can quickly become a nightmare. The length of this thread is
> another sign for this. QNX should start standardizing the content and
> configuration of OS images for selected application cases. IMHO, this
> should include a list of OS components and services required for a given
> framework (here Qt) to run it as expected. This issue has already been
> addressed in QNX.
> 
> In particular, the recent release of Qt 5.3.0 installers provided here
> was explicitly saying that it can be used for "Qt applications for the
> QNX SDP 6.6 OS and Apps & Media 1.0 software releases". Unfortunately,
> it is did not mention this also includes a certain target OS image which
> is provided as "sample" in Apps & Media 1.0. Qt in that and in any other
> binary build in the future is not guaranteed to work on any target, just
> on those which are close to the one provided in Apps & Media 1.0.
> Anything more generic is just technically not possible...
> 
> 
> 
> _______________________________________________
> 
> Qt General
> http://community.qnx.com/sf/go/post111207
> To cancel your subscription to this discussion, please e-mail general-
> qt-unsubscribe@community.qnx.com
Re: RE: Run Qt 5.3 App on QNX 6.6 target  
This is what I meant with "IMHO, this should include a list of OS components and services required for a given framework
 (here Qt) to run it as expected". Still, IMHO, standard (or "reference") OS images are definitely required. Otherwise, 
I do not know how to develop and test a 400MB source code package with a very limited number of people...
Re: Run Qt 5.3 App on QNX 6.6 target  
We have to bear in mind that not all Fonts are under Free License usage!
Qt Creator lists all fonts under "c:Windows/Fonts" directory, but majority of them are licensed to use with Windows 
distribution.
As Dennis pointed Dejavu is one that works fine and actually this is the Font provided with Qt distribution. Dejavu 
familiy of fonts is under Free License! And you will not find it under Windows/Fonts directory. 
So I think the rule is:- 
1) Select a font for particular application. If it is not under Free License, purchase a license for it.
2) Deploy the font to the target, or make it embedded as Resource into Qt application.
Re: Run Qt 5.3 App on QNX 6.6 target  
Sorry to jam this thread...perhaps should I open a new one ?

I put QT_DEBUG_PLUGINS to 1  I got : 

-----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() looking at "/dev/shmem/Screen.core"
QElfParser: '/dev/shmem/Screen.core' is an invalid ELF object (shstrtab section header seems to be at 0)
"'/dev/shmem/Screen.core' is an invalid ELF object (shstrtab section header seems to be at 0)"
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".
Re: Run Qt 5.3 App on QNX 6.6 target  
You have more errors than me but there is same error as mine. Good to know it's not only my problem. :)
Re: Run Qt 5.3 App on QNX 6.6 target  
If I set QT_DEBUG_PLUGINS=1 output is below.

56: Found metadata in lib /opt/qt5/plugins/platforms/libqqnx.so, metadata= ...
...
75: loaded library "/opt/qt5/plugins/platforms/libqqnx.so"
...
78: QLibraryPrivate::loadPlugin failed on "/opt/qt5/plugins/platforms/libqqnx.so" : "Cannot load library /opt/qt5/
plugins/platforms/libqqnx.so: (Library cannot be found)"

As output message, looks like some modules found libqqnx.so but QLibraryPrivate didn't.
I'll post additional info if I figure out more about that.
Any help would be appreciated.


<Full output log>

slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QFactoryLoader::QFactoryLoader() checking directory path "/root/qt5test/platforms" ...
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt5/plugins/platforms" ...
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QFactoryLoader::QFactoryLoader() looking at "/opt/qt5/plugins/platforms/libqminimal.so"
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Found metadata in lib /opt/qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 328449
}


slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Got keys from plugin meta data ("minimal")
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QFactoryLoader::QFactoryLoader() looking at "/opt/qt5/plugins/platforms/libqoffscreen.so"
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Found metadata in lib /opt/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 328449
}


slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Got keys from plugin meta data ("offscreen")
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QFactoryLoader::QFactoryLoader() looking at "/opt/qt5/plugins/platforms/libqqnx.so"
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Found metadata in lib /opt/qt5/plugins/platforms/libqqnx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2",
    "MetaData": {
        "Keys": [
            "qnx"
        ]
    },
    "className": "QQnxIntegrationPlugin",
    "debug": false,
    "version": 328449
}


slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
Got keys from plugin meta data ("qnx")
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
loaded library "/opt/qt5/plugins/platforms/libqqnx.so"
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2 buffer!
QLibraryPrivate::loadPlugin failed on "/opt/qt5/plugins/platforms/libqqnx.so" : "Cannot load library /opt/qt5/plugins/
platforms/libqqnx.so: (Library cannot be found)"
slog2_api: cannot connect to slogger2 server...errno=No such file or directory
Error registering slogger2...
View Full Message
Re: Run Qt 5.3 App on QNX 6.6 target  
Please ignore error about slogger2.
BTW, there is no way to edit my post?
Re: Run Qt 5.3 App on QNX 6.6 target  
Does your envirnoment include..

    QT_PLUGIN_PATH=/opt/qt5/plugins

...assuming you are installed at /opt/qt5.

Also LD_LIBRARY_PATH must include "/opt/qt5/lib"
Re: Run Qt 5.3 App on QNX 6.6 target  
I'm who have started this thread. I posted my environment variables in first article and it has exact same environment 
variable you mentioned. Thanks for advice.
Re: Run Qt 5.3 App on QNX 6.6 target  
A working screen/Qt5 VMware image is available at the link below.  If you are building for x86, perhaps you can compare 
it with what you have?

Document
 https://drive.google.com/file/d/0B-H5B16bdCbvNGx1bU5XcWFaWkE/edit?usp=sharing

Virtual machine
https://drive.google.com/file/d/0B-H5B16bdCbvb3ZMVXZkNlNDTmc/edit?usp=sharing

IDE workspace for the ifs
https://drive.google.com/file/d/0B-H5B16bdCbveHpHQnhsZ1NhODA/edit?usp=sharing





Re: Run Qt 5.3 App on QNX 6.6 target  
Thanks! I'll find out what's different.
Re: Run Qt 5.3 App on QNX 6.6 target  
I ran my 'helloqt' application on the given Vmware image.
It displayed a window properly and that means my 'helloqt' has no problem.
The Vmware image also has Qt binaries in 'opt/qt5' so I've copied Qt 5.3 binaries(entire /opt/qt5 directory) to my QNX 
target for checking my Qt binaries causes the problem but result is same.
In summary, test program, Qt binaries and QNX screen are good. So the Qt environment of my QNX target might be something
 wrong.
I'm looking at it but no luck yet. :(
Thanks for the advice.
Re: Run Qt 5.3 App on QNX 6.6 target  
Solution found:

http://community.qnx.com/sf/discussion/do/listPosts/projects.qt/discussion.general.topc25558

Qt I installed was made with fontconfig but my QNX target system doesn't have one.

Download and install fontconfig patch from here:
http://community.qnx.com/sf/frs/do/viewRelease/projects.qt/frs.binpkg.qt_5_3_0_development_environment

and copied libfontconfig.so libfontconfig.so.1 from <qnx660>/target/qnx6/x86/usr/lib/ of tha host(linux) to /usr/lib.