4

Using Qt Creator 4.0.2 base on Qt 5.7.0, my app name is test

Board : i.M6Q with buildroot (Qt 5.9)

Questions:

A. When I run qt app show this error

EGL library doesn't support Emulator extensions 
Aborted
Application finished with exit code 134.

But I can run qt app in board using ./test, and it shows normally

B. And When I start debugging show this error

The GDB process terminated unexpectedly (exit code 1)

How to fix these errors?

The following is what I have set up:

  1. test.pro

    QT += core gui
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    TARGET = test
    TEMPLATE = app
    SOURCES += main.cpp\
    mainwindow.cpp
    HEADERS  += mainwindow.h
    FORMS    += mainwindow.ui
    
    target.path = /root/test
    INSTALLS += target
    
  2. Tools > Options > Build & Run > Compilers

    Name : imx6 buildroot GCC

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
    
  3. Tools > Options > Build & Run > Debuggers

    Name : IMX6 buildroot gdb

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
    
  4. Tools > Options > Build & Run > Qt Versions

    Version Name : Qt %{Qt:Version} (buildroot)

    buildroot/output/host/usr/bin/qmake
    
  5. Tools > Options > Build & Run > Kits look like this image

  6. Tools > Options > Devices:

    Device test finished successfully.
    
  7. This is my main.cpp

    #include "mainwindow.h"
    #include <QApplication>
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
    
        return a.exec();
    }
    
Julia Ding
  • 173
  • 16

1 Answers1

5

This is a reported Qt BUG The problem is that the build system does not select the correct eglfs backend

The solution is to export:

QT_QPA_EGLFS_INTEGRATION=eglfs_viv before running Qt apps, or

QT_QPA_EGLFS_INTEGRATION=none
Mohammad Kanan
  • 4,452
  • 10
  • 23
  • 47
  • When I run today, it shows another error which is " line 1: syntax error: unexpected ";;" ". And it can not run qt app in board normally. – Julia Ding Feb 22 '18 at 03:33
  • And at 'Gerneral Messages' it shows 'buildroot/output/host/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function. Project ERROR: Library '' is not defined.' – Julia Ding Feb 22 '18 at 05:36
  • @JuliaDing These seems new code errors not related to this post. you can close this post and ask new one with enough details – Mohammad Kanan Feb 22 '18 at 06:26
  • I serach for "eglfs_viv", then I found out I don't have graphics acceleration on my board for qt app running with "eglfs_viv". When I Enter '# CinematicExperience-demo -platform eglfs', it will show 'qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_viv"'. But CinematicExperience-demo run normally? ! I will try to turn on graphics acceleration on i.Mx6, then try your answer again. if it works I will check yoour answer, thanks. – Julia Ding Feb 22 '18 at 07:14
  • 1
    Originally, I run on VMware Ubuntu. When I not using VMware, the qt app remote run and debugging successfully. – Julia Ding Feb 26 '18 at 07:14