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. Qt cross compile for Rasperry by not working for cmake project

Qt cross compile for Rasperry by not working for cmake project

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 239 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.
  • K Offline
    K Offline
    KR51
    wrote on last edited by
    #1

    'm trying to cross compile a project for a raspberry pi 4 from my ubuntu host machine (following this tutorial: https://www.interelectronix.com/qt-515-cross-compilation-raspberry-compute-module-4-ubuntu-20-lts.html). I have cross-compiled qt on my host and can now create a sample project in Qt-creator, compile it, deploy it on my host system and run it without any problems. But if I select Cmake instead of Qmake as build system, I get errors during the build, e.g.:

    07:54:57: Running steps for project untitled...
    07:54:57: Starting: "/usr/bin/cmake" --build /home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug --target all
    [1/5 29.6/sec] Automatic MOC and UIC for target untitled
    FAILED: CMakeFiles/untitled_autogen untitled_autogen/mocs_compilation.cpp
    cd /home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug && /usr/bin/cmake -E cmake_autogen /home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug/CMakeFiles/untitled_autogen.dir/AutogenInfo.json Debug
    
    AutoMoc subprocess error
    ------------------------
    The moc process failed to compile
      "SRC:/mainwindow.h"
    into
      "BIN:/untitled_autogen/EWIEGA46WW/moc_mainwindow.cpp"
    
    Command
    -------
    /opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/lib/qt5/bin/moc -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug -I/home/user/Qt-Projects/cmakeTestProject/untitled -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/arm-linux-gnueabihf/qt5 -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/arm-linux-gnueabihf/qt5/QtWidgets -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/arm-linux-gnueabihf/qt5/QtGui -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/arm-linux-gnueabihf/qt5/QtCore -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.4.1 -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.4.1/arm-linux-gnueabihf -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include/c++/7.4.1/backward -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/7.4.1/include -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/7.4.1/include-fixed -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/arm-linux-gnueabihf -I/opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include --include /home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug/untitled_autogen/moc_predefs.h -p ./ -o /home/user/Qt-Projects/cmakeTestProject/build-untitled-RaspberryPi4_Qt5_15-Debug/untitled_autogen/EWIEGA46WW/moc_mainwindow.cpp /home/user/Qt-Projects/cmakeTestProject/untitled/mainwindow.h
    
    Output
    ------
    /opt/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/lib/qt5/bin/moc: 1: Syntax error: "(" unexpected (expecting ")")
    

    Do you have any idea what's going on here?

    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