How to fix the compilation error make: *** [module-qtmultimedia-install_subtargets] Error 2 to QT5.12 under the raspberry?

Build QT quick
X11 specific:
GL .................................... no
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 .........X11 specific:
XLib ................................. no
XCB Xlib ............................. no
EGL on X11 ........................... no

Error at the Assembly stage, it is in fact not know how to fix

ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
Gives an error during make install

qpaintervideosurface.cpp: In function ‘void makeCurrent(QGLContext*)’:
qpaintervideosurface.cpp:67:12: error: invalid use of incomplete type ‘class QGLContext’
context->makeCurrent();
^~
In file included from qpaintervideosurface.cpp:40:0:
qpaintervideosurface_p.h:64:7: note: forward declaration of ‘class QGLContext’
class QGLContext;
^~~~~~~~~~
qpaintervideosurface.cpp:69:26: error: invalid use of incomplete type ‘class QGLContext’
auto handle = context->contextHandle();
^~
In file included from qpaintervideosurface.cpp:40:0:
qpaintervideosurface_p.h:64:7: note: forward declaration of ‘class QGLContext’
class QGLContext;
^~~~~~~~~~
qpaintervideosurface.cpp:70:19: error: ‘QOpenGLContext’ has not been declared
if (handle && QOpenGLContext::currentContext() != handle)
^~~~~~~~~~~~~~
qpaintervideosurface.cpp: At global scope:
qpaintervideosurface.cpp:65:13: warning: ‘void makeCurrent(QGLContext*)’ defined but not used [-Wunused-function]
static void makeCurrent(QGLContext *context)
^~~~~~~~~~~
Makefile:2772: recipe for target '.obj/qpaintervideosurface.o' failed
make[3]: *** [.obj/qpaintervideosurface.o] Error 1
make[3]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia/src/multimediawidgets"
Makefile:85: recipe for target 'sub-multimediawidgets-install_subtargets' failed
make[2]: *** [sub-multimediawidgets-install_subtargets] Error 2
make[2]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia/src"
Makefile:60: recipe for target 'sub-src-install_subtargets' failed
make[1]: *** [sub-src-install_subtargets] Error 2
make[1]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia"
Makefile:795: recipe for target 'module-qtmultimedia-install_subtargets' failed
make: *** [module-qtmultimedia-install_subtargets] Error 2

Installed the following libraries, not helped

sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev
sudo apt install libqt5gui5
sudo apt install gcc-arm-linux-gnueabihf
sudo apt install g++
sudo apt install libclang-6.0-dev llvm-6.0
sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install freeglut3 freeglut3-dev mesa-common-dev
sudo apt-get install libglut3-dev
sudo apt-get install libglapi-mesa && sudo apt-get install libosmesa6
apt-get install mesa-utils
The starting configuration

./configure-device linux-rasp-pi3-HC4-g++ -static -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot ../../mnt/rasp-pi-rootfs -opensource -confirm-license-optimized-qmake -release-skip qtwebengine -nomake examples -make libs-prefix /usr/local/qt5rpi -v-no-use-gold-linker -nomake tests-no-compile-examples -no-pch -skip wayland
Full error after make-j4 module-qtmultimedia

arm-linux-gnueabihf-g++ -c-march=armv8-a-mtune=cortex-a53-mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/media/aleks/OUT_FILES/opt/qt5/mnt/rasp-pi-rootfs -O2 -fPIC -std=c++1z-fvisibility=hidden-fvisibility-inlines-hidden -fno-exceptions -Wall -W-Wvla -Wdate-time-Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow-ffunction-sections-fdata-sections-D_REENTRANT -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MULTIMEDIAWIDGETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtMultimediaWidgets -I../../include/QtMultimediaWidgets/5.12.3 -I../../include/QtMultimediaWidgets/5.12.3/QtMultimediaWidgets -I../../include/QtMultimedia/5.12.3 -I../../include/QtMultimedia/5.12.3/QtMultimedia -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtWidgets/5.12.3 -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtWidgets/5.12.3/QtWidgets -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtGui/5.12.3 -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtGui/5.12.3/QtGui -I../../include/QtMultimedia -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtWidgets -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtGui -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtCore/5.12.3 -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtCore/5.12.3/QtCore -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtNetwork -I/media/aleks/OUT_FILES/opt/qt5/qtbase/include/QtCore -I. moc -I/media/aleks/OUT_FILES/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi3-HC4-g++ -o .obj/qgraphicsvideoitem.o qgraphicsvideoitem.cpp
qpaintervideosurface.cpp: In function ‘void makeCurrent(QGLContext*)’:
qpaintervideosurface.cpp:67:12: error: invalid use of incomplete type ‘class QGLContext’
context->makeCurrent();
^~
In file included from qpaintervideosurface.cpp:40:0:
qpaintervideosurface_p.h:64:7: note: forward declaration of ‘class QGLContext’
class QGLContext;
^~~~~~~~~~
qpaintervideosurface.cpp:69:26: error: invalid use of incomplete type ‘class QGLContext’
auto handle = context->contextHandle();
^~
In file included from qpaintervideosurface.cpp:40:0:
qpaintervideosurface_p.h:64:7: note: forward declaration of ‘class QGLContext’
class QGLContext;
^~~~~~~~~~
qpaintervideosurface.cpp:70:19: error: ‘QOpenGLContext’ has not been declared
if (handle && QOpenGLContext::currentContext() != handle)
^~~~~~~~~~~~~~
qpaintervideosurface.cpp: At global scope:
qpaintervideosurface.cpp:65:13: warning: ‘void makeCurrent(QGLContext*)’ defined but not used [-Wunused-function]
static void makeCurrent(QGLContext *context)
^~~~~~~~~~~
Makefile:2772: recipe for target '.obj/qpaintervideosurface.o' failed
make[3]: *** [.obj/qpaintervideosurface.o] Error 1
make[3]: *** Waiting for job completion...
make[3]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia/src/multimediawidgets"
Makefile:73: recipe for target 'sub-multimediawidgets-make_first' failed
make[2]: *** [sub-multimediawidgets-make_first] Error 2
make[2]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia/src"
Makefile:48: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: exit from directory "/media/aleks/OUT_FILES/opt/qt5/qtmultimedia"
Makefile:780: recipe for target 'module-qtmultimedia' failed
make: *** [module-qtmultimedia] Error 2



I don't know how to force qt to finally get together. Faced with this bug, I suspect an error with the OpenGL libraries. How to fix?
March 23rd 20 at 18:54
1 answer
March 23rd 20 at 18:56
Solution
In General, I found the normal manual after which everything compiled fine. pavelk.ru/krosskompilyaciya-qt-dlya-raspberry-pi/c...

Find more questions by tags Raspberry PiQtLinux