Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error when cross compiling Qt 5.0.1 for the Raspberry Pi

Error when cross compiling Qt 5.0.1 for the Raspberry Pi

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oggmonster
    wrote on last edited by
    #1

    I'm trying to cross compile Qt 5.0.1 (latest release at the moment) for my Raspberry Pi. My set up is as follows:

    Operating System: Ubuntu 12.04 32-bit

    Cross compiler: Built from crosstool-NG program, using the exact instructions "found here":http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/

    Raspberry Pi Operating System: Raspbian Wheezy 2013-02-09 (mounted at /mnt/raspberry-pi-rootfs)

    Configure command:
    @./configure -no-pch -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/<myusername>/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- -sysroot /mnt/raspberry-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5-raspberry-pi -v@

    When I run the configure command, it always fails with the following error:

    @Could not determine the target architecture!@
    @/mnt/raspberry-pi-rootfs/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory@
    

    Anyone know what this means?

    I have tried the latest pre-built Linaro Toolchain cross compiler "from here":https://wiki.linaro.org/WorkingGroups/ToolChain, and Qt at least builds, but any program compiled with it causes SIGILL (illegal instruction) fault as soon as the program runs up, which I guess is because the pre-built cross compler I used is not targeting the right architecture.

    Note:

    I am aware cross compiling is fiendishly difficult, but I'd like to understand more about what is going on.

    I have seen demonstrations of people cross compiling Qt 5 applications for Raspberry Pi, so I know it is possible, it is very frustrating to not be able to do it myself.

    Does anyone have a working setup for cross compiling Qt 5 for Raspberry Pi?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TioRoy
      wrote on last edited by
      #2

      I've used "this guide":http://qt-project.org/wiki/RaspberryPi_Beginners_guide twice with minor mistakes (mine).

      But it's working.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved