QT Creator 无法在 i.Mx6 (buildroot) 上远程 运行 和调试

QT Creator can not remote run and debugging on i.Mx6 (buildroot)

使用基于Qt 5.7.0的Qt Creator 4.0.2,我的应用名称是test

开发板:带 buildroot 的 i.M6Q (Qt 5.9)

问题:

一个。当我 运行 qt 应用程序显示此错误时

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

但是我可以运行 qt app in board using ./test,它显示正常

乙。当我开始调试时显示此错误

The GDB process terminated unexpectedly (exit code 1)

如何修复这些错误?

以下是我设置的:

  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. 工具 > 选项 > 构建 & 运行 > 编译器

    姓名:imx6 buildroot GCC

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
    
  3. 工具 > 选项 > 构建 & 运行 > 调试器

    姓名:IMX6 buildroot gdb

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
    
  4. 工具 > 选项 > 构建 & 运行 > Qt 版本

    版本名称:Qt %{Qt:Version} (buildroot)

    buildroot/output/host/usr/bin/qmake
    
  5. 工具>选项>构建和运行>工具包look like this image

  6. 工具 > 选项 > 设备:

    Device test finished successfully.
    
  7. 这是我的main.cpp

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

这是一篇报道Qt BUG 问题是构建系统没有 select 正确的 eglfs 后端

解决办法是导出:

QT_QPA_EGLFS_INTEGRATION=eglfs_viv 在 运行 Qt 应用之前,或

QT_QPA_EGLFS_INTEGRATION=none