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

qt 5.14.2 cross compile error : start.S:121: undefined reference to `main'



  • Hello,

    I've tried to cross compile QT 5.14.2 for stm32mp1. Configure is ok but when I tried make I get the message:

    alex@asus:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/qt/qt-everywhere-src-5.14.2$ make
    /home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/x86_64-ostl_sdk-linux/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-g++ --sysroot=/home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi --sysroot=/home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -Wl,-O1 -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.14.2/lib -o qt    -lpthread   
    /home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/x86_64-ostl_sdk-linux/usr/libexec/arm-ostl-linux-gnueabi/gcc/arm-ostl-linux-gnueabi/9.3.0/real-ld: /home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/lib/crt1.o: in function `_start':
    /usr/src/debug/glibc/2.31+gitAUTOINC+71f2b249a2-r0/git/csu/../sysdeps/arm/start.S:121: undefined reference to `main'
    collect2: error: ld returned 1 exit status
    Makefile:114: recipe for target 'qt' failed
    make: *** [qt] Error 1
    

    What is cause of the error?

    Thanks,
    Alex.


  • Lifetime Qt Champion

    @Alex-Mach Did you actually call configure before make?



  • @jsulm Yes, sure

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/home/alex/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/local/Qt-5.14.2'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    

Log in to reply