QT_FEATURE_opengles32 in meta-toolchain-qt6 for iMX6DL
-
I'm trying to build a cross-compilation toolchain for an iMX6DL.
I've managed to produce a toolchain from the meta-toolchain-qt6 recipe but compiling against this toolchain is failing because it attempts to find an OpenGL3.2 header.
The iMX6DL does not support OpenGL3.2 (only 2.0) so it is correct that the toolchain does not contain this header, but Qt also shouldn't be looking for it.Ultimately it seems that the problem is the QT_FEATURE_opengles32 define is set to 1 in qtgui-config.h in the target sysroot.
If I set this to -1 (and the same with QT_FEATURE_opengles31 and QT_FEATURE_opengles3) then I can compile successfully, but manually editing the toolchain doesn't seem like the right fix. I'd like to adjust my Yocto configuration so this isn't necessary.My Yocto PACKAGECONFIG contains "eglfs opengles2" and does not contain "opengl", which seems correct.
The toolchain contains EGL/ and GLES2/ directories (no GLES3) in the target sysroot
Output from the QtBase configure step shows:
-DFEATURE_opengl_desktop=OFF -DFEATURE_opengles2=ON -DFEATURE_eglfs=ON -DFEATURE_eglfs_egldevice=OFFAlthough it also shows:
CMake Warning:
Manually-specified variables were not used by the project:...
FEATURE_eglfs
FEATURE_eglfs_egldevice
...
FEATURE_opengl_desktop
FEATURE_opengles2So perhaps those flags are not the mechanism that ultimately sets the QT_FEATURE defines?
Can anyone suggest why the opengles32 feature flag is set and how I should prevent it being set in the first place?