查看: 4722|回复: 2

[已解决] imx6q移植QT5.9.4

[复制链接]
  • TA的每日心情
    郁闷
    2018-4-2 11:24
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    4

    主题

    11

    帖子

    0

    注册会员

    Rank: 2

    积分
    52
    最后登录
    2018-6-12
    发表于 2018-5-11 15:51:01 | 显示全部楼层 |阅读模式
    在进行QT5.9.4移植的时候遇到如下问题:
    执行QWidget程序的时候没有任何问题,但是在执行QML程序的时候就会报告如下问题:
    This plugin does not support createPlatformOpenGLContext!
    Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
    Aborted
    另外:如果环境变量重新配置成eglfs插件进行显示的时候QML程序和QWidget程序都能正常执行
    希望有类似移植经验的大佬指导指导


    拷贝gpu库和QT库及插件至开发板上,配置环境变量如下:
    export  QT_ROOT=/usr/qt5.9.4
    export LD_LIBRARY_PATH=/lib:/usr/libQT_ROOT/lib
    export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
    export QT_QPA_FONTDIR=$QT_ROOT/lib/fonts
    export QML2_IMPORT_PATH=$QT_ROOT/qml
    export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb1




    QT编译配置如下:
    Configure summary:

    Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for: devices/linux-imx6-g++ (arm, CPU features: neon)
    Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus no-pkg-config reduce_exports stl
    Build options:
      Mode ................................... release
      Optimize release build for size ........ no
      Building shared libraries .............. yes
      Using C++ standard ..................... C++1z
      Using ccache ........................... no
      Using gold linker ...................... no
      Using new DTAGS ........................ yes
      Using precompiled headers .............. yes
      Using LTCG ............................. no
      Target compiler supports:
        NEON ................................. yes
      Build parts ............................ examples libs
    Qt modules and options:
      Qt Concurrent .......................... yes
      Qt D-Bus ............................... yes
      Qt D-Bus directly linked to libdbus .... no
      Qt Gui ................................. yes
      Qt Network ............................. yes
      Qt Sql ................................. yes
      Qt Testlib ............................. yes
      Qt Widgets ............................. yes
      Qt Xml ................................. yes
    Support enabled for:
      Using pkg-config ....................... no
      QML debugging .......................... yes
      udev ................................... no
      Using system zlib ...................... no
    Qt Core:
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ no
      GLib ................................... no
      iconv .................................. no
      ICU .................................... no
      Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
      Using system PCRE2 ..................... no
    Qt Network:
      getaddrinfo() .......................... yes
      getifaddrs() ........................... yes
      IPv6 ifname ............................ yes
      libproxy ............................... no
      OpenSSL ................................ no
        Qt directly linked to OpenSSL ........ no
      SCTP ................................... no
      Use system proxies ..................... yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ no
      HarfBuzz ............................... yes
        Using system HarfBuzz ................ no
      Fontconfig ............................. no
      Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
          Using system libjpeg ............... no
        PNG .................................. yes
          Using system libpng ................ no
      EGL .................................... yes
      OpenVG ................................. yes
      OpenGL:
        Desktop OpenGL ....................... no
        OpenGL ES 2.0 ........................ yes
        OpenGL ES 3.0 ........................ no
        OpenGL ES 3.1 ........................ no
      Session Management ..................... yes
    Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... no
      INTEGRITY HID .......................... no
      mtdev .................................. no
      tslib .................................. no
      xkbcommon-evdev ........................ no
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. yes
      EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... yes
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... no
        EGLFS GBM ............................ no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGL on X11 ........................... no
      LinuxFB ................................ yes
      VNC .................................... yes
      Mir client ............................. no
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows
    Qt PrintSupport:
      CUPS ................................... no
    Qt Sql:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. no
      OCI (Oracle) ........................... no
      ODBC ................................... no
      PostgreSQL ............................. no
      SQLite2 ................................ no
      SQLite ................................. yes
        Using system provided SQLite ......... no
      TDS (Sybase) ........................... no
    Qt SerialBus:
      Socket CAN ............................. yes
      Socket CAN FD .......................... yes
    QtXmlPatterns:
      XML schema support ..................... yes
    Qt QML:
      QML interpreter ........................ yes
      QML network support .................... yes
    Qt Quick:
      Direct3D 12 ............................ no
      AnimatedImage item ..................... yes
      Canvas item ............................ yes
      Support for Qt Quick Designer .......... yes
      Flipable item .......................... yes
      GridView item .......................... yes
      ListView item .......................... yes
      Path support ........................... yes
      PathView item .......................... yes
      Positioner items ....................... yes
      ShaderEffect item ...................... yes
      Sprite item ............................ yes
    Qt Gamepad:
      SDL2 ................................... no
    Qt 3D:
      Assimp ................................. yes
      System Assimp .......................... no
      Output Qt3D Job traces ................. no
      Output Qt3D GL traces .................. no
    Qt 3D GeometryLoaders:
      Autodesk FBX ........................... no
    Qt Wayland Client ........................ no
    Qt Wayland Compositor .................... no
    Qt Bluetooth:
      BlueZ .................................. no
      BlueZ Low Energy ....................... no
      Linux Crypto API ....................... no
    Qt Sensors:
      sensorfw ............................... no
    Qt Quick Controls 2:
      Styles ................................. Default Material Universal
    Qt Quick Templates 2:
      Hover support .......................... yes
      Multi-touch support .................... yes
    Qt Positioning:
      Gypsy GPS Daemon ....................... no
      WinRT Geolocation API .................. no
    Qt Location:
      Geoservice plugins:
        OpenStreetMap ........................ yes
        HERE ................................. yes
        Esri ................................. yes
        Mapbox ............................... yes
        MapboxGL ............................. yes
        Itemsoverlay ......................... yes
    Qt Multimedia:
      ALSA ................................... no
      GStreamer 1.0 .......................... no
      GStreamer 0.10 ......................... no
      Video for Linux ........................ yes
      OpenAL ................................. no
      PulseAudio ............................. no
      Resource Policy (libresourceqt5) ....... no
      Windows Audio Services ................. no
      DirectShow ............................. no
      Windows Media Foundation ............... no
    Qt WebEngine:
      Embedded build ......................... yes
      Pepper Plugins ......................... no
      Printing and PDF ....................... no
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
      WebRTC ................................. no
      Using system ninja ..................... no
      ALSA ................................... no
      PulseAudio ............................. no
      System libraries:
        re2 .................................. no
        ICU .................................. no
        libwebp and libwebpdemux ............. no
        Opus ................................. no
        ffmpeg ............................... no

    Note: Also available for Linux: linux-clang linux-icc

    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/opt/qt-arm-5.5.1'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    我知道答案 目前已有2人回答
    哎,又有新的麻烦了
    回复

    使用道具 举报

  • TA的每日心情
    郁闷
    2018-4-2 11:24
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    4

    主题

    11

    帖子

    0

    注册会员

    Rank: 2

    积分
    52
    最后登录
    2018-6-12
     楼主| 发表于 2018-5-14 09:15:34 | 显示全部楼层
    仔细翻阅qt官网文档之后发现:linuxfb是软件渲染的,换句话来说就是不支持OPENGL渲染方式,所以也就不支持qt  quick2,故QML程序在linuxfb插件下不能运行。
    官网原文:
    Building Qt for a given device requires a toolchain and a sysroot. Additionally, some devices require vendor-specific adaptation code for EGL and OpenGL ES 2.0 support. This is not relevant for non-accelerated platforms, for example the ones using the LinuxFB plugin, which is meant for software-based rendering only.
    哎,又有新的麻烦了
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    郁闷
    2018-4-2 11:24
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]初来乍到

    4

    主题

    11

    帖子

    0

    注册会员

    Rank: 2

    积分
    52
    最后登录
    2018-6-12
     楼主| 发表于 2018-5-14 09:16:11 | 显示全部楼层


    仔细翻阅qt官网文档之后发现:linuxfb是软件渲染的,换句话来说就是不支持OPENGL渲染方式,所以也就不支持qt  quick2,故QML程序在linuxfb插件下不能运行。
    官网原文:
    Building Qt for a given device requires a toolchain and a sysroot. Additionally, some devices require vendor-specific adaptation code for EGL and OpenGL ES 2.0 support. This is not relevant for non-accelerated platforms, for example the ones using the LinuxFB plugin, which is meant for software-based rendering only.

    哎,又有新的麻烦了
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /3 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2025-7-20 12:19 , Processed in 0.099402 second(s), 23 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表