Solved Cross compiled Qt libs compatibility on Raspberry Pi 3
-
Hello,
I fail to grasp one thing regarding cross-compiled Qt libs. There are Qt libs in Raspbian repo, version 5.7.1, they were presumably built by the gcc from the same repo, version 6.3.0 (I don't know for sure, I just assume). At the same time, cross gcc in https://github.com/raspberrypi/tools (linaro version) is only 4.8.3.
If I build my application on my host machine used for cross-compilation, should I ship it with Qt libs which were cross-compiled on the same host too? Or is it possible to ship just application binary only, and take Qt libs from Raspbian repo?
-
Unless GCC messed something up, the binaries should be compatible.
BTW. There are newer GCCs available from Linaro.
-
@sierdzio said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
There are newer GCCs available from Linaro.
Are there any plans to incorporate them into https://github.com/raspberrypi/tools repo? Or is that repo deprecated, and fresh toolchains should be downloaded from Linaro directly?
-
@azarubkin said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
Are there any plans to incorporate them into https://github.com/raspberrypi/tools repo?
that's a question for the Raspberry Pi Foundation I guess...
-
@sierdzio said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
Unless GCC messed something up, the binaries should be compatible.
What if repo binaries were compiled with different configure options than mine? I.e. c++14, and I was building them in c++11 mode?
-
@azarubkin said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
@sierdzio said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
Unless GCC messed something up, the binaries should be compatible.
What if repo binaries were compiled with different configure options than mine? I.e. c++14, and I was building them in c++11 mode?
I don't think it matters, they should still be compatible.
Unless you compiled with more heavy flags (like Q_NO_KEYWORDS, Q_NAMESPACE etc.) which change binary footprint.
-
@Pablo-J-Rogina said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
@azarubkin said in Cross compiled Qt libs compatibility on Raspberry Pi 3:
Are there any plans to incorporate them into https://github.com/raspberrypi/tools repo?
that's a question for the Raspberry Pi Foundation I guess...
Yep, I have no idea, ask RPi foundation please (and post the reply here :)).
-
Looks like I've found some info: https://github.com/raspberrypi/tools/issues/81#issuecomment-358281044
He says there was an ABI change in GCC 5, so it looks like compatibility between 4.9.3 and 6.3.0 is not guaranteed.There's an issue in Raspberry Pi repo: https://github.com/raspberrypi/tools/issues/81. It is still open for now. While RPi foundation haven't provided an answer, a number of people have built their own toolchains, for example here: https://github.com/raspberrypi/tools/issues/81#issuecomment-541411881