# POT 5.7.0 with Qt 5.10.0 built for armv8 with GCC 6.3.0 on Raspbian Stretch

This was a good test for my cross toolchain with gcc 6.3.0 I uploaded some days ago: the new Qt 5.10.0 built with -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard, including POT for video acceleration on Raspbian Stretch. The build includes most Qt modules plus Qt WebKit (the modernized QtWebKit from
Konstantin Tokarev, version 5.212, https://github.com/annulen/webkit) plus QtWebEngine 5.9.1, a bit patched to build here. I didn’t test browsers much, you’ll have to work on those yourself if you need them.

By using the Qt build and the cross toolchain you can build your own applications.

## 60 thoughts on “POT 5.7.0 with Qt 5.10.0 built for armv8 with GCC 6.3.0 on Raspbian Stretch”

1. What do you have in here /mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0?

2. AW says:

#include "…" search starts here:
#include <…> search starts here:
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../arm-linux-gnueabihf/include/c++/6.3.0
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../arm-linux-gnueabihf/include/c++/6.3.0/arm-linux-gnueabihf/.
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../arm-linux-gnueabihf/include/c++/6.3.0/backward
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/include
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/include-fixed
/mnt/hgfs/VMShared/Rpi-POT/rpi-gcc-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../arm-linux-gnueabihf/include
/opt/rpi/sysroot/usr/include/arm-linux-gnueabihf
/opt/rpi/sysroot/usr/include
End of search list.
GNU C++14 (Luca Carlon 20171108) version 6.3.0 (arm-linux-gnueabihf)
compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version 0.15
GGC heuristics: –param ggc-min-expand=100 –param ggc-min-heapsize=131072
Compiler executable checksum: d30787e86cc381972255ba135168c18d
COLLECT_GCC_OPTIONS='-v' '-march=armv8-a' '-o' 'main' '-shared-libgcc' '-mfloat-abi=hard' '-mfpu=vfp' '-mthumb' '-mtls-dialect=gnu'
as -v -march=armv8-a -mfloat-abi=hard -mfpu=vfp -meabi=5 -o /tmp/ccS0vuLA.o /tmp/ccW7xjpM.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
Assembler messages:
Fatal error: invalid -march= option: armv8-a'

3. AW says:

This comment has been removed by the author.

4. AW says:

This comment has been removed by the author.

5. Sorry, comments are somehow corrupted in some cases. #include the header stdio.h in the test source.

6. Try to create a file named main.cpp with this content:

#include
int main(int, char**) { printf("HELLO!n"); return 0; }

then run:

/opt/rpi/rpi-gcc-6.3.0/bin/arm-linux-gnueabihf-g++ -v -march=armv8-a main.cpp -o main

and paste the output.

7. AW says:

Hello, thanks for you prompt reply, and my late response as I didn't check back because I was trying hard to correct the error, here is the output:

/opt/rpi/rpi-gcc-6.3.0/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard –sysroot=/opt/rpi/sysroot -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../3rdparty/LightLogger -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtQuick -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtMultimedia -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtGui -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtQml -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtNetwork -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/include/QtCore -I. -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux -I/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/mkspecs/devices/linux-rasp-pi3-g++ -o main.o main.cpp
Assembler messages:
Fatal error: invalid -march= option: armv8-a'
Makefile:1117: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Many Thanks

8. Hello,

Thank you for your amazing work, but i am having little trouble cross-compiling your piomxtextures_pocplayer on my Ubuntu x64, here is what i did so far:

3- Synced /lib and /usr of PI to PC in /opt/rpi/sysroot
4- Git cloned your pot/ repo
5- entered pot/piomxtextures_pocplayer
6- /opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/bin/qmake
7- make

here is the problem, the make gives me:

Assembler messages:
Fatal error: invalid -march= option: `armv8-a'
Makefile:1120: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Can you please tell me what i did wrong, or missed ?

Thanks

9. Hello,
1. yes, I think it is;
2. POT renders frames through OpenGL, streaming it into the scene. This imposes a higher processing cost, but provides much more possibilities.
3. Don't know how much, but probably yes.
4. It depends on what you want to achieve. For simple use-cases there are better techniques than the one POT is using, which is instead the only chance for complex scenarios. In the past, I created different solutions with much better performance, but less flexibility. Unfortunately I never found the time to finish and publish.
5. Yes, there should be a button here: https://github.com/carlonluca/pot.
Regards.

10. N says:

Hello Luca,

Your contribution in this project is serious stuff. Thank you.
I have technical questions.
Having the following two scenarios:
1.- I've build Qt 5.12.3 and build your POT as plugin and works without errors.
2.- In other clean sd, I downloaded and installed this POT 5.7.0 with Qt 5.10.0 that you've build and works without errors.
All the above in the same raspberry pi 3 b+ with stretch.
Using your pocplayer, qmlvideo and qmlvideofx examples, I've notice that in both scenarios, a more is the quality of the video (until FHD (1080p) 30fps or even 60fps), the performance is lesser (visually noticeable some not so fluid frames), but when the video is play directly using omxplayer, the performance is great (very fluid frames).
Actually, with POT, the 1080p 60fps video in some parts appears a loading widget in the center.
The videos used to test are the big bunny h264 1080p 30fps and 60fps and other less quality videos.
My questions are:
1.- Is this supposed to happen?.
2.- No matter the case of 1. Why?.
3.- The performance can be improved?. Why and How?.
4.- Is it possible to achieve the same performance of directly using omxplayer in POT?.
5.- Do you accept donations?. If yes, how can I donate?.

Regards.

11. If you want to upgrade to 5.8 without rebuilding you should find binaries compatible with your system. No idea what answer you'd expect.
POT stands for PiOmxTextures: it is a driver to integrate Pi's accelerated decoding into Qt efficiently.

12. I'm running Qt 5.3.2 (default Pi raspbian image) but would like to use the SerialBus module introduced in Qt 5.8. Any thoughts if it's possible to upgrade to 5.8 without building from source? I only have about a gig left on the SD card and would like to just upgrade the binary modules!

Also, what does POT stand for?

13. Sorry, at the moment I'm not planning to. I have enough payed projects.

14. Hi Luca,

I have succesfully compiled Qt 5.12 and POT 5.7 with gcc 8.2, but is unstable because my player crash after few hours of work and the debbuger stops inside the gst libs.

Do you plan to work on POT with Qt 5.12 (LTS)?

Thank you,
Mattia

15. You mean qmake? All the tools are in the Qt directory.

16. ¿Where can I find a build of the Qt-host for crosscompiling with mac an linux?

17. This comment has been removed by the author.

18. Anonymous says:

You are right. I shouldn't be linking against the static library. I noted that if I remove the '-lGLESv2' from the link command, the linking works and the executable is exactly the same (same md5 hash). Thus I suppose I'm using the wrong mkspec in QtCreator. I therefor created my own mkspec based on linux-rasp-rpi3-g++ but without this flag for linking. Then it works great. Is there a way to know if the application is using hardware acceleration? Using the '-platform eglfs' flags doesn't seem to have any effect…
Thanks,
Kristof

19. I don't see why linking against the static version of GL. Using the regular GL shared library that the Qt build is using should be sufficient.

20. Anonymous says:

Hi Luca, thank you for the quick reply. I found how to enable the shared gl context in your examples. I also found the linking issue (at least a workaround). If in the linking command from above I move the '-lGLESv2' just after '-L=/opt/vc/lib' and I add a symbolic link on the rpi (sysroot) 'ln -s libGLESv2_static.a libGLESv2.a' in /opt/vc/lib, then it links and runs on the device. I'm looking for a way to pass this now to the linker via the '.pro' file.
Kristof

21. I think GLES lib is supposed to be somewhere in /opt/vc in the pi. Not sure what is that one.
As for the runtime error, just do what it says, enable shared context. Look into pocplayer or look into the Qt docs to know why. There is a flag somewhere.

22. Anonymous says:

Hi Luca,
I managed to run the piomxtextures_pocplayer on my rpi3. But when I try to cross compile a simple qml program using QtCreator I get the error 'cannot find -lGLESv2'. This is the linking command:
/opt/rpi/rpi-gcc-6.3.0/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard –sysroot=/opt/rpi/sysroot -Wl,-O1 -Wl,-rpath,/usr/local/Qt-rasp3-5.10.0/lib -Wl,-rpath-link,/opt/rpi/sysroot/opt/vc/lib -Wl,-rpath-link,/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/rpi/sysroot/lib/arm-linux-gnueabihf -o videoegltest main.o qrc_qml.o -L=/opt/vc/lib -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/ -L/usr/lib/arm-linux-gnueabihf/ -L/opt/rpi/sysroot/usr/local/Qt-rasp3-5.10.0/lib -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGLESv2 -lpthread
/opt/rpi/rpi-gcc-6.3.0/lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lGLESv2

When I do 'ls /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/ | grep GLESv2' I get
libGLESv2.so.2
libGLESv2.so.2.0.0

So it seems the library is there. Why do I get this error then?
When I remove the GLESv2 library from the makefile, linking works. But when running the executable (on rpi3) I get error "Failed to get shared context. Enable it.". How could I enable it?
Thanks!
Kristof

23. Anonymous says:

Hello Luca,
"AUDIO_OUT (I'll soon add POT_AUDIO_OUT; AUDIO out will probably remain for backward compatibility): you can use this to set the audio output to use:
hdmi means output to HDMI;
both means… well both the above;
default is HDMI."

it it works on POT version 5.7.0 ? (built by myself)
Thanks.

24. I followed RaspberryPi2EGLFS – https://wiki.qt.io/RaspberryPi2EGLFS,
It can execute piomxtextures_pocplayer,
Thanks, Luca.

sudo apt-get update
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep libqt5gui5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0

25. Qt has its own dependencies. POT needs other dependencies. I don't have a full list, you should see what the library depends on. You probably need libv4l, libpcre, libfreetype, libfontconfig, libssl, libcrypto, libssh, libsmbclient, icu, libpng, libjpeg, libasound and others.

26. @Luca
Did I misunderstand? It still CANNOT execute after Install all deps from "Native Build of Qt5 on a Raspberry Pi – http://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi&quot;

sudo apt-get update
sudo apt-get install libfontconfig1-dev libdbus-1-dev libfreetype6-dev libudev-dev libicu-dev libsqlite3-dev
libxslt1-dev libssl-dev libasound2-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev
libraspberrypi-dev libpulse-dev libx11-dev libglib2.0-dev libcups2-dev freetds-dev libsqlite0-dev libpq-dev
libiodbc2-dev libmysqlclient-dev firebird-dev libpng12-dev libjpeg9-dev libgst-dev libxext-dev libxcb1 libxcb1-dev
libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0
libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync1 libxcb-sync-dev libxcb-render-util0
libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev
libxi-dev libdrm-dev libssl-dev libxcb-xinerama0 libxcb-xinerama0-dev

27. This comment has been removed by the author.

28. The number of steps are my raspberry environment and test operations.

29. @modjo I had same issue with you, can u tell me how to solve this if it is like Luca said "So you're missing fontconfig on your pi."

1. A clean Raspberry Pi then
2. I download Qt 5.10.0 with POT 5.7 and Extract Qt-rasp3-5.10.0 to /usr/local
3. Execute the piomxtextures_pocplayer

30. I solved this problem.
I did not have libraries ffmpeg. After installation it worked for me.

31. Hi Luca! Thanks for your work!

I have problem:

Cannot load library /usr/local/qt5.8/plugins/mediaservice/libopenmaxilmediaplayer.so: (libavformat.so.57: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/usr/local/qt5.8/plugins/mediaservice/libopenmaxilmediaplayer.so" : "Cannot load library /usr/local/qt5.8/plugins/mediaservice/libopenmaxilmediaplayer.so: (libavformat.so.57: cannot open shared object file: No such file or directory)"
defaultServiceProvider::requestService(): no service found for – "org.qt-project.qt.mediaplayer"

Video does not start, only black screen.
How can I fix this error?

32. My implementation won't work in widgets. You need to use a QML scene and render the video using QML multimedia elements like VideoOutput, MediaPlayer or Video. If your app is using widgets you may experiment with a mix of the two technologies. I never tested that but it may theretically work.

33. Willem Remie says:

Our video player with QtMultimedia based on Qt Widgets doesn't work. The executable "piomxtextures_pocplayer" works like a charm and seems to be based on QtQuick based on objdump. So I would like to diff both implementations. I also tried to cross compile the "media player example" provided by Qt Creator with the same results.

34. modjo says:

Installing fontconfig didn't resolve the problem.

35. Willem Remie says:

Dear Luca,

We succeeded in using the build with cross toolchain and the accompanying pocplayer plays our .mk4 video files perfectly. However when we are trying to build our own implementation of QtMultimedia the player shows a black screen. The difference between the example you provided and our own implementation seems to have something to do with Qt5Quick and Qt5Widgets respectively. Therefore, I was wondering if you could provide the source code of the pocplayer example in order for us to compare.

36. What problem? Doesn't it work with fontconfig installed?

37. modjo says:

Thanks, done now ! For information i use raspbian stretch light. An idea about the main problem ?

38. modjo says:

pi@raspberrypi:~/PiOmxTextures_5.7.0_pi3_5.10.0 $./piomxtextures_pocplayer -platform eglfs ../M4H04419.MP4 QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-rasp3-5.10.0/plugins/platforms" … QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 330240 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 330240 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqminimal.so" Found metadata in lib /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 330240 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 330240 } …… Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqwebgl.so" Found metadata in lib /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 330240 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/PiOmxTextures_5.7.0_pi3_5.10.0/platforms" … Cannot load library /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqeglfs.so: (libfontconfig.so.1: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type) QLibraryPrivate::loadPlugin failed on "/usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqeglfs.so" : "Cannot load library /usr/local/Qt-rasp3-5.10.0/plugins/platforms/libqeglfs.so: (libfontconfig.so.1: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type)" This application failed to start because it could not find or load the Qt platform plugin "eglfs" in "". Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl. Reinstalling the application may fix this problem. 39. Export QT_DEBUG_PLUGINS=1 and paste the logs again please. 40. modjo says: Hi Lucas and thanks for your work. I have downloaded your build and extract Qt-rasp3-5.10.0 in /usr/local on my rapsberry pi 3. try to launch pi@raspberrypi:~/PiOmxTextures_5.7.0_pi3_5.10.0$ ./piomxtextures_pocplayer ../M4H04419.MP4 but i have this error :
This application failed to start because it could not find or load the Qt platform plugin "eglfs"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl.

Reinstalling the application may fix this problem.
Abandon

Probably an error with PATH or LD_LIBRARY_PATH (for me LD_LIBRARY_PATH=/usr/local/Qt-rasp3-5.10.0/lib
)

Can you help how to resolve this please ?

41. The libs have an rpath set. You should see the proper paths using qmake -query. The root must be in /usr/local. If instead you want to use another location then you should setup your env appropriately with any of the regular techniques.

42. Anonymous says:

Can you please explain how to install the Qt built and the toolchain? I unpacked the Qt build in /opt and updated the PATH variable. However, when running the examples the executable fails to find the libraries? I assume the toolchain requires the same method?

43. many thanks ,
and we will wait for your new works

44. I'm sorry but at the moment I don't have an image ready to be released.

45. You can try with a debugger. Unfortunately webengine in 5.10 needs a few patches to build for the pi. Does not seem to be mantained.

46. could you upload the full image of raspbian stretch with qt5.10

47. I ready built a robust app by qt/qml/c++ on your previous version ( qt 5.8 + raspbian jessie lite)
now I need to use you r version with Qt5.10 (because it support "stl" files in 3d mesh)

now I set Url it start and give red screen and no webpage appear then close after about 10 sec

messages from start to end:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QML QtWebEngine…
InitializeGLOneOffImplementation
[1018:1041:0114/213636.169168:ERROR:service_manager.cc(539)] Instance: content_packaged_services attempting to register an instance for a process it created for target: content_browser without the service_manager{client_process} capability class.
GLSurfaceQtEGL::InitializeOneOff okSuccessfully initialized!
Ok! Initialized!
root@raspberrypi:/home/pi#

48. hi
after test all qml works and qt works very nice
but your web_test is gice this error
./PiOmxTextures_5.7.0_pi3_5.10.0/piomxtextures_browser_we

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QML QtWebEngine…
InitializeGLOneOffImplementation
[7780:7803:0114/115849.909577:ERROR:service_manager.cc(539)] Instance: content_packaged_services attempting to register an instance for a process it created for target: content_browser without the service_manager{client_process} capability class.
GLSurfaceQtEGL::InitializeOneOff okSuccessfully initialized!
Ok! Initialized!