Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558356 - kde-apps/kdenlive-15.08.0 with dev-qt/qtgui[gles2] fails to emerge: glwidget.cpp:1092:23: error: 'GL_UNPACK_ROW_LENGTH' was not declared in this scope
Summary: kde-apps/kdenlive-15.08.0 with dev-qt/qtgui[gles2] fails to emerge: glwidget....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-21 15:46 UTC by jannis
Modified: 2015-12-20 16:28 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo,24.87 KB, text/plain)
2015-08-21 15:47 UTC, jannis
Details
build.log (build.log,877.65 KB, text/plain)
2015-08-21 15:48 UTC, jannis
Details
build.log (build.log,6.95 KB, text/plain)
2015-09-22 16:14 UTC, Dennis Schridde
Details
kdenlive-15.08.1-add-missing-findopengles-cmake-file-146e66c534b7d10871b6abb6ff5d11b41f623e80.patch (kdenlive-15.08.1-add-missing-findopengles-cmake-file-146e66c534b7d10871b6abb6ff5d11b41f623e80.patch,1.91 KB, patch)
2015-10-03 08:40 UTC, Dennis Schridde
Details | Diff
build.log (build.log,880.29 KB, text/plain)
2015-10-03 08:40 UTC, Dennis Schridde
Details
kdenlive-15.08.3-define-gl-unpack-row-length-if-missing.patch (kdenlive-15.08.3-define-gl-unpack-row-length-if-missing.patch,491 bytes, patch)
2015-11-14 14:19 UTC, Dennis Schridde
Details | Diff
kdenlive-15.08.3-only-delete-opengl-3.2-core-functions-on-windows.patch (kdenlive-15.08.3-only-delete-opengl-3.2-core-functions-on-windows.patch,413 bytes, patch)
2015-11-14 14:30 UTC, Dennis Schridde
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2015-08-21 15:46:44 UTC
kde-apps/kdenlive-15.08.0 fails to emerge. See attached build.log

Reproducible: Always
Comment 1 jannis 2015-08-21 15:47:06 UTC
Created attachment 409768 [details]
emerge --info
Comment 2 jannis 2015-08-21 15:48:10 UTC
Created attachment 409770 [details]
build.log
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-08-21 15:50:19 UTC
Could you please paste emerge -pv mesa ?
Comment 4 Michael Palimaka (kensington) gentoo-dev 2015-08-21 15:51:31 UTC
Oh, and emerge -pv qtopengl qtgui qtwidgets too please.
Comment 5 jannis 2015-08-21 16:07:39 UTC
Seems related to upstream-bug https://bugs.kde.org/show_bug.cgi?id=313662 (another package) and +gles2 on qtgui:5. I'll report to upstream later, gotta leave home now :/
Comment 6 jannis 2015-08-21 16:09:19 UTC
kripton@miramis ~ $ emerge -pv mesa qtopengl qtgui qtwidgets

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/mesa-10.6.3::gentoo  USE="classic dri3 egl gallium gbm gles1 gles2 llvm nptl osmesa pic udev vaapi wayland xa xvmc -bindist -d3d9 -debug -opencl -openmax -pax_kernel (-selinux) -vdpau" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="intel (-freedreno) -i915 -i965 -ilo -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware" 0 KiB
[ebuild   R    ] dev-qt/qtgui-5.4.2-r1:5::gentoo  USE="accessibility dbus egl evdev gif gles2 gtkstyle harfbuzz jpeg png udev xcb -debug -eglfs -ibus {-test}" 0 KiB
[ebuild   R    ] dev-qt/qtwidgets-5.4.2:5::gentoo  USE="gles2 gtkstyle png xcb -debug {-test}" 0 KiB
[ebuild   R    ] dev-qt/qtopengl-5.4.2:5::gentoo  USE="gles2 -debug {-test}" 0 KiB
Comment 7 jannis 2015-08-22 17:00:16 UTC
It worked fine after I removed the gles2 USE-flag from all Qt-packages (I still have it set for mesa due to other deps). I added a note to the upstream-bug that described the problem as well (however, on Ubuntu armhf): https://bugs.kde.org/show_bug.cgi?id=350061

Should the dependency of kdenlive to the Qt5-packages be restricted to -gles2? kde-frameworks/plasma seems to do this currently.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2015-08-22 17:59:42 UTC
Can anyone test the patch on the linked bug?
Comment 9 Anton Gubarkov 2015-08-24 15:43:54 UTC
The proposed patch doesn't work for me.  The same error is encountered.
Comment 10 Silvio 2015-08-30 09:58:16 UTC
The problem is still here. :(
Comment 11 Dennis Schridde 2015-08-30 10:03:36 UTC
I confirm that the patch attached to upstream-bug #350061 does not solve the issue. I adapted it to apply to Kdenlive 15.08.0, but the build fails with the same error.

See-Also: https://bugs.kde.org/show_bug.cgi?id=350061
Comment 12 Michael Palimaka (kensington) gentoo-dev 2015-09-05 15:38:15 UTC
There's a new patch committed upstream that's supposed to address this issue: https://quickgit.kde.org/?p=kdenlive.git&a=commit&h=92a25020e706537aec4d3ec7cf1ab5282b159989
Comment 13 Anton Gubarkov 2015-09-05 17:19:00 UTC
the new patch doesn't work for me. Same error, same place.
Comment 14 Anton Gubarkov 2015-09-10 20:28:51 UTC
I ended up adding dev-qt/*:5 -gles2 to my package.use followed by --newuse update.
kdenlive builds ok then
Comment 15 Dennis Schridde 2015-09-22 16:14:59 UTC
Created attachment 412592 [details]
build.log

kde-apps/kdenlive-15.08.1 now fails with:
CMake Error at src/CMakeLists.txt:16 (find_package):
  By not providing "FindOpenGLES.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenGLES",
  but CMake did not find one.

But it trying to use OpenGLES seems to be a step in the right direction.
Comment 16 Michael Palimaka (kensington) gentoo-dev 2015-09-23 12:27:39 UTC
(In reply to Dennis Schridde from comment #15)
> Created attachment 412592 [details]
> build.log
> 
> kde-apps/kdenlive-15.08.1 now fails with:
> CMake Error at src/CMakeLists.txt:16 (find_package):
>   By not providing "FindOpenGLES.cmake" in CMAKE_MODULE_PATH this project has
>   asked CMake to find a package configuration file provided by "OpenGLES",
>   but CMake did not find one.
> 
> But it trying to use OpenGLES seems to be a step in the right direction.

There was another commit upstream that should address that issue: http://commits.kde.org/kdenlive/146e66c534b7d10871b6abb6ff5d11b41f623e80
Comment 17 Dennis Schridde 2015-09-23 14:23:46 UTC
(In reply to Michael Palimaka (kensington) from comment #16)
> There was another commit upstream that should address that issue:
> http://commits.kde.org/kdenlive/146e66c534b7d10871b6abb6ff5d11b41f623e80

Thanks for the hint. Patch cannot apply this directly ("can't find file to patch at input line 15"), I couldn't quickly figure out why exactly. Will try again on the weekend.
Comment 18 Dennis Schridde 2015-10-03 08:40:07 UTC
Created attachment 413570 [details, diff]
kdenlive-15.08.1-add-missing-findopengles-cmake-file-146e66c534b7d10871b6abb6ff5d11b41f623e80.patch

The patch itself needs to be patched, because apparently the output of GitPHP is garbage:
--- 146e66c534b7d10871b6abb6ff5d11b41f623e80.patch.orig     2015-10-03 10:32:23.902712821 +0200
+++ 146e66c534b7d10871b6abb6ff5d11b41f623e80.patch  2015-10-03 10:31:32.295463218 +0200
@@ -11,8 +11,8 @@
 
 
 --- /dev/null
-+++ b/cmake/modules/FindOpenGLES.cmake
-@@ -1,1 +1,53 @@
++++ cmake/modules/FindOpenGLES.cmake
+@@ -0,0 +1,53 @@
 +# - Try to find OpenGLES
 +# Once done this will define
 +#  
@@ -24,7 +24,7 @@
 +#  OPENGLES_EGL_LIBRARY           - the EGL library
 +#  OPENGLES_LIBRARIES       - all libraries needed for OpenGLES
 +#  OPENGLES_INCLUDES        - all includes needed for OpenGLES
- 
++ 
 +FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h
 +  /usr/openwin/share/include
 +  /opt/graphics/OpenGL/include /usr/X11R6/include
@@ -66,4 +66,3 @@
 +ENDIF()
 +
 +
-

While the b/ directory prefix for teh destination file is correct behaviour of GitPHP, Portage starts trying to patch with -p0, which makes GNU patch create the file in the b/ directory. Thus I needed to remove the prefix from the diff.

Please find the fixed patch attached.

The build still does not succeed, though:
/var/tmp/portage/kde-apps/kdenlive-15.08.1/work/kdenlive-15.08.1/src/monitor/glwidget.cpp: In function ‘void uploadTextures(QOpenGLContext*, SharedFrame&, GLuint*)’:
/var/tmp/portage/kde-apps/kdenlive-15.08.1/work/kdenlive-15.08.1/src/monitor/glwidget.cpp:310:22: error: ‘GL_UNPACK_ROW_LENGTH’ was not declared in this scope
     f->glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
                      ^
/var/tmp/portage/kde-apps/kdenlive-15.08.1/work/kdenlive-15.08.1/src/monitor/glwidget.cpp:322:42: error: ‘GL_RED’ was not declared in this scope
     f->glTexImage2D   (GL_TEXTURE_2D, 0, GL_RED, width, height, 0,
                                          ^
Comment 19 Dennis Schridde 2015-10-03 08:40:55 UTC
Created attachment 413572 [details]
build.log
Comment 20 Michael Palimaka (kensington) gentoo-dev 2015-10-15 10:41:24 UTC
The patch is part of 15.08.2, but it still fails in the same way as described in comment #18.
Comment 21 Dennis Schridde 2015-11-14 14:19:51 UTC
Created attachment 416954 [details, diff]
kdenlive-15.08.3-define-gl-unpack-row-length-if-missing.patch
Comment 22 Dennis Schridde 2015-11-14 14:30:13 UTC
Created attachment 416958 [details, diff]
kdenlive-15.08.3-only-delete-opengl-3.2-core-functions-on-windows.patch

The last two patches fix all serious warnings in the glwidget.cpp file and make kdenlive-15.08.3 compile.

GL_UNPACK_ROW_LENGTH is part of OpenGL ES 3.2 (https://www.khronos.org/registry/gles/specs/3.2/es_spec_3.2.pdf), but not of OpenGL ES 2.0 (https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf). This it is defined in different headers (gl3.h) in OpenGL ES 3.2 and as an extension with _EXT suffix (gl2ext.h) to OpenGL ES 2.0. I chose the route to fallback to the _EXT definition, in case the regular one is unavailable.

The other patch fixes a warning about calling operator delete on QOpenGLFunctions_3_2_Core (its class definition is incomplete). It is only ever instantiated on Windows anyway, so I took the liberty to also guard the deletion with Q_OS_WIN.
Comment 23 Dennis Schridde 2015-11-14 14:32:32 UTC
P.S: These patches were also submitted upstream: https://bugs.kde.org/show_bug.cgi?id=350061#c11
Comment 24 Michael Palimaka (kensington) gentoo-dev 2015-12-20 16:28:10 UTC
I believe everything is upstreamed now, and 15.12.0 builds OK for me.