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

RPI installing cross-compiling



  • Hello,
    I'm working on the installation of qt for cross-compiling.
    For the installation I followed tho wiki:
    https://wiki.qt.io/RaspberryPi2EGLFS
    The Qt-Version is: 5.10.1 for raspberry#zero w
    On step 10 I tried to execute the following command:
    ./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
    But I got an error
    You don't seem to have 'make' or 'gmake' in your PATH.
    Cannot proceed.

    This is my PC:
    Ubuntu 18.04.2 LTS
    4.15.0-29-generic x86_64

    Please could somebody give me a solution?
    Thanks in advance.



  • @K-Str as the error says, is make command available in your PATH?

    From command line you can try:

    make --version
    


  • @Pablo-J.-Rogina said in RPI installing cross-compiling:

    make --version

    Hi Pablo-J.Rogina;
    thanks for your helpful answer,
    This command make --version said no make installed.
    After I installed make,
    Built for x86_64-pc-linux-gnu
    Copyright (C) 1988-2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    I continued with the command
    ./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
    and the error
    make: g++: Command not found
    Makefile:242: recipe for target 'main.o' failed
    make: *** [main.o] Error 127

    appeared.
    I installed g++
    Thread model: posix
    gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

    Then I cleaned the everything like suggested on the end of step 10
    git clean -dfx
    and repeated step 10 again.
    When I execute the command again I got the error:
    Project ERROR: Cannot run target compiler '/home/kurt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++'. Output:
    sh: 1: /home/kurt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
    Maybe you forgot to setup the environment?

    Now I have no idea what to do. How can I check the setting in environment?
    The command
    env
    shows a correct HOME
    The command
    ls /home/kurt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
    shows the correct file.

    Now I have no idea what to do!
    Please could somebody give me a hint?

    Regards
    Kurt



  • @K-Str said in RPI installing cross-compiling:

    This is my PC:
    Ubuntu 18.04.2 LTS
    4.15.0-29-generic x86_64

    since your using a 64-bit pc...it was stated at step #10:

    -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
    


  • Hi cranz32,
    thank you very much for this tipp.
    But now an other question> must I also add the parameter
    -no-use-gold-linker
    because I use qt5.10.1_



  • @K-Str

    must I also add the parameter
    -no-use-gold-linker
    because I use qt5.10.1_

    since your cross compiling then yes. so far i've tested https://wiki.qt.io/RaspberryPi2EGLFS upto 5.12.0. haven't tried 5.12.1 as of yet.



  • Hello,
    thanks to all. The installation is perfect. But....
    Now I can't debug.
    As I start debugging I get the following error:
    The selected build of GDB does not support Python scripting.
    It cannot be used in Qt Creator.

    I found something that I need to install gdb-multiarch on Ubuntu. s this correct? and where I have to setup the GDB?
    Who can give me some help?
    Kurt



  • @K-Str said in RPI installing cross-compiling:

    I found something that I need to install gdb-multiarch on Ubuntu. s this correct? and where I have to setup the GDB?

    could this issue be worth its own post? So not to mix topics? Thanks.




Log in to reply