How can I cross-compile Qt 5.x?



  • 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.


  • Moderators

    @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



  • @koahnig
    Thank you for reply.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.