Open ValentiWorkLearning opened 3 years ago
Configure was launched with the following options:
CROSS_COMPILER_LOCATION=$HOME/Downloads/cross-pi-gcc-8.3.0-2
../qt-everywhere-src-5.15.2/configure -device linux-rasp-pi3-g++ \
-opengl es2 -eglfs \
-opensource -confirm-license -release \
-nomake tests \
-pkg-config \
-no-use-gold-linker -no-gbm \
-skip qtwayland -skip qtlocation -skip qtwebengine -skip qtscript -no-feature-accessibility \
-device-option CROSS_COMPILE=$(echo $CROSS_COMPILER_LOCATION)/bin/arm-linux-gnueabihf- -sysroot ~/Development/rpi3_sysroot -make libs \
-prefix /usr/local/qt5.15 \
-hostprefix ~/Development/qt_5_15_2_completed_83gcc_build/tools \
-extprefix ~/Development/qt_5_15_2_completed_83gcc_build/binaries \
-v \
-recheck \
-L$HOME/Development/rpi3_sysroot/usr/lib/arm-linux-gnueabihf \
-I$HOME/Development/rpi3_sysroot/usr/include/arm-linux-gnueabihf
It seems, that the default configuration doesn't support hardware OpenGL. I guess, some parts of this guide should be taken into account :smile: https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step
It seems, that the default configuration doesn't support hardware OpenGL. I guess, some parts of this guide should be taken into account 😄 https://wiki.qt.io/RaspberryPi2EGLFS#Step_by_step
@ValentiWorkLearning That's a well-documented guide that wasn't previously available. I guess we can copy the configurations and properly credit the page in our guide. But due to limited time and more focus on my other projects, I'll not able make these changes as of now. However any related PRs are always welcomed.
@abhiTronix I'll try to figure out how to properly launch Opengl. I guess, there is just a few changes for RPi3
I found solution. It's necessary to specify the sysroot dir to vc libs.
include(../common/linux_device_pre.conf)
QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include \
$$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \
$$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
QMAKE_LIBS_EGL = -lEGL -lGLESv2
QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2
QMAKE_INCDIR_BCM_HOST = $$[QT_SYSROOT]/opt/vc/include
QMAKE_LIBDIR_BCM_HOST = $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBS_BCM_HOST = -lbcm_host
DISTRO_OPTS += deb-multi-arch
DISTRO_OPTS += hard-float
QMAKE_CFLAGS += -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
EGLFS_DEVICE_INTEGRATION = eglfs_brcm
include(../common/linux_arm_device_post.conf)
load(qt_config)
The official qt qmake.conf is:
# I consider it a bug that this is required, but our EGL config.test _requires_ it
QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib
VC_LIBRARY_PATH = /opt/vc/lib
VC_INCLUDE_PATH = =/opt/vc/include
which leads to the broken EGL drivers configuration
linux-rasp-pi3-g++
I've decided to separate the issue from the previous one.
I guess, it hasn't been covered in the Qt building guide, but the default configuration for the
linux-rasp-pi-3-g++
produces the following result: