Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.9 cross compile for iMx6
Qt 6.11 is out! See what's new in the release blog

Qt 5.9 cross compile for iMx6

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 1.0k Views
  • 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.
  • V Offline
    V Offline
    Veepee
    wrote on last edited by
    #1

    Hi All

    I am trying to cross compile the Qt 5.9 version for my target platform imx6. I have tried to set the sysroot and compilers specific to my platform with below command

    sudo ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -gcc-sysroot -opengl es2 -make libs -device-option CROSS_COMPILE=/opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/bin/arm-none-linux-gnueabi-gcc-5.2.0- -sysroot /opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/arm-none-linux-gnueabi/libc --prefix=~/samba/workspace/source/qtbuild -device imx6

    But I find, by default a suffix off g++ gets added to the cross-compiler I set in the above path. I want my compiler gcc-5.2.0 to be used which is available at the path /opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/bin/arm-none-linux-gnueabi-gcc-5.2.0. But using this gives me a below error:

    Running configuration tests...
    Checking for valid makespec...

    • cd /home/workspace/source/qt-everywhere-opensource-src-5.9.5/config.tests/verifyspec && home/workspace/source/qt-everywhere-opensource-src-5.9.5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/arm-none-linux-gnueabi/libc" "QMAKE_CXXFLAGS += --sysroot=/opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/arm-none-linux-gnueabi/libc" "QMAKE_LFLAGS += --sysroot=/opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/arm-none-linux-gnueabi/libc" -early "CONFIG += cross_compile" /home/viu1cob/samba/workspace/source/qt-everywhere-opensource-src-5.9.5/qtbase/config.tests/verifyspec

    Project ERROR: Compiler /opt/tooling/codesourcery/MGC-2015.12-138-arm-gcc-5.2.0/Sourcery_CodeBench_for_ARM_Embedded/bin/arm-none-linux-gnueabi-gcc-5.2.0-g++ not found. Check the value of CROSS_COMPILE -device-option
    Note: Also available for Linux: linux-clang linux-icc

    ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

    On removing -device imx6 [ which I understand is required for eglfs functionality] from configure option, a different set of error is seen:

    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.

    Tried adding these macros in qmake.conf of imx6 device path as well. Still this issue is reported.
    Any help would be appreciated.

    1 Reply Last reply
    0
    • Cleiton BuenoC Offline
      Cleiton BuenoC Offline
      Cleiton Bueno
      wrote on last edited by
      #2

      Why not use something like Yocto Project or Buildroot? To generate a custom OS, toolchain and all control of what will be compiled, versions and more. To keep in the long run is more organized.


      Cleiton Bueno

      Blog | Linkedin | B2Open

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved