Qt - Raspberry Pi Cross build trial

I've trid to build Qt library according to the article http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi but it takes time (35 hours) to complete was faild due to configuration process stopped at error.  So that I switch to cross build trial.

Qt 5.3.1 cross compile

Just follow steps described in http://qt-project.org/wiki/RaspberryPi_Beginners_guide as following;

  1. wget http://downloads.raspberrypi.org/raspbian_latest
  2. mv raspbian_latest 2014-01-07-wheezy-raspbian.zip
  3. unzip 2014-01-07-wheezy-raspbian.zip
  4. sudo mkdir /mnt/rasp-pi-rootfs
  5. sudo mount -o loop,offset=62914560 2014-01-07-wheezy-raspbian.img /mnt/rasp-pi-rootfs
  6. cd ~/src/cross-compile-tools/
  7. sudo ./fixQualifiedLibraryPaths /mnt/rasp-pi-rootfs/ ~/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc
  8. cd ~/src/qt5/qtbase
  9. ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5pi
  10. make -j4
  11. sudo make install

This will install qmake and related tools on /usr/local/qt5pi as native x86_64 binary, and .so libraries on /mnt/rasp-pi-rootfs/usr/local/qt5pi as ARM binary.

Boost 1.55 R-Pi build on cross compiler

In addition to configuration error, compile speed on R-Pi is very slow so that I decided to move on to cross compile.  I've fond a good article for R-Pi cross development setup on amd64 debian linux and was able to follow procedure as my previous blog.

Then, I've tried to cross build Boost 1.55 that is essential library for my QtPlatz project.

After download and expanded boost_1_55_0 on newly created Debian 7.5 (amd64), and R-Pi cross compiler installed, edit a file "~/src/boost_1_55_0/tools/build/v2/user-config.jam" add following line;

using gcc : arm : arm-linux-gnueabihf-g++ ;

and then,

  1. cd ~/src/boost_1_55_0
  2. ./bootstrap.sh --prefix=/usr/local/rpi/boost-1_55
  3. ./b2 toolset=gcc-arm link=static
  4. sudo PATH=$PATH ./b2 toolset=gcc-arm link=static install

I've not tested result, but at least installed files created was looks like as expected.

English

User login