Closed knyipab closed 8 months ago
I found out the root cause. MLT depends on qt5-qtsvg
which depends on qt5-qtbase
therefore remove my qt5-qtbase-opengl
before building MLT. I could not find a fix other than making a qt5-qtsvg-opengl
package.
You can try adding qt5-qtbase
to TERMUX_PKG_ANTI_BUILD_DEPENDS
.
Thanks for advice. Unfortunately it does not seem to work.
mlt
succeeds (shown in this github action) with this line (qt5-qtsvg-opengl
) in build.sh:
TERMUX_PKG_DEPENDS="ffmpeg, frei0r-plugins, qt5-qtbase-opengl, qt5-qtsvg-opengl, sdl, sdl2, swig"
mlt-2
fails (shown in this github action) with these lines (TERMUX_PKG_ANTI_BUILD_DEPENDS
) in build.sh:
TERMUX_PKG_DEPENDS="ffmpeg, frei0r-plugins, qt5-qtbase-opengl, qt5-qtsvg, sdl, sdl2, swig"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-opengl-cross-tools"
TERMUX_PKG_ANTI_BUILD_DEPENDS="qt5-qtbase, qt5-qtbase-cross-tools"
We know that it's really not ideal to rebuild the whole series of qt5-*
packages in qt5-*-opengl
fashion, neither making a request to qt5-qtbase
in the main repo. More qt5 packages will be needed when building apps like shotcut
.
I guess the most similar case is mesa
. Perhaps (??? Not sure) that mesa-zink
serves same libs and include files as mesa
, so mesa-zink
-dependent packages would not feel any difference in build time when dependencies of dependencies contain mesa
?
Packaging all the qt5-*
packages should be a solution. Extra testing should be done on these packages before adding them to the main repo. I suppose that enabling opengl in qt will make UI clunky because default opengl library is CPU-based llvmpipe...
I found that writing the corresponding version into $TERMUX_BUILT_PACKAGES_DIRECTORY/qt5-qtbase
can trick the build system to believe that the dependency is satisfied. But that doesn't work for qt5 packages (segfault in runtime), perhaps because some function or struct specifications changes when opengl feature is turned on.
At the end, I have to rebuild the series of qt5-*-opengl
. I doubt whether to add back to the main repo as qt5 is end of life.
Still, termux native build is preferred over proot Also, proot qt has opengl ON and seems to work just fine. And perhaps the performance impact on non-opengl app is not that significant.
Besides, I hope to see qt6 with opengl feature ON in the future. I'm happy to contribute but building qt6 doesn't seem easy (building twice with cmake, first building natively and second cross compiling).
I am working on another package called MLT (which depends on only
qt5-qtbase
andqt5-qtsvg
) and run into Qt OpenGL issue similar to one mentioned in https://github.com/termux-user-repository/tur/issues/510. I copiedx11-packages/qt5-qtbase
intotur/qt5-qtbase-opengl
and modifybuild.sh
as below (and rename subpackages) in the hope of building OpenGL support.This
qt5-qtbase-opengl
package does compile, but does not resolve or change anything of the MLT OpenGLContext error (shown below):If I patch MLT by commenting all QOpenGLContext related lines, it does compile. But later when I compile shotcut, there will be more and I cannot simply comment them. So, I need to get QOpenGLContext ready. What does this error actually mean and how can I compile the
qt5-qtbase-opengl
to really support QOpenGLContext?Full log (
qt5-qtbase-opengl
and thenmlt
): mlt-build.logFull build source code
mlt
: https://github.com/knyipab/tur/tree/MLT/tur/mlt Full build source codeqt5-qtbase-opengl
: https://github.com/knyipab/tur/tree/MLT/tur/qt5-qtbase-opengl