Cross compiling QT 5.5 with BBB with debian os



  • hi everyone,

    I have cross compiled QT 5.5 with BBB (debian os) using linaro gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.

    my problem is when i run QT program with BBB as kit it is showing the following error.

    This application failed to start because it could not find or load the Qt platform plugin "eglfs".

    how to get rid of this error?


  • Lifetime Qt Champion

    Hi,

    As silly as it may sound: build the plugin and deploy it.

    What parameters did you pass to configure when cross-compiled Qt ?



  • @SGaist first of all sorry for the late reply. below is the ./configure parameters i have used to cross compile QT with BBB.

    ./configure -v -device linux-beagleboard-g++ -device-option CROSS_COMPILE=$TOOLCHAIN//opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux- -sysroot /opt/qt5_1/qt5 -prefix /opt/qt5_1/qt5 -qt-xcb

    I have installed QT and cross compiled with BBB once again but the error didnot go.I am stuck with same error.

    I have browsed the net but i did not find any procedure to built plugin?

    Can you explain how to build a plugin or it has to be given while configuring only?

    one more thing i have flashed debian using EMMC flashing. does it has anything to do with the error?

    Thanking You
    A.V.Bharadwaj


  • Lifetime Qt Champion

    You're building Qt with the xcb backend so you need to have an X server running on your target.



  • @SGaist hello

    I have installed Xserver on the target using sudo apt-get install xorg
    sudo apt-get install openbox. even now when i run QT program with BBB as kit i am getting the same error.

    stdin: is not a tty
    This application failed to start because it could not find or load the Qt platform plugin "eglfs".

    Reinstalling the application may fix this problem.
    bash: line 1: 1699 Aborted DISPLAY=':0.0' /root/hii
    Application finished with exit code 134.


  • Lifetime Qt Champion

    Then tell your application to use the xcb backend when starting.



  • @SGaist I am new to QT . I have not understood what you are trying to say. how to inform the application to use xcb instead of eglfs?

    for your convience i am attaching my qmake file

    qmake configuration for the BeagleBoard and BeagleBoard xM boards

    http://beagleboard.org/

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)

    load(device_config)

    QT_QPA_DEFAULT_PLATFORM = eglfs

    modifications to g++.conf

    QMAKE_CC = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-gcc
    QMAKE_CXX = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-g++
    QMAKE_LINK = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-g++

    modifications to linux.conf

    QMAKE_AR = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-objcopy
    QMAKE_NM = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-nm -P
    QMAKE_STRIP = /opt/qt5_1/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-strip

    COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard

    #modifications to gcc-base.conf
    QMAKE_CFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
    QMAKE_CXXFLAGS_RELEASE += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard

    QMAKE_LIBS += -lrt -lpthread -ldl -lxml2 -lz -lts -lasound -lfreetype -lexpat -lfontconfig -lpng

    Extra stuff (OpenGL, DirectFB, ...)

    QMAKE_INCDIR_EGL =
    QMAKE_LIBDIR_EGL =
    QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
    QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
    QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
    QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL}

    QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
    QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
    QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}

    Sanity check

    deviceSanityCheckCompiler()

    load(qt_config)


  • Lifetime Qt Champion

    You pass the parameter to your application when you launch it.


Log in to reply