how Can i cross-compile QT for RPI with XCB plugin
-
Hello ,
currently I cross compiled a Qt app on RPi3 .
I run it normally using eglfs platform but it misses some things like a title bar , can't move or resize window . (eglfs is full screen .....)So I read in many documentation that I need :
1- a window manager
2- run the app with -platform xcb or run using wayland .I am really new in cross compilation and linux .
So this problem seem very hard to me .
I will appreciate any suggestion .
thank you -
@dziko147 Since you are talking about cross-compiling you call configure on your host machine.
You wrote that you already cross-compiled - so you should know.
Or do you misunderstand what cross-compiling means (because "I cross compiled a Qt app on RPi3" does not make sense). -
@dziko147 You should read https://wiki.qt.io/Raspberry_Pi_Beginners_Guide
-
Here is a script that I used recently to cross-compile Qt4 for rPi.
Note: yes, I said Qt4 (with a 4, not a 5).
However, the procedure would be almost identical for Qt5.
When @jsulm advises you ( @dziko147 ) to run
configure
, theconfigure
being spoken of would be theconfigure
script that is provided with the Qt source code at the root of a Qt sources directory. Concretely, this maps toconfigure
being called in the above script at line 63 (see here).The output of configure will produce a summary like so:
Building on: qws/linux-x86_64-g++ Building for: qws/linux-arm-g++ Architecture: arm Host architecture: x86_64 Build ............... libs Configuration ....... cross_compile release shared dll embedded largefile stl precompile_header exceptions_off accessibility minimal-config small-config medium-config large-config full-config embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify png gif freetype zlib svg release Debug ............... no Qt 3 compatibility .. no QtDBus module ....... no QtXmlPatterns module no Phonon module ....... no SVG module .......... yes WebKit module ....... no %MNG support ......... plugin (qt) zlib support ........ yes Embedded support .... arm Freetype2 support ... auto (yes) Graphics (qt) ....... linuxfb multiscreen Graphics (plugin) ... Decorations (qt) .... styled windows default Decorations (plugin) Keyboard driver (qt). tty Keyboard driver (plugin) Mouse driver (qt) ... pc linuxtp Mouse driver (plugin) OpenGL support ...... no OpenSSL support ..... no
This is where you would check to see if XCB shows as "enabled" or not.
@dziko147 you have said:
I am really new in cross compilation and linux . So this problem seem very hard to me .
Cross compilation is tricky, even for people who are not new to it. By the nature of cross-compilation, there are "more moving parts", because you have the build PC (probably x86_64 architecture) and the target PC (ARM for rpi).
Please be patient, and take one small step at a time.
You will need to ask very specific questions and provide clear and accurate details (what is the OS on the build PC? what version of Qt sources are you building? etc)
To echo @jsulm , I also wonder if the verb "cross-compile" is being misapplied.
You may or may not be confident in your usage of the terminology.
Just in case...
Cross-compilation means that you compile a binary by performing the compilation step on one computer, and then you copy that binary to a different computer (such as an rPi) where the binary is ultimately used.If you are performing the compilation steps on the rPi, then that is just plain old "compilation". When working with an rPi, it is possible to just perform compilation on the rPi. And it is also possible to cross-compile from a separate x86_64 build PC. Both are feasible. You may choose either. Just double-check you are using the accurate terminology.