Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cross-compile error on RaspberryPi



  • The referenced article: http://qt-project.org/wiki/RaspberryPi_Beginners_guide

    When I compile the qtbase as follow, I have a problem.
    @./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt5pi@

    The error is:
    @-reduce-relocations was requested but this compiler does not support it
    Re-run configure with -v for more information@

    I add the -v behind the above code (./configure ....... -v). The error is:
    @bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
    #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
    ^
    Symbolic function binding disabled.
    -reduce-relocations was requested but this compiler does not support it@

    The Raspberry Pi cross-compiler is downloaded from https://github.com/raspberrypi/tools
    How can I solve the problem?


  • Qt Champions 2017

    Remove -reduce-relocations option from your command line arguments and re-run your compilation.



  • Thank you! I successfully compiled the qtbase. But when I compile other modules, there are some errors.
    When I compile qtjsbackend,the error is as followed

    @In file included from ../3rdparty/v8/src/v8.h:58:0,
    from ../3rdparty/v8/src/accessors.cc:28:
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected identifier before ‘<<’ token
    <<<<<<< HEAD
    ^
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected ‘}’ before ‘<<’ token
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected unqualified-id before ‘<<’ token
    ../3rdparty/v8/src/v8globals.h:578:3: error: expected declaration before ‘}’ token
    } } // namespace v8::internal
    ^
    make[2]: *** [.obj/accessors.o] error 1
    make[2]: *** waiting the uncompleted task....
    In file included from ../3rdparty/v8/src/v8.h:58:0,
    from ../3rdparty/v8/src/api.h:31,
    from ../3rdparty/v8/src/api.cc:28:
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected identifier before ‘<<’ token
    <<<<<<< HEAD
    ^
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected ‘}’ before ‘<<’ token
    ../3rdparty/v8/src/v8globals.h:434:1: error: expected unqualified-id before ‘<<’ token
    ../3rdparty/v8/src/v8globals.h:578:3: error: expected declaration before ‘}’ token
    } } // namespace v8::internal
    ^
    make[2]: *** [.obj/api.o] error 1
    make[2]:leaving /home/shawn/opt/qt5/qtjsbackend/src/v8' make[1]: *** [sub-v8-make_first-ordered] error 2 make[1]:leaving/home/shawn/opt/qt5/qtjsbackend/src'
    make: *** [sub-src-make_first] error 2
    @

    When I use the command "/usr/local/qt5pi/bin/qmake ." to compile the qt3d, qtjsondb and qtdocgallery, the error is
    @ file to open is a directory
    Error processing project file: .@

    [quote author="Dheerendra" date="1408464631"]Remove -reduce-relocations option from your command line arguments and re-run your compilation.[/quote]


Log in to reply