How to install and configure Qt on uClinux for ARM7TDMI-S? - qt

First I installed, configured and compiled Qt 5.3.2 on Linux (Debian). My simple Qt-program was compiled and ran without any problems on Linux.
But it didn't work on uClinux for a processor lpc2478.
So I installed QtEmbedded-linux-4.4.0 and did the next configuration:
./configure -embedded ARM7TDMI-S -xplatform qws/linux-arm-g++ -no-webkit -no-qt3support -release
and then I did make and make install.
After that my program didn't run on uClinux arm. What did I wrong? Maybe I used a wrong compilator?

Related

QT "Could not find the Qt platform plugin "xcb" "

I installed QT-everywhere 5.15 open-source for academic reasons, but I have failed to run a program.
Firstly, I compiled the necessary source files with make and installed the QT Creator, then I selected qmake for running programs inside it. When I tried to run an example program, I encounter this error:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86-64-linux-gnu"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
The program has unexpectedly finished.
The process was ended forcefully.
Then I looked into /usr/lib/x86-64-linux-gnu for finding the xcb plugin and set LD_LIBRARY_PATH=/usr/lib/x86-64-linux-gnu, but again the same error appeared.
What should I do to solve this problem?
1. Install requirements:
sudo apt install make g++ pkg-config libgl1-mesa-dev libxcb*-dev libfontconfig1-dev libxkbcommon-x11-dev python libgtk-3-dev
python is optional for QtQuick.
libgtk-3-dev optional if you want the GTK native theme for QtWidgets.
2. Configure:
./configure -opensource -confirm-license -nomake tests -nomake examples -prefix /path/to/install/dir
3. Compile:
make -j $(nproc)
make install

No wayland-egl support detected. Cross-toolkit compatibility disabled

I tried with the example modules given from Qt. and I downloaded the qt-everywhere-opensource-src-5.9.3 tar file and extract it.
then I run the following command.
./configure -v -prefix $PWD/qtbase -commercial -nomake tests -opengl
es2 -egl
but I got these errors.
Note: Also available for Linux: linux-clang linux-icc
Note: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
ERROR: Feature 'egl' was enabled, but the pre-condition '(features.opengl || features.openvg) && (features.angle || libs.egl)' failed.
EGL related libraries installed on the system.
Qt: 5.9.3
Qt Creator: 4.4.1
OS: Ubuntu 16.04
GPU: Intel Haswell
libva: 1.7.0
VA-API: 0.39.0
You're probably missing some packages. If you want wayland, you're most likely going to need dev packages for libwayland and libwayland-egl, but I'm not sure what they're called on Ubuntu.

Undefined reference to QIconvCodec during Qt embedded make?

I'm trying to configure my Qt for Embedded Linux with a virtual framebuffer according to these instructions. From the Qt for Embedded source folder, I'm trying:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
I get the following error which prevents me from doing make install:
.obj/release-shared-emb-x86/qtextcodec.o: In function `setup()':
qtextcodec.cpp:(.text+0x23cc): undefined reference to `QIconvCodec::QIconvCodec()'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.4] Error 1
make[1]: Leaving directory `/home/cstjean/qt/src/corelib'
make: *** [sub-corelib-all-ordered] Error 2
If I do:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make -no-iconv
sudo make install -no-iconv
...This works. But when I go into QtCreator, Tools > Options > Build & Run > Qt Versions, I try to select qmake for Qt Embedded (for me it's in /home/cstjean/qt/bin/qmake) and it tells me:
Qt version is not properly installed, please run make install
I've tried googling this like crazy. There are a lot of suggestions to download various libraries, which I've tried to no avail, but perhaps I'm missing something because this is a pretty fresh installation of Ubuntu I'm using.
Thanks.
I solved this problem by installing Gnome and starting over from scratch for my Qt Embedded for Linux installation.
I googled gnome for ubuntu 12.04 and found these instructions. You'll have to see which version of Ubuntu you have and search for that of course. You can see which version you have by typing into a command line:
lsb_release -a
Once I had gnome installed, I restarted my computer and signed in using Gnome.
Then I completely uninstalled and removed all traces of Qt Embedded:
cd yourQtEmbeddedDir
sudo make uninstall
cd ..
rm -r yourQtEmbeddedDir sourceFileTarYouHadDownloaded.tar.gz
I redownloaded the source file tar for Qt Embedded for Linux (from here) and proceeded to install according to these instructions after extracting the source files from the tar:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
sudo make install
Now, if you tell QtCreator about qmake from this installation, then QtCreator will no longer complain about a bad installation! Ta da!
Note: If you're attempting to the do the Virtual Framebuffer business too, then this is not the end of the road. You need to have Qt for X11 installed as well in order to compile qvfb.
Long story short: You need Gnome if you're trying to install Qt Embedded for Linux with a Virtual Framebuffer on Ubuntu!

Error when cross compiling Qt 5.0.1 for the Raspberry Pi

I'm trying to cross compile Qt 5.0.1 (latest release at the moment) for my Raspberry Pi. My set up is as follows:
Operating System: Ubuntu 12.04 32-bit
Cross compiler: Built from crosstool-NG program, using the exact instructions found here
Raspberry Pi Operating System: Raspbian Wheezy 2013-02-09 (mounted at /mnt/raspberry-pi-rootfs)
Configure command:
./configure -no-pch -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/<myusername>/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- -sysroot /mnt/raspberry-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5-raspberry-pi -v
When I run the configure command, it always fails with the following error:
Could not determine the target architecture!
/mnt/raspberry-pi-rootfs/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
Anyone know what this means?
I have tried the latest pre-built Linaro Toolchain cross compiler from here, and Qt at least builds, but any program compiled with it causes SIGILL (illegal instruction) fault as soon as the program runs up, which I guess is because the pre-built cross compler I used is not targeting the right architecture.
Note:
I am aware cross compiling is fiendishly difficult, but I'd like to understand more about what is going on
I'm not sure what the exact cause of this message was, but I managed to sort out by using a pre-buils toolchain for the Raspberry Pi from here:
https://github.com/raspberrypi/tools

How can i Built Qt-Creator against Qt5, in Ubuntu 12.04?

I had an existing Qt4 installation on my ubuntu built using the "Software center". After that, I installed Qt5 from git using the default settings. Now, realizing that the Qt Creator version I had, was configured for Qt 4.8.1, I uninstalled it (using software center) and now i am looking for some guidance to re-build it and link against Qt5. From their blog, I have noticed that the latest version should be a part of Qt5 installation but I am unable to start it from the HUD in ubuntu, nor do i know of any command-line options to fire it up from the terminal. Thank you for your time.
Hate to just throw up a link, but this guy explains it well.. for multiple operating systems.
http://qt-project.org/wiki/Building_Qt_5_from_Git
You may refer to the Qt wiki.
An example procedure of build:
./configure -developer-build -opensource -nomake examples -nomake tests
./make
./make install
Your build target may be ARM or other platform,then you can use ./configure --help to see more configure help.

Resources