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. How can I cross-compile Qt 5.x?
Forum Updated to NodeBB v4.3 + New Features

How can I cross-compile Qt 5.x?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.8k Views 2 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.
  • S Offline
    S Offline
    Sung Sean
    wrote on last edited by Sung Sean
    #1

    Hello.

    How can I cross-compile Qt 5.x for ARM device?

    Here is my using configure and qmake.conf on Qt 4.x. It was working well.

    qmake.conf

    QMAKE_CC = arm-hisiv200-linux-gnueabi-gcc
    QMAKE_CXX = arm-hisiv200-linux-gnueabi-g++
    QMAKE_LINK = arm-hisiv200-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-hisiv200-linux-gnueabi-g++

    QMAKE_AR = arm-hisiv200-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-hisiv200-linux-gnueabi-objcopy
    QMAKE_STRIP = arm-hisiv200-linux-gnueabi-strip

    QT_CFLAGS_DIRECTFB = -I/opt/dfb/include/directfb -D_REENTRANT
    QT_LIBS_DIRECTFB = -L/opt/dfb/lib -ldirectfb -lfusion -ldirect

    configure

    ./configure -v -prefix $PREFIX/qt -release -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -opensource -confirm-license -no-javascript-jit -no-scripttools -no-accessibility
    -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-cups -no-gtkstyle -no-opengl -no-openvg -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama
    -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-xinput -no-xkb -no-glib -no-largefile -depths all -no-mmx -no-3dnow -no-sse -no-sse2 -no-openssl -fast -no-gfx-linuxfb
    -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -qt-gfx-directfb -no-gfx-qnx -no-sql-sqlite -no-xmlpatterns -no-svg -no-gif -no-libtiff -no-libmng -no-nis
    -reduce-relocations -no-kbd-tty -no-mouse-pc -no-mouse-linuxtp -nomake demos -nomake examples -no-decoration-styled -no-decoration-windows -no-decoration-default

    But, when I try below configure option, that happens some error.

    configure Qt 5.4.1

    ./configure -prefix /opt/dfb/qt5 -release -make libs -xplatform linux-arm-gnueabi-g++ -no-opengl -confirm-license -opensource -no-icu -no-xcb -make examples -verbose -no-linuxfb -directfb

    == Error ==
    ...
    No QPA platform plugin enabled!
    If you really want to build without a QPA platform plugin you must pass
    -no-qpa-platform-guard to configure. Doing this will
    produce a Qt that can not run GUI applications.
    The dependencies needed for xcb to build are listed in
    src/plugins/platforms/xcb/READM

    Thank you.

    K 1 Reply Last reply
    0
    • S Sung Sean

      Hello.

      How can I cross-compile Qt 5.x for ARM device?

      Here is my using configure and qmake.conf on Qt 4.x. It was working well.

      qmake.conf

      QMAKE_CC = arm-hisiv200-linux-gnueabi-gcc
      QMAKE_CXX = arm-hisiv200-linux-gnueabi-g++
      QMAKE_LINK = arm-hisiv200-linux-gnueabi-g++
      QMAKE_LINK_SHLIB = arm-hisiv200-linux-gnueabi-g++

      QMAKE_AR = arm-hisiv200-linux-gnueabi-ar cqs
      QMAKE_OBJCOPY = arm-hisiv200-linux-gnueabi-objcopy
      QMAKE_STRIP = arm-hisiv200-linux-gnueabi-strip

      QT_CFLAGS_DIRECTFB = -I/opt/dfb/include/directfb -D_REENTRANT
      QT_LIBS_DIRECTFB = -L/opt/dfb/lib -ldirectfb -lfusion -ldirect

      configure

      ./configure -v -prefix $PREFIX/qt -release -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -opensource -confirm-license -no-javascript-jit -no-scripttools -no-accessibility
      -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-cups -no-gtkstyle -no-opengl -no-openvg -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama
      -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-xinput -no-xkb -no-glib -no-largefile -depths all -no-mmx -no-3dnow -no-sse -no-sse2 -no-openssl -fast -no-gfx-linuxfb
      -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -qt-gfx-directfb -no-gfx-qnx -no-sql-sqlite -no-xmlpatterns -no-svg -no-gif -no-libtiff -no-libmng -no-nis
      -reduce-relocations -no-kbd-tty -no-mouse-pc -no-mouse-linuxtp -nomake demos -nomake examples -no-decoration-styled -no-decoration-windows -no-decoration-default

      But, when I try below configure option, that happens some error.

      configure Qt 5.4.1

      ./configure -prefix /opt/dfb/qt5 -release -make libs -xplatform linux-arm-gnueabi-g++ -no-opengl -confirm-license -opensource -no-icu -no-xcb -make examples -verbose -no-linuxfb -directfb

      == Error ==
      ...
      No QPA platform plugin enabled!
      If you really want to build without a QPA platform plugin you must pass
      -no-qpa-platform-guard to configure. Doing this will
      produce a Qt that can not run GUI applications.
      The dependencies needed for xcb to build are listed in
      src/plugins/platforms/xcb/READM

      Thank you.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Sung-Sean
      Qt 4 and Qt 5 are actually quite, but there are some changes with required plugins.

      Those changes are probable the reason that your configuration working well for Qt 4 is not applicable anymore. You need to check out the guidelines for Qt 5 on this issue.

      See if this is suitable

      Vote the answer(s) that helped you to solve your issue(s)

      S 1 Reply Last reply
      0
      • K koahnig

        @Sung-Sean
        Qt 4 and Qt 5 are actually quite, but there are some changes with required plugins.

        Those changes are probable the reason that your configuration working well for Qt 4 is not applicable anymore. You need to check out the guidelines for Qt 5 on this issue.

        See if this is suitable

        S Offline
        S Offline
        Sung Sean
        wrote on last edited by
        #3

        @koahnig
        Thank you for reply.

        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