Unsolved How to build Qt on system without a GUI?
-
@Pavel_47 Did you install these packages on your target device? Since you're crosscompiling you need them in your sysroot, not on your host machine.
-
I've contacted libxkbcommon developers. They suggested me using this command:
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-dev
That is what i did, but system informed me that libxkbcommon-dev and libxkbcommon-x11-dev are already the newest versions (i.e. 0.8.2-1~ubuntu 18.04.1).Well, I'm trying to rebiuild Qt toolchain once more . Now it's running ...
-
Sorry, I've missed your last suggestion - install libxkbcommon on target (i.e RPi3 in my case). But anyway, how build process on the host can be influenced by what is installed (or not) on that target device ?
-
The new attempt of Qt building is also failed.
I wonder if anyone has managed to bulid Qt on Ubuntu ?
What should I check ... or install to resolve the problem ? -
Since you are cross-compiling, you need all dependencies for your target. This is usually done installing the libraries on said target and then sync the content of the file system of the target back to the host so the cross-compiler can use them to do its work.
-
I've just checked libxkbcommon-dev and libxkbcommon-x11-dev on RPi. As on Ubuntu they are installed and are newest versions.
-
Did you sync your RPi filesystem back to your host before trying to build Qt ?
-
Yes, at very first time I executed these commands (as it's suggested here https://wiki.qt.io/RaspberryPi2EGLFS):
rsync -avz pi@raspberrypi.local:/lib sysroot
rsync -avz pi@raspberrypi.local:/usr/include sysroot/usr
rsync -avz pi@raspberrypi.local:/usr/lib sysroot/usr
rsync -avz pi@raspberrypi.local:/opt/vc sysroot/optThen I did 3 or 4 other attempts to build, but at each of these attempts I didn't proceed with resync with RPi.
Anyway one thing escapes me .... should I keep connection with RPi while running toolchain build on host ? -
@Pavel_47 said in How to build Qt on system without a GUI?:
should I keep connection with RPi while running toolchain build on host ?
No, you just need to sync your sysroot.
-
I've checked the location of xkbcommon-compose.h. It's Ok:
Then I've tried to compile this:#include <xkbcommon/xkbcommon-compose.h> int main() {}
It was also Ok
-
@Pavel_47 Is it in your host system or sysroot?
-
@jsulm said in How to build Qt on system without a GUI?:
@Pavel_47 Is it in your host system or sysroot?
Sorry, I didn't understand what you mean ...
The location of the screenshot: /usr/include/xkbcommon on my host
The location of .c snippet (where I compiled it): ~/raspi/ on my host -
@Pavel_47 said in How to build Qt on system without a GUI?:
/usr/include/xkbcommon on my host
That's the point: you need these headers in your sysroot!
-
Indeed !
In ~/raspi/sysroot/usr/include/xkbcommon there is one less file comparing to /usr/include/xkbcommon ... and this missed file is precisely xkbcommon-compose.h.So, I copy xkbcommon-compose.h from /usr/include/xkbcommon to ~/raspi/sysroot/usr/include/xkbcommon and then build Qt toolchain once more ?
-
I copied xkbcommon-compose.h from /usr/include/xkbcommon to ~/raspi/sysroot/usr/include/xkbcommon and then run make once more.
And it failed one more time.
Here is how it finished:
Any other suggestions ?
Thanks.
-
As we already wrote: you need the library too. And built for your target.
-
You mean that the errors announce in the screenshot from previous message are still related to the xkbcommon issue ?
So I should ask xkbcommon developpers for makefile dedicated for RPi3. Correct ?
Let's say I got it, what next ? Where should I put xkbcommon built directory ... i.e. which location in ~/raspi/sysroot.
After all ... I wonder if someone already faced this issue ? Or this probles rose for the 1st time ? What about previous Qt releases ? There were no similar issues ? -
It's a library that is now provided on all Linux flavours supported by the Qt project. Prior to that, it was bundled with Qt.
So what distribution are you running on your Pi ?
-
Linux raspberrypi 4.9.77-v7+
-
That's the kernel running on your target.
Are you using Raspbian ? Another distribution ?