I've been trying to get a Qt5.2 application, configured and built from source, to show up on my AM335x EVM but so far have not had luck.
I started by downloading the Qt5.2 release from here:
http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz.mirrorlist
I think extracted the .gz file to my home directory. I've also previously installed the ti-sdk-am335x-evm-06.00.00.00 to my home directory as well.
I have configured my Qt5.2 directory with the following command:
./configure -prefix /usr/Qt5.2 -xplatform linux-am335x-g++ -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -opensource -no-pch -no-xcb
Then I did a build via:
make
and installed the resultant files with "make install". I think compiled a simple "hello world" program, The program code is:
#include <QtGui>
#include <QtWidgets>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QPushButton *button = new QPushButton("Hello World");
button->show();
return app.exec();
}
And I ran:
qmake -project
Then I had to make an update to the generated helloworld.pro file to include the widgets directory:
QT += widgets
and then I ran qmake/make and was able to generate the executable. After I loaded the libraries and executable to the target I tried to run it and I saw the following output:
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen.
Reinstalling the application may fix this problem.
Aborted
I reran the application as:
./helloworld -platform linuxfb
and that time it only showed the iconv_open failures, but still nothing on the display. I still had the Matrix App Launcher (v2 p1, based on Qt4.8.3) up on the screen so I thought that might be an issue. I killed the app launcher via:
/etc/init.d/matrix-gui-2.0 stop
then tried to launch the app again, but it still failed. So I have the following questions:
1) What am I missing to get this application to show up on the display?
2) is the linuxfb the correct platform plugin to launch my application with, and if so how do I make that the default?
3) Why is the application having an issue with finding the Latin-1 font and how can I resolve that?
I'm pretty sure #2 and #3 are trivial problems, #1 is my big issue.
I've tried running the application with strace, and have a log: