簡體   English   中英

僅在為 Raspberry PI 交叉編譯 QT 靜態時出現 eglfs

[英]Only eglfs when cross-compiling QT static for Raspberry PI

我已經使用交叉編譯了 Raspberry PI 的 QT 靜態

./configure -opengl es2 -opensource -confirm-license -release -static \
            -prefix /usr/local/qt5static -hostprefix ~/raspi/qt5 -extprefix ~/raspi/qt5static \
            -device linux-rasp-pi-novc-g++ \
            -device-option CROSS_COMPILE=arm-raspbian-linux-gnueabihf- \
            -optimized-qmake -reduce-exports \
            -sysroot ~/raspi/sysroot \
            -make libs -make tools -no-use-gold-linker -v

其中“novc”設備本質上與 linux-rasp-pi-g++ 相同,但沒有來自 /opt/vc 的包含或庫。 當我運行程序時,它以全屏模式啟動(因為 eglfs),並且當使用export QT_DEBUG_PLUGINS=1探測時產生*

QFactoryLoader::QFactoryLoader() 忽略“org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,因為插件在靜態構建中被禁用 qt.qpa.plugin:在“”這個應用程序中找不到 Qt 平台插件“android”無法啟動,因為無法初始化 Qt 平台插件。 重新安裝應用程序可能會解決此問題。

可用的平台插件有:eglfs、eglfs。

factory loader 失敗是好的,但是為什么只有eglfs,哪里有兩個? 如何確保 xcb 是一個選項並且它是默認選項?

*我使用myapp -platform android因為我知道 Android 不在那里。 來自sudo apt install qt的動態鏈接 QT 顯示

可用的平台插件有:eglfs、linuxfb、minimum、minimalegl、offscreen、xcb。

我希望從我的靜態編譯。 這是我的 QPA 后端(我確實看到了 X11 的 eglfs,也許這就是我必須觸發的......)

QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. no
    EGL on X11 ........................... yes
    Xinput2 .............................. no
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... no
    Native painting (experimental) ....... no

我的 hello_plugin_import 有這個:

// This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QEglFSIntegrationPlugin)
Q_IMPORT_PLUGIN(QXcbEglIntegrationPlugin)
Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin)
Q_IMPORT_PLUGIN(QGifPlugin)
Q_IMPORT_PLUGIN(QICNSPlugin)
Q_IMPORT_PLUGIN(QICOPlugin)
Q_IMPORT_PLUGIN(QJpegPlugin)
Q_IMPORT_PLUGIN(QTgaPlugin)
Q_IMPORT_PLUGIN(QTiffPlugin)
Q_IMPORT_PLUGIN(QWbmpPlugin)
Q_IMPORT_PLUGIN(QWebpPlugin)
Q_IMPORT_PLUGIN(QEglFSEmulatorIntegrationPlugin)
Q_IMPORT_PLUGIN(QEglFSKmsEglDeviceIntegrationPlugin)
Q_IMPORT_PLUGIN(QEglFSX11IntegrationPlugin)
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)

更新。 我注意到我可以在我的 sysroot 中安裝一堆 libxcb 包。 我想如果我這樣做,我可以讓 xcb 顯示為平台選項(甚至默認平台選項??)。 但這會搞亂我的靜態編譯嗎? 我的客戶是否還需要安裝所有這些庫,或者 qmake 會做正確的事情嗎?

libglu1-mesa-dev is already the newest version (9.0.0-2.1).
libx11-xcb-dev is already the newest version (2:1.6.4-3).
libxcb-dri2-0-dev is already the newest version (1.12-1).
libxcb-dri2-0-dev set to manually installed.
libxcb-dri3-dev is already the newest version (1.12-1).
libxcb-dri3-dev set to manually installed.
libxcb-glx0-dev is already the newest version (1.12-1).
libxcb-present-dev is already the newest version (1.12-1).
libxcb-present-dev set to manually installed.
libxcb-randr0-dev is already the newest version (1.12-1).
libxcb-randr0-dev set to manually installed.
libxcb-render0-dev is already the newest version (1.12-1).
libxcb-render0-dev set to manually installed.
libxcb-shape0-dev is already the newest version (1.12-1).
libxcb-shape0-dev set to manually installed.
libxcb-sync-dev is already the newest version (1.12-1).
libxcb-sync-dev set to manually installed.
libxcb-xfixes0-dev is already the newest version (1.12-1).
libxcb-xfixes0-dev set to manually installed.
libxcb1-dev is already the newest version (1.12-1).
libxi-dev is already the newest version (2:1.7.9-1).
libxrender-dev is already the newest version (1:0.9.10-1).
The following additional packages will be installed:
  libxcb-composite0 libxcb-cursor0 libxcb-damage0 libxcb-dpms0 libxcb-ewmh2 libxcb-record0 libxcb-res0 libxcb-screensaver0 libxcb-xf86dri0 libxcb-xrm0 libxcb-xtest0
  libxcb-xv0 libxcb-xvmc0
The following NEW packages will be installed:
  libxcb-composite0 libxcb-composite0-dev libxcb-cursor-dev libxcb-cursor0 libxcb-damage0 libxcb-damage0-dev libxcb-dpms0 libxcb-dpms0-dev libxcb-ewmh-dev libxcb-ewmh2
  libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-record0 libxcb-record0-dev libxcb-render-util0-dev libxcb-res0 libxcb-res0-dev libxcb-screensaver0
  libxcb-screensaver0-dev libxcb-shm0-dev libxcb-util0-dev libxcb-xf86dri0 libxcb-xf86dri0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xrm-dev libxcb-xrm0 libxcb-xtest0
  libxcb-xtest0-dev libxcb-xv0 libxcb-xv0-dev libxcb-xvmc0 libxcb-xvmc0-dev

我相信,當您使用-static配置 Qt 時,您將平台插件烘焙到構建中,以后您將無法在插件之間進行交換。 我不確定這一點,但我一直在這條路上,無法讓 qpa 切換工作,只列出了一個平台插件。 如果一種方法,我會聽到這件事很感興趣!

如果我在這個正確的,那么使用XCB,而不是eglfs,你就需要重新配置的Qt與您的第一線configure是這樣的:

./configure -no-eglfs -qpa xcb -qt-xcb -opensource -confirm-license -release -static \

祝你好運

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM