Skip to content

Cross compilation

Fanda Vacek edited this page May 2, 2018 · 3 revisions

Cross compilation

Build Qt

  1. download Linaro toolchain
  2. clone Qt
  3. build Qt
../../bb/qt5/configure -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/fanda/programs/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/bbb-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /home/fanda/programs/qt5bbb -hostprefix /home/fanda/programs/qt5bbb -no-xcb -qt-zlib -no-opengl -qt-libpng -nomake examples -nomake tests -no-xkb -no-kms -no-eglfs -no-xcb -no-accessibility -no-opengl -no-gui -no-widgets -no-egl -no-openvg -no-qml-debug -no-openssl -no-icu -no-iconv -v -skip qtwebchannel -skip websockets -skip qtcanvas3d -skip qtgamepad -skip qtpurchasing -skip qtwebview -skip qtwebengine -skip qtscxml -skip qtremoteobjects -skip qtdeclarative -skip qt3d -skip qtscript

Gotchas

  • call configure script in qt directory if you want to compile all the modules, call it in qtbase directory, if you want do buil just base Qt libraries
  • make install copies qt libraries to / dir
  • modules libraries are not copied from modules subdirs without make install
  • out-of-source build is possible
  • call ./configure ... -skip <module-name> to exclude faulty module from build see: http://doc.qt.io/qt-5/configure-options.html#excluding-qt-modules then make again
  • all the checked out modules are build by default when qt is configured