Details
-
Sub-task
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
Embedded Linux
Description
Cross compilation in general:
- There are reported problems on cross compiling Qt. There is not a lot of information on how to do this, because it's a difficult process to explain because it varies so much from platform to platform.
- One of the problems frequently seen is that customers are not using pkg-config with their tool chains.
Cross compiling Qt with pkg-config makes everything easy.
Environmental variables can be set like this:
export ARM_STAGING_PATH=/opt/armv7a/staging/
export ARM_TOOLCHAIN_PATH=/opt/armv7a/toolchain/
export PKG_CONFIG_SYSROOT=$ARMSTAGINGPATH
export PKG_CONFIG_PATH=$PKG_CONFIG_SYSROOT/usr/lib/pkgconfig
export PATH=$ARM_TOOLCHAIN_PATH/bin/:$PATH
pkg-config does everything just like when building on X11 without all the -I/usr/mylib/'s and QMAKE_LIBDIR defines
Deployment:
- Deployment of the Qt Libraries to an embedded device is difficult because of all the absolute paths in Qt defined by the configure script (-prefix)
- A problem is that you typically cross-compile Qt for embedded Linux and when you call wherever you set the -prefix on the host machine, it's probably going to be different on the device.
Example:
./configure -prefix /mnt/nfs/usr/local/ ...
On actual device Qt would be installed:
/usr/local/lib/
but the Qt Libraries and configuration files still assume:
/mnt/nfs/usr/local/
and you will have much trouble getting Qt to work.
Old Compilers + Old Versions of Qt:
- Many hardware manufactures distribute very old (pre GCC 3.4) compilers/tool chains with their hardware, and then try despite not being supported to compile Qt with them.
- Encourage Embedded Linux customers to use new versions of Qt., as newer versions do not require the heavy hacking, are more stable, and faster than the versions they are using. Many try to get away with using the oldest versions of Qt they can., as newer versions do not require the heavy hacking, are more stable, and faster than the versions they are using.
- Also customers tend to have problems using Webkit with old versions