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. Cross-Compiling Qt 5.12 for Raspberry Pi Fails
Forum Updated to NodeBB v4.3 + New Features

Cross-Compiling Qt 5.12 for Raspberry Pi Fails

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 2.4k 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.
  • C Offline
    C Offline
    CarlosMesquita
    wrote on last edited by
    #1

    Hello,

    I am trying to cross-compile Qt 5.12 from git, and failing. This works for other Qt versions (tested with 5.9.x, 5.10.x and 5.11.x, up to 5.11.3), but it does not work for Qt 5.12.

    So here is what i do, basically:

    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.12.0
    perl init-repository
    

    The configure string i am currently using (and working up to Qt 5.11.3) is:

    ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=(...)/arm-linux-gnueabihf- -sysroot SYSROOT -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix (...)/qt5pi -hostprefix (...)/qt5 -no-use-gold-linker -no-gbm -skip qtscript -skip qtwebengine -skip qtwayland -skip qtlocation -v
    

    The configure step goes as expected. Then, when i try the make step... The following happens:

    cd qtbase/ && ( test -e Makefile || ~/qt5/qtbase/bin/qmake -o Makefile ~/qt5/qtbase/qtbase.pro ) && make -f Makefile 
    Info: creating cache file ~/qt5/qtbase/.qmake.cache
    make[1]: Entering directory '~/qt5/qtbase'
    cd src/ && ( test -e Makefile || ~/qt5/qtbase/bin/qmake -o Makefile ~/qt5/qtbase/src/src.pro ) && make -f Makefile 
    make[2]: Entering directory '~/qt5/qtbase/src'
    cd corelib/ && ( test -e Makefile.qtzlib || ~/qt5/qtbase/bin/qmake -o Makefile.qtzlib ~/qt5/qtbase/src/corelib/qtzlib.pro ) && make -f Makefile.qtzlib 
    Project MESSAGE: ~/qt5/bin/syncqt -module QtZlib -version 5.12.0 -outdir ~/qt5 -builddir ~/qt5/qtbase ~/qt5/qtbase
    sh: 1: ~/qt5/bin/syncqt: not found
    Project ERROR: Failed to run: ~/qt5/bin/syncqt -module QtZlib -version 5.12.0 -outdir ~/qt5 -builddir ~/qt5/qtbase ~/qt5/qtbase
    Makefile:73: recipe for target 'sub-zlib-make_first' failed
    make[2]: *** [sub-zlib-make_first] Error 3
    make[2]: Leaving directory '~/qt5/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '~/qt5/qtbase'
    Makefile:86: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    

    As far as I can tell, the make command is looking for the folder "qt5/bin/syncqt", but it does not exist. What exists is "qt5/qtbase/bin/syncqt". I don't know if this is an issue or not.

    If i try the configure command INSIDE the qtbase folder, only to build qtbase, it also works fine, the configure command goes fine, and the make command goes fine... But i am unable to build all the Qt modules at once due to this...

    If i try these steps on Qt 5.11.3, it works, and builds ok, the make command goes to the end fine.

    Thanks a lot.

    jsulmJ 1 Reply Last reply
    0
    • C CarlosMesquita

      Hello,

      I am trying to cross-compile Qt 5.12 from git, and failing. This works for other Qt versions (tested with 5.9.x, 5.10.x and 5.11.x, up to 5.11.3), but it does not work for Qt 5.12.

      So here is what i do, basically:

      git clone git://code.qt.io/qt/qt5.git
      cd qt5
      git checkout 5.12.0
      perl init-repository
      

      The configure string i am currently using (and working up to Qt 5.11.3) is:

      ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=(...)/arm-linux-gnueabihf- -sysroot SYSROOT -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix (...)/qt5pi -hostprefix (...)/qt5 -no-use-gold-linker -no-gbm -skip qtscript -skip qtwebengine -skip qtwayland -skip qtlocation -v
      

      The configure step goes as expected. Then, when i try the make step... The following happens:

      cd qtbase/ && ( test -e Makefile || ~/qt5/qtbase/bin/qmake -o Makefile ~/qt5/qtbase/qtbase.pro ) && make -f Makefile 
      Info: creating cache file ~/qt5/qtbase/.qmake.cache
      make[1]: Entering directory '~/qt5/qtbase'
      cd src/ && ( test -e Makefile || ~/qt5/qtbase/bin/qmake -o Makefile ~/qt5/qtbase/src/src.pro ) && make -f Makefile 
      make[2]: Entering directory '~/qt5/qtbase/src'
      cd corelib/ && ( test -e Makefile.qtzlib || ~/qt5/qtbase/bin/qmake -o Makefile.qtzlib ~/qt5/qtbase/src/corelib/qtzlib.pro ) && make -f Makefile.qtzlib 
      Project MESSAGE: ~/qt5/bin/syncqt -module QtZlib -version 5.12.0 -outdir ~/qt5 -builddir ~/qt5/qtbase ~/qt5/qtbase
      sh: 1: ~/qt5/bin/syncqt: not found
      Project ERROR: Failed to run: ~/qt5/bin/syncqt -module QtZlib -version 5.12.0 -outdir ~/qt5 -builddir ~/qt5/qtbase ~/qt5/qtbase
      Makefile:73: recipe for target 'sub-zlib-make_first' failed
      make[2]: *** [sub-zlib-make_first] Error 3
      make[2]: Leaving directory '~/qt5/qtbase/src'
      Makefile:50: recipe for target 'sub-src-make_first' failed
      make[1]: *** [sub-src-make_first] Error 2
      make[1]: Leaving directory '~/qt5/qtbase'
      Makefile:86: recipe for target 'module-qtbase-make_first' failed
      make: *** [module-qtbase-make_first] Error 2
      

      As far as I can tell, the make command is looking for the folder "qt5/bin/syncqt", but it does not exist. What exists is "qt5/qtbase/bin/syncqt". I don't know if this is an issue or not.

      If i try the configure command INSIDE the qtbase folder, only to build qtbase, it also works fine, the configure command goes fine, and the make command goes fine... But i am unable to build all the Qt modules at once due to this...

      If i try these steps on Qt 5.11.3, it works, and builds ok, the make command goes to the end fine.

      Thanks a lot.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @CarlosMesquita said in Cross-Compiling Qt 5.12 for Raspberry Pi Fails:

      -sysroot SYSROOT

      This doesn't look correct. Where is your sysroot?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • jsulmJ jsulm

        @CarlosMesquita said in Cross-Compiling Qt 5.12 for Raspberry Pi Fails:

        -sysroot SYSROOT

        This doesn't look correct. Where is your sysroot?

        C Offline
        C Offline
        CarlosMesquita
        wrote on last edited by
        #3

        @jsulm said in Cross-Compiling Qt 5.12 for Raspberry Pi Fails:

        @CarlosMesquita said in Cross-Compiling Qt 5.12 for Raspberry Pi Fails:

        -sysroot SYSROOT

        This doesn't look correct. Where is your sysroot?

        Sure it doesn't hehe
        I replaced some parts for other strings in order to keep the commands shorter. My sysroot is something like:

        -sysroot ~/carlos/rpi_cctools_test/sysroot
        
        1 Reply Last reply
        0
        • C Offline
          C Offline
          CarlosMesquita
          wrote on last edited by
          #4

          So, i got some updates on this issue.

          When using branches 5.12.0 OR 5.12.1, the issue is the one reported above.

          But if i use branch(or tag, i dunno) 5.12, and using the very same configure string command, i get the following error message when running the configure:

          ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.
          
          ERROR: The OpenGL functionality tests failed!
          You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
          QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
          

          Any thoughts?

          1 Reply Last reply
          0
          • JBonillaJ Offline
            JBonillaJ Offline
            JBonilla
            wrote on last edited by JBonilla
            #5

            Is this last issue related to EGL libraries? I renamed how they are referenced in ./qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf, maybe this help.

            Have a look at the steps I followed to cross compile Qt 5.12, particulary section “6. Configure Qt for cross compilation“ from https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

            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