Création d'un environnement de cross compilation complet¶
apt-add-repository ppa:linaro-foundations/cross-build-tools apt-get update apt-get install xbuilder xapt haveged xbuild-chroot-setup precise /opt/chroots/precise-cross sudo sbuild-update --keygen sudo sbuild --host=armhf -d precise -c precise-amd64-sbuild
DEB_BUILD_OPTIONS=nocheck
CONFIG_SITE=/etc/dpkg-cross/cross-config.armhf
sudo dpkg --add-architecture armhf
sudo sbuild-shell precise apt-get install zlib1g-dev:armhf libx11-xcb-dev:armhf libxext-dev:armhf libfontconfig1-dev:armhf libgl1-mesa-dev:armhf libglu1-mesa-dev:armhf libdbus-glib-1-dev:armhf libavahi-glib-dev:armhf x11proto-input-dev:armhf libxinerama-dev:armhf x11proto-xinerama-dev:armhf libegl1-mesa-dev:armhf libpulse-dev:armhf cpp-4.6-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabihf gcc-4.6-arm-linux-gnueabihf libsfstdc++6-4.6-dbg-armhf-cross libstdc++6-4.6-dev-armhf-cross binutils-arm-linux-gnueabihf binutils libjpeg-dev:armhf libjpeg8-dev:armhf libcups2-dev:armhf libxrandr-dev:armhf x11proto-input-dev xserver-xorg-input-evdev-dev libdbus-glib-1-dev:armhf libavahi-glib-dev:armhf libdbusmenu-glib-dev:armhf libglib2.0-dev:armhf libavahi-common-dev:armhf libxi-dev:armhf libxinerama-dev:armhf x11proto-core-dev:armhf x11proto-xinerama-dev:armhf libphonon-dev:armhf phonon-backend-gstreamer:armhf
Et ensuite le configure marche ... jusqu'à planter sur le lancement de lrelease qui est du binaire ARMHF et donc incomprehensible par le cpu local ...
./configure -confirm-license -prefix "/opt/qt-4.8-arm" -bindir "/opt/qt-4.8-arm/bin" -libdir "/opt/qt-4.8-arm/lib/" -docdir "/opt/qt-4.8-arm/doc" -headerdir "/opt/qt-4.8-arm/qt4" -datadir "/opt/qt-4.8-arm/qt4" -plugindir "/opt/qt-4.8-arm/qt4/plugins" -importdir "/opt/qt-4.8-arm/qt4/imports" -translationdir "/opt/qt-4.8-arm/qt4/translations" -sysconfdir "/etc/xdg" -demosdir "/opt/qt-4.8-arm/demos" -examplesdir "/opt/qt-4.8-arm/examples" -opensource -fast -system-sqlite -xmlpatterns -svg -webkit -script -scripttools -no-declarative-debug -system-zlib -system-libtiff -system-libpng -system-libjpeg -optimized-qmake -dbus-linked -reduce-relocations -release -verbose -gtkstyle -system-nas-sound -openvg -lfontconfig -I/usr/include/freetype2 -qvfb -icu -no-qt3support -phonon-backend -phonon -audio-backend -multimedia -no-gtkstyle -egl -xinput -rpath -nomake demos -nomake example -continue -no-pch -xplatform linux-arm-gnueabi-g++