Qt build for Raspberry Pi 3 on Windows 10 using mingw32, gcc and raspberry-gcc6.3.0-r3 fails
-
It looks like the libs get loaded but there is something wrong with libQt5Core.
gdb qtdiag GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git Copyright (C) 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 "arm-linux-gnueabihf". 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 qtdiag...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/qt5/bin/qtdiag [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". Program received signal SIGILL, Illegal instruction. 0xb610cb30 in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsign ed char const*) () from /usr/local/qt5/lib/libQt5Core.so.5
-
It looks like the libs get loaded but there is something wrong with libQt5Core.
gdb qtdiag GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git Copyright (C) 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 "arm-linux-gnueabihf". 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 qtdiag...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/qt5/bin/qtdiag [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". Program received signal SIGILL, Illegal instruction. 0xb610cb30 in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsign ed char const*) () from /usr/local/qt5/lib/libQt5Core.so.5
The only idea Ihave at the time being would be to create a simple console app based on the creator template and do also a simple hello world output. This would be very basic again, but also involve a minimum Qt.
When it fails too, there is something fundamental with Qt cross-compile.
As explained before, all this is outside of my experience. I am trying to get someone else interested to have a look here.
-
-
@koahnig
So I managed to compile qtBase, but now it seems that dependencies are missing. I was trying to run
./examples/gui/analogclock/analogclock
, this is the error message I get:qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I tried the following:
export QT_QPA_PLATFORM=eglfs export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/qt5/plugins/platforms export LD_LIBRARY_PATH=/usr/local/qt5/lib sudo ldconfig
-
@koahnig
So I managed to compile qtBase, but now it seems that dependencies are missing. I was trying to run
./examples/gui/analogclock/analogclock
, this is the error message I get:qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I tried the following:
export QT_QPA_PLATFORM=eglfs export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/qt5/plugins/platforms export LD_LIBRARY_PATH=/usr/local/qt5/lib sudo ldconfig
Try to compile a very basic program using Qt. Use the Qt console template fromQt creator and compile and run on RPi without any modifications. This should work IMHO.
Are you using Qt creator?
When the very basic console application does not work, you have fundamental issue there. From having no additions at all, you can implement complexity step-by-step (e.g. qDebug() and so on).
Afterwards you can worry about the additional modules required. The problem is that this might become quite tedious.
-
So I did a build using the Qt Creator and the Qt Console Application template and it worked fine.
I also tried the AnalogClock example afterwards, whit no success. There might be some issue with OpenGl or the renderer in general.
Update: I got the example running !!!!!! Yeah !!! I did a rebuild off the whole qt base without using the batch file for configuring!
-
So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.
The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:
../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
-
So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.
The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:
../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
Congrats for your progress.
You are right that the URL is strange.
I have just scanned through the source of Qt5.11.2 as shipped with a MinGW pre-built. The given text is part of c:\Qt\5.11.2\Src\qtbase\src\platformsupport\fontdatabases\freetype\qfreetypefontdatabase.cppHowever opening the URL brings up a site with that name, but it is not really what I expected. First of all it is in French and it does not hold direct information with respect to fonts.
-
So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.
The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:
../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
Some information from Qt on fondconfig https://doc.qt.io/qt-5/qt-embedded-fonts.html
Here is a Qt reference to dejavu fonts http://doc-snapshots.qt.io/qt5-5.12/qtgui-attribution-dejayvu.html
This points to https://dejavu-fonts.github.io/ which makes sense compared to the strange URL.[edit: koahnig form here]
Digging a bit deeper and checked current Qt5.12.0 source holding this:if (!dir.exists()) { qWarning("QFontDatabase: Cannot find font directory %s.\n" "Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.", qPrintable(fontpath)); return;
In up-coming release the correct link is referenced.
-
Also the source contained in today's release Qt5.11.3 has the github.io reference. Checked with MinGW pre-built.
-
Hi and welcome to devnet forum
Here is a link to the Qt documentation for cross compiling.
https://doc.qt.io/qt-5/embedded-linux.htmlFor raspberry specifically there is also https://www.raspberrypi.org/forums/viewtopic.php?t=204778