Short summary: krita fails to build on arm (armv6l, armv7l, aarch64) because of openGL specific code. The first error is: [ 1688s] /home/abuild/rpmbuild/BUILD/krita-4.2.9/libs/ui/opengl/kis_opengl_image_textures.cpp: In function 'void {anonymous}::initializeRGBA16FTextures(QOpenGLContext*, KisGLTexturesInfo&, KoID&)': [ 1688s] /home/abuild/rpmbuild/BUILD/krita-4.2.9/libs/ui/opengl/kis_opengl_image_textures.cpp:480:39: error: 'GL_RGBA16F_ARB' was not declared in this scope; did you mean 'GL_RGBA16F_EXT'? [ 1688s] 480 | texturesInfo.internalFormat = GL_RGBA16F_ARB; [ 1688s] | ^~~~~~~~~~~~~~ [ 1688s] | GL_RGBA16F_EXT [ 1688s] /home/abuild/rpmbuild/BUILD/krita-4.2.9/libs/ui/opengl/kis_opengl_image_textures.cpp:484:39: error: 'GL_RGBA_FLOAT16_ATI' was not declared in this scope [ 1688s] 484 | texturesInfo.internalFormat = GL_RGBA_FLOAT16_ATI; [ 1688s] | ^~~~~~~~~~~~~~~~~~~
Created attachment 128216 [details] more errors
That attachment only says "NVIDIA Corporation, GeForce GTX 660/PCIe/SSE2, 4.6.0 NVIDIA 440.82" ?
Created attachment 128217 [details] krita_failure.txt (In reply to Boudewijn Rempt from comment #2) > That attachment only says "NVIDIA Corporation, GeForce GTX 660/PCIe/SSE2, > 4.6.0 NVIDIA 440.82" ? oops, wrong one :) Fixed
Hm... I guess the arm hardware you're compiling to only has opengl es? And yet, HAS_ONLY_OPENGL_ES doesn't appear to be set, otherwise these errors wouldn't happen.
the HAS_ONLY_OPENGL_ES flag is only defined 'if ANDROID' is true (in ui/CMakeLists.txt)
FYI, explicitly adding -DHAS_ONLY_OPENGL_ES to CXXFLAGS does make these errors disappear. Then there still are similar errors in plugins/dockers/lut/ocio_display_filter.cpp though (which can be avoided by building without OpenColorIO): [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp: In member function 'virtual bool OcioDisplayFilter::updateShader()': [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:276:9: error: 'QOpenGLFunctions_3_2_Core' was not declared in this scope; did you mean 'QOpenGLFunctionsPrivate'? [ 3160s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>(); [ 3160s] | ^~~~~~~~~~~~~~~~~~~~~~~~~ [ 3160s] | QOpenGLFunctionsPrivate [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:276:36: error: 'f' was not declared in this scope [ 3160s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>(); [ 3160s] | ^ [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:276:118: error: no matching function for call to 'QOpenGLContext::versionFunctions<QOpenGLFunctions_3_2_Core>()' [ 3160s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>(); [ 3160s] | ^ [ 3160s] In file included from /usr/include/qt5/QtGui/QOpenGLContext:1, [ 3160s] from /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:31: [ 3160s] /usr/include/qt5/QtGui/qopenglcontext.h:194:11: note: candidate: 'template<class TYPE> TYPE* QOpenGLContext::versionFunctions() const' [ 3160s] 194 | TYPE *versionFunctions() const [ 3160s] | ^~~~~~~~~~~~~~~~ [ 3160s] /usr/include/qt5/QtGui/qopenglcontext.h:194:11: note: template argument deduction/substitution failed: [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:287:9: error: 'QOpenGLFunctions_3_0' was not declared in this scope; did you mean 'QOpenGLFunctions'? [ 3160s] 287 | QOpenGLFunctions_3_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>(); [ 3160s] | ^~~~~~~~~~~~~~~~~~~~ [ 3160s] | QOpenGLFunctions [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:287:31: error: 'f' was not declared in this scope [ 3160s] 287 | QOpenGLFunctions_3_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>(); [ 3160s] | ^ [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:287:108: error: no matching function for call to 'QOpenGLContext::versionFunctions<QOpenGLFunctions_3_0>()' [ 3160s] 287 | QOpenGLFunctions_3_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>(); [ 3160s] | ^ [ 3160s] In file included from /usr/include/qt5/QtGui/QOpenGLContext:1, [ 3160s] from /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:31: [ 3160s] /usr/include/qt5/QtGui/qopenglcontext.h:194:11: note: candidate: 'template<class TYPE> TYPE* QOpenGLContext::versionFunctions() const' [ 3160s] 194 | TYPE *versionFunctions() const [ 3160s] | ^~~~~~~~~~~~~~~~ [ 3160s] /usr/include/qt5/QtGui/qopenglcontext.h:194:11: note: template argument deduction/substitution failed: [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp: In member function 'bool OcioDisplayFilter::updateShaderImpl(F*)': [ 3160s] /home/abuild/rpmbuild/BUILD/krita-4.3.0/plugins/dockers/lut/ocio_display_filter.cpp:336:43: error: 'GL_RGB16F_ARB' was not declared in this scope; did you mean 'GL_RGB16F_EXT'? [ 3160s] 336 | f->glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB16F_ARB, [ 3160s] | ^~~~~~~~~~~~~ [ 3160s] | GL_RGB16F_EXT
I don't have access this hardware, but could you please this patch? diff --git a/libs/ui/CMakeLists.txt b/libs/ui/CMakeLists.txt index 1dd227e432..25db539747 100644 --- a/libs/ui/CMakeLists.txt +++ b/libs/ui/CMakeLists.txt @@ -7,7 +7,8 @@ include_directories(SYSTEM ${OCIO_INCLUDE_DIR} ) -if (ANDROID) +# This is going to break when we start building on Windows ARM... +if (ANDROID OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)" AND NOT APPLE)) add_definitions(-DQT_OPENGL_ES_3) add_definitions(-DHAS_ONLY_OPENGL_ES) include_directories (${Qt5AndroidExtras_INCLUDE_DIRS})
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
I'll finally take a moment to test, sorry for the delay
armv7l built successfully, aarch64 is still building but should also be fine
thanks for testing!
Git commit 2d92ee5b01a0069cc33debdcb3c29dc817c2d6f3 by Halla Rempt. Committed on 10/03/2021 at 11:50. Pushed by rempt into branch 'krita/4.4.3'. Use opengl es on Arm Linux (cherry picked from commit c91d020b244f012e09203c14d80d8e8774362a57) M +1 -1 libs/ui/CMakeLists.txt https://invent.kde.org/graphics/krita/commit/2d92ee5b01a0069cc33debdcb3c29dc817c2d6f3
Git commit 61d01f08da8e7fc3a8e20316348f3dc10b5ffbc6 by Halla Rempt. Committed on 10/03/2021 at 11:51. Pushed by rempt into branch 'krita/4.3'. Use opengl es on Arm Linux (cherry picked from commit c91d020b244f012e09203c14d80d8e8774362a57) M +1 -1 libs/ui/CMakeLists.txt https://invent.kde.org/graphics/krita/commit/61d01f08da8e7fc3a8e20316348f3dc10b5ffbc6
Git commit c91d020b244f012e09203c14d80d8e8774362a57 by Halla Rempt. Committed on 10/03/2021 at 11:49. Pushed by rempt into branch 'master'. Use opengl es on Arm Linux M +1 -1 libs/ui/CMakeLists.txt https://invent.kde.org/graphics/krita/commit/c91d020b244f012e09203c14d80d8e8774362a57
I tried adding the opencolorio dependency back on ARM builds and sadly that still breaks the build: [ 3658s] /home/abuild/rpmbuild/BUILD/krita-4.4.2/plugins/dockers/lut/ocio_display_filter.cpp: In member function 'virtual bool OcioDisplayFilter::updateShader()': [ 3658s] /home/abuild/rpmbuild/BUILD/krita-4.4.2/plugins/dockers/lut/ocio_display_filter.cpp:276:9: error: 'QOpenGLFunctions_3_2_Core' was not declared in this scope; did you mean 'QOpenGLFunctionsPrivate'? [ 3658s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>(); [ 3658s] | ^~~~~~~~~~~~~~~~~~~~~~~~~ [ 3658s] | QOpenGLFunctionsPrivate [ 3658s] /home/abuild/rpmbuild/BUILD/krita-4.4.2/plugins/dockers/lut/ocio_display_filter.cpp:276:36: error: 'f' was not declared in this scope [ 3658s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>(); [ 3658s] | ^ [ 3658s] /home/abuild/rpmbuild/BUILD/krita-4.4.2/plugins/dockers/lut/ocio_display_filter.cpp:276:118: error: no matching function for call to 'QOpenGLContext::versionFunctions<QOpenGLFunctions_3_2_Core>()' [ 3659s] 276 | QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
investigating. Instead of disabling opencolorio based on the platform, I'll check if QT_OPENGL_ES_2 is defined.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/746
*** Bug 427856 has been marked as a duplicate of this bug. ***
(In reply to Halla Rempt from comment #7) > I don't have access this hardware, but could you please this patch? > > diff --git a/libs/ui/CMakeLists.txt b/libs/ui/CMakeLists.txt > index 1dd227e432..25db539747 100644 > --- a/libs/ui/CMakeLists.txt > +++ b/libs/ui/CMakeLists.txt > @@ -7,7 +7,8 @@ include_directories(SYSTEM > ${OCIO_INCLUDE_DIR} > ) > > -if (ANDROID) > +# This is going to break when we start building on Windows ARM... > +if (ANDROID OR (CMAKE_SYSTEM_PROCESSOR MATCHES > "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)" AND NOT APPLE)) > add_definitions(-DQT_OPENGL_ES_3) > add_definitions(-DHAS_ONLY_OPENGL_ES) > include_directories (${Qt5AndroidExtras_INCLUDE_DIRS}) I want to say this patch is not exactly correct. This assumes any Linux ARM systems can only use OpenGL ES, but it is in fact possible to build Qt to use desktop OpenGL on ARM/AArch64. AFAICT Debian on AArch64 provides system Qt packages configured with desktop OpenGL. I think there should be ways to determine from Qt's defines whether it is built with desktop OpenGL or OpenGL ES support, instead of guessing based on OS and CPU architecture.
Hello, i got hit by the relevant change that came with krita 4.4.3 forcing opengles based on cpu architecture while Qt is built with opengl. On Gentoo aarch64, Qt built with gles2-only DISABLED, when canvas is loading krita crashes with: ASSERT (krita): "ASSERT failure in KisOpenGLImageTextures::updateTextureFormat: "Unexpected KisOpenGL::hasOpenGLES returned false" (false)" in file /var/tmp/portage/media-gfx/krita-4.4.3/work/krita-4.4.3/libs/ui/opengl/kis_opengl_image_textures.cpp, line 557 Aborted Reverting 2d92ee5b01a0069cc33debdcb3c29dc817c2d6f3 brings everything back to normal. I guess im going to switch Qt+Krita to opengles anyway but, on par with Alvin Wong's comment, just matching cpu architecture is not enough.
This is on a Pinebook Pro running Manjaro-ARM (aarch64). I'm seeing a crash when creating a new image, if OpenGL canvas is enabled, but not when it's disabled. ASSERT (krita): "ASSERT failure in KisOpenGLImageTextures::updateTextureFormat: "Unexpected KisOpenGL::hasOpenGLES returned false" (false)" in file /build/krita/src/krita-4.4.5/libs/ui/opengl/kis_opengl_image_textures.cpp, line 557 KCrash: crashing... crashRecursionCounter = 2
*** Bug 442146 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1043
Can someone with an ARM Linux environment try the above MR and see if it fixes the crash issue?
Git commit 82f9ae948f910f22556d5095eaf37ffb5f21438d by Alvin Wong. Committed on 13/09/2021 at 08:13. Pushed by alvinwong into branch 'master'. Fix ARM builds using Qt with desktop OpenGL support Qt sets QT_OPENGL_ES_2 only if configured with OpenGL ES, so we can use it to substitute our HAS_ONLY_OPENGL_ES define. Windows builds sets QT_OPENGL_ES_2_ANGLE and QT_OPENGL_DYNAMIC instead, so it should be safe. M +5 -2 libs/ui/CMakeLists.txt M +2 -1 libs/ui/canvas/kis_mirror_axis.cpp M +7 -7 libs/ui/opengl/kis_opengl_canvas2.cpp M +9 -9 libs/ui/opengl/kis_opengl_image_textures.cpp https://invent.kde.org/graphics/krita/commit/82f9ae948f910f22556d5095eaf37ffb5f21438d
Git commit eb5fe152b721efaf624f99e8f506a94dc7d9fb93 by Alvin Wong, on behalf of L. E. Segovia. Committed on 13/09/2021 at 08:13. Pushed by alvinwong into branch 'master'. OpenColorIO: support only OpenGL ES present M +11 -1 plugins/dockers/lut/ocio_display_filter.cpp https://invent.kde.org/graphics/krita/commit/eb5fe152b721efaf624f99e8f506a94dc7d9fb93
Git commit 61ec45b776e39dd4fcc233a0636b0a1c346ba00f by Alvin Wong. Committed on 13/09/2021 at 08:15. Pushed by alvinwong into branch 'krita/5.0'. Fix ARM builds using Qt with desktop OpenGL support Qt sets QT_OPENGL_ES_2 only if configured with OpenGL ES, so we can use it to substitute our HAS_ONLY_OPENGL_ES define. Windows builds sets QT_OPENGL_ES_2_ANGLE and QT_OPENGL_DYNAMIC instead, so it should be safe. (cherry picked from commit 82f9ae948f910f22556d5095eaf37ffb5f21438d) M +5 -2 libs/ui/CMakeLists.txt M +2 -1 libs/ui/canvas/kis_mirror_axis.cpp M +7 -7 libs/ui/opengl/kis_opengl_canvas2.cpp M +9 -9 libs/ui/opengl/kis_opengl_image_textures.cpp https://invent.kde.org/graphics/krita/commit/61ec45b776e39dd4fcc233a0636b0a1c346ba00f
Git commit 7fe8cd59ef756a93be672099868948eecf6e4fe8 by Alvin Wong, on behalf of L. E. Segovia. Committed on 13/09/2021 at 08:15. Pushed by alvinwong into branch 'krita/5.0'. OpenColorIO: support only OpenGL ES present (cherry picked from commit eb5fe152b721efaf624f99e8f506a94dc7d9fb93) M +11 -1 plugins/dockers/lut/ocio_display_filter.cpp https://invent.kde.org/graphics/krita/commit/7fe8cd59ef756a93be672099868948eecf6e4fe8