application can't be displayed on embedded platform
-
Hello:
I need to write a application via qml. And it will be execute on an embedded platform which didn't support opengl. So i export QMLSCENE_DEVICE=softwarecontext. But unfortunately it still can't display and no any error message output. I don't konw how to deal with it. My compile comand as follow:
./configure \ -v \ -confirm-license \ -prefix $PWD/../qt-5.9.9 \ -release \ -opensource \ -accessibility \ -make libs \ -xplatform linux-arm-gnueabihf-g++ \ -pch \ -sql-sqlite \ -qt-libjpeg \ -qt-zlib \ -opengl es2 \ -nomake examples \ -nomake tools \ -nomake tests \ -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtxmlpatterns -skip qtwebengine
and the output is follow:
Configure summary: Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: linux-arm-gnueabihf-g++ (arm, CPU features: <none>) Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile 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 ...................... yes Using new DTAGS ........................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. no Build parts ............................ 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 .................................. yes 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 ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ yes OpenGL ES 3.1 ........................ yes 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 .......................... no 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 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 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
my qmake.conf is follow:
# # qmake configuration for building with arm-linux-gnueabihf-g++ # MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) QMAKE_INCDIR_OPENGL_ES2 = /home/parallels/cross/opengllb/include QMAKE_LIBDIR_OPENGL_ES2 = /home/parallels/cross/opengllb/lib QMAKE_LIBS_OPENGL_ES2 = -lglapi -lGLESv2 -lEGL QMAKE_LIBS_EGL += -lEGL QMAKE_INCDIR_EGL = /home/parallels/cross/opengllb/include QMAKE_LIBDIR_EGL = /home/parallels/cross/opengllb/lib # modifications to g++.conf QMAKE_CC = arm-linux-gnueabihf-gcc QMAKE_CXX = arm-linux-gnueabihf-g++ QMAKE_LINK = arm-linux-gnueabihf-g++ QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++ # modifications to linux.conf QMAKE_AR = arm-linux-gnueabihf-ar cqs QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy QMAKE_NM = arm-linux-gnueabihf-nm -P QMAKE_STRIP = arm-linux-gnueabihf-strip load(qt_config)
when i try to execute it, it will output as follow:
QML debugging is enabled. Only use this in a safe environment.
can anyone help me ?
-
Have you followed the installation guide for Qt Quick 2D renderer? https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-installation-guide.html
-
Yeah, I have read this guide, but something confused me. What I did was a little different from the guide
- sysroot means for my located of my embedded device? I didn't set this parameter when i cross compile qt source code.
Set up your build environment by defining where your compiler and sysroot are located:
- I‘m confused for this step. What mean of build Qt module? I have completed cross compile the qt source code, is this step included in it? Or this step refers to build my application?
Build Qt Quick 2D Renderer like any other Qt module
I'm new to qt, sorry for my stupid question :-(
-
@Kechieh_wang said in application can't be displayed on embedded platform:
sysroot means for my located of my embedded device?
It is basically the file system of your device. Without sysroot you can't cross compile. You simply copy the content of your device file system to some location on your host machine (for example using rsync).
-
@Kechieh_wang said in application can't be displayed on embedded platform:
Yeah, I have read this guide, but something confused me. What I did was a little different from the guide
- sysroot means for my located of my embedded device? I didn't set this parameter when i cross compile qt source code.
Yes it's usually a local copy of your system folders. Used by cross-compiler to find system headers and link to system libraries.
Set up your build environment by defining where your compiler and sysroot are located:
- I‘m confused for this step. What mean of build Qt module? I have completed cross compile the qt source code, is this step included in it? Or this step refers to build my application?
If you use
qmake
from your cross-compiled Qt then it will pick up correct systroot and compiler automatically.What mean of build Qt module
You need to build the 2d Renderer module (as described in the doc). This is a module in Qt source code. So it's not about your app. Go back to your Qt build and apply these build instructions there. Don't forget to run
make install
and (if necessary) copy the Qt installation to your embedded device. Then you can try to run your app again.Build Qt Quick 2D Renderer like any other Qt module
I'm new to qt, sorry for my stupid question :-(
And you are starting with an embedded board without OpenGL? That's pretty brave :-)
-
You need to build the 2d Renderer module (as described in the doc). This is a module in Qt source code. So it's not about your app. Go back to your Qt build and apply these build instructions there. Don't forget to run make install and (if necessary) copy the Qt installation to your embedded device. Then you can try to run your app again.
Just to confirm again, is 2d Renderer module the submodule of qtdeclarative? I didn't find this modle in the source code :-(
-
@Kechieh_wang said in application can't be displayed on embedded platform:
You need to build the 2d Renderer module (as described in the doc). This is a module in Qt source code. So it's not about your app. Go back to your Qt build and apply these build instructions there. Don't forget to run make install and (if necessary) copy the Qt installation to your embedded device. Then you can try to run your app again.
Just to confirm again, is 2d Renderer module the submodule of qtdeclarative? I didn't find this modle in the source code :-(
I have no idea. I think it's only available in commercial license, but maybe I'm wrong.