User avatar
mline
Posts: 1245
Joined: Sun Jan 27, 2013 1:47 pm
Location: Austria, Vienna

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Wed Mar 13, 2019 4:02 pm

MikeCC wrote:
Tue Mar 12, 2019 4:48 pm
...
Hatte anfangs schon mal die 5.12 von qt.io installiert, bis ich gemerkt hatte, dass das nicht so einfach geht.
5.12 habe ich auch schon getestet. Diese Version hat allerdings noch Fehler.
Dein erstelltes qmake sollte natürlich zur Version passen die du auf dem Host installiert hast. Es ist zwar möglich mit dem neuesten QtCreator aus der 5.12 Qt Installation mit qmake 5.10 Programme zu erstellen, allerdings fehlen dann eventuell Features wenn man zunächst alles auf dem Hostsystem getestet hat.
Das mit den Cores kommt vermutlich aus der Wiki-Quelle: https://wiki.qt.io/RaspberryPi2EGLFS (Suchbegriff "-jn").
Das erklärt einiges.

Übrigens habe ich das Tutorial für buildroot erstmal veröffentlicht. Ist noch nicht ganz fertig (erstelle den aktuellen build selbst gerade noch) und die Konfiguration von QtCreator fehlt noch... aber das funktioniert genau so wie hier also solltest du wissen was zu tun ist ;)
<~~>

sajeevank
Posts: 2
Joined: Mon Feb 25, 2019 11:25 am

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Mon Mar 25, 2019 8:16 am

Hi Mline,


Thank You for the detailed step by step by way of making a cross compile qmake for RPI in an Ubuntu Host system. I could have a qmake with Qt Multi Media options - gstreamer 1.0, ALSA and Pulse Audio enabled, by following this procedure, after several failures by doing in other ways.


Qt Multimedia:
ALSA ................................... yes
GStreamer 1.0 .......................... yes
GStreamer 0.10 ......................... no
Video for Linux ........................ yes
OpenAL ................................. no
PulseAudio ............................. yes
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. no
Windows Media Foundation ............... no

Also I could solve the problem - libicui18n.so.57: undefined reference to `[email protected]_1.3.8' - from the same thread.

There is one error message coming in Qt Crfeator when I am compiling an Application:
/opt/qt5pi/sysroot/usr/local/qt5pi/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
Project ERROR: Library '' is not defined.

I just neglected this and copied the application binary from host to RPI with scp command


But now I am facing a problem with QCamera Application example in qt.

Displaying the video is working fine, with sufficient speed.

When I start recording using Q Media Recorder::record(), it is showing error:

AL lib: (EE) ALCcaptureAlsa_open: Could not open capture device 'default': No such file or directory
CameraBin error: "Could not open device."
CameraBin error: "Internal data stream error."

** (simpleCamera:1361): CRITICAL **: No headers or buffers on pad muxer:audio_1630632675

ALSA is already enabled with qmake. But still it is showing some error regarding ALSA. Is there any work around to solve this problem?

Thanks & Regards,
Sajeevan.K

firemarc
Posts: 1
Joined: Wed May 01, 2019 10:53 pm

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Wed May 01, 2019 10:59 pm

Hello,

I follow the tutorial but i've one error when i compile and send to my raspberry pi.

"00:51:10: Starting /home/pi/Cheval/bin/Cheval ...
SSH is enabled and the default password for the 'pi' user has not been changed.

/home/pi/Cheval/bin/Cheval: error while loading shared libraries: libphidget22.so.0: cannot open shared object file: No such file or directory
00:51:12: Application finished with exit code 127."

For information the library "libphidget22.so" its a library that i installed for my project.

Do anybody know what is the solution ? Thanks a lot.

Meins321
Posts: 2
Joined: Thu May 16, 2019 11:43 am

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Thu May 16, 2019 11:50 am

@Mline

make fails for me, it says on my ubuntu mate that it has no target:
cd /opt/qt5pi
sudo su
make 2>&1 | tee ../make.log
*fail*
make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.

make install 2>&1 | tee ../make_install.log
*fail*
make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.

am i doing it wrong?

what i used for compiling is:
../qt-everywhere-src-5.12.3/configure -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -no-gbm -skip qtscript -nomake tests -nomake examples -make libs -pkg-config -no-use-gold-linker -v 2>&1 | tee ../configure.log

User avatar
mline
Posts: 1245
Joined: Sun Jan 27, 2013 1:47 pm
Location: Austria, Vienna

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Thu May 16, 2019 1:25 pm

firemarc wrote:
Wed May 01, 2019 10:59 pm
Hello,

I follow the tutorial but i've one error when i compile and send to my raspberry pi.

"00:51:10: Starting /home/pi/Cheval/bin/Cheval ...
SSH is enabled and the default password for the 'pi' user has not been changed.

/home/pi/Cheval/bin/Cheval: error while loading shared libraries: libphidget22.so.0: cannot open shared object file: No such file or directory
00:51:12: Application finished with exit code 127."

For information the library "libphidget22.so" its a library that i installed for my project.

Do anybody know what is the solution ? Thanks a lot.
Did you install this library on your pi? You need it on your pi and your host. Also you have to link it in the .pro file of your qt project.
https://doc.qt.io/qtcreator/creator-pro ... aries.html
Meins321 wrote:
Thu May 16, 2019 11:50 am
...
cd /opt/qt5pi
...
what i used for compiling is:
../qt-everywhere-src-5.12.3/configure ...
Thats not compiling. Thats configuring. Did you execute this configure command inside /opt/qt5pi/qt5build or /opt/qt5pi?
You have to execute the make command in exactly the same folder you execute the configure command.
<~~>

Meins321
Posts: 2
Joined: Thu May 16, 2019 11:43 am

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Fri May 17, 2019 9:30 am

@mline
Hello i just did use your script and it worked!!!

What i used:
Ubuntu Mate 18.04 Dekstop variant
Raspberry Pi 3 Modell B (non plus Model)
2019-04-08-raspbian-stretch-lite.img
Qt 5.12.3 <- Just replace all the 5.10 in batch script with 5.12 and replace all 5.10.X with 5.12.3 = the link structure is the same online for 5.12.3
Qt Creator 4.9.0

Problem 1.: Can't create project folder on raspberry pi 3
i did reconfigure the qtcreator on my laptop in the guide just creating the folder for the project on the pi fails (see picture 1 )
"Failed to create remote directories:mkdir:cannot create directory '/opt/MyFirstHelloWorld':Premission denied"

Can i change the user that logs in via ssh/Qt to a root user maybe that helps?
Maybe add a permission change to the qt upload/run process?

Problem 2: The application won't run on the latest raspbian lite does changing to full really help?
if i create the folder with root rights and mkdir and chmod 777 the application still crashes...
does anyone know which librarys i need to make it run or why it wont run?
Attachments
AppCrashes.Raspbian.JPG
AppCrashes.Raspbian.JPG (106.31 KiB) Viewed 27 times
cantcreateDirectory.Pi3.JPG
cantcreateDirectory.Pi3.JPG (59.89 KiB) Viewed 35 times

User avatar
mline
Posts: 1245
Joined: Sun Jan 27, 2013 1:47 pm
Location: Austria, Vienna

Re: TUTORIAL: Qt Crosscompile (Qt5.10.1)

Fri May 17, 2019 4:14 pm

Meins321 wrote:
Fri May 17, 2019 9:30 am
...
You did not follow my instructions exactly
<~~>

Return to “Deutsch”