Cross Compile Qt for RPI on OSX



  • Hello,
    I was trying to cross compile qt to use with RPI on OSX but I can't do ./configure as said on the tutorial: http://wiki.qt.io/RaspberryPi2EGLFS

    Joses-MacBook-Pro:qtbase ze$ ./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
    
    This is the Qt Open Source Edition.
    
    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.
    
    You have already accepted the terms of the Open Source license.
    
    ./configure: line 3416: /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    Precompiled-headers support disabled.
    /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
    /Users/ze/raspi/qtbase/config.tests/unix/fvisibility.test: line 29: /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    Symbol visibility control disabled.
    ./configure: line 360: /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    ./configure: line 360: /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ --sysroot=/Users/ze/raspi/sysroot -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
    /Users/ze/raspi/qtbase/config.tests/unix/bsymbolic_functions.test: line 18: /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    Symbolic function binding disabled.
    DEFAULT_INCDIRS="/usr/include
    /usr/local/include"
    DEFAULT_LIBDIRS="/lib
    /usr/lib"
    <srcbase> = /Users/ze/raspi/qtbase 
    <outbase> = /Users/ze/raspi/qtbase 
    Creating qmake...
    make: Nothing to be done for `first'.
    Running configuration tests...
    Determining architecture... ()
    /Users/ze/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/
    

  • Lifetime Qt Champion

    Hi,

    Your cross-compiler is not built for OS X but for Linux. You have two options:

    1. Use a Linux Virtual machine using e.g. Virtual Box
    2. Find a cross-compiler for OS X. You can try this one


  • @SGaist said:

    this one

    Thank you,
    I'll try!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.