Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819384 - net-libs/webkit-gtk-2.34.2: FAILED: Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/GLContext.cpp.o
Summary: net-libs/webkit-gtk-2.34.2: FAILED: Source/WebCore/CMakeFiles/WebCore.dir/pla...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CVE-2021-30818, CVE-2021-30823, CVE-2021-30846, CVE-2021-30848, CVE-2021-30849, CVE-2021-30851, CVE-2021-30884, CVE-2021-30888, CVE-2021-30889, CVE-2021-30897, WSA-2021-0006
  Show dependency tree
 
Reported: 2021-10-21 22:42 UTC by Dmitry Baranov
Modified: 2022-01-02 22:46 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,2.69 KB, text/plain)
2021-10-21 22:48 UTC, Dmitry Baranov
Details
emerge --info (einfo.txt,5.88 KB, text/plain)
2021-10-21 22:48 UTC, Dmitry Baranov
Details
emerge --info (file_819384.txt,4.49 KB, text/plain)
2021-10-23 10:23 UTC, Arseny Solokha
Details
build.log (build.log.xz,186.93 KB, application/x-xz)
2021-10-23 10:23 UTC, Arseny Solokha
Details
build.log compressed via xz (build.log.xz,110.36 KB, application/octet-stream)
2021-10-23 19:33 UTC, Yuriy Dmitriev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Baranov 2021-10-21 22:42:09 UTC
[2655/5044] /usr/bin/x86_64-pc-linux-gnu-g++ ... /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp

FAILED: Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/GLContext.cpp.o

/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp: In function ‘bool WebCore::initializeOpenGLShimsIfNeeded()’:
/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp:69:19: error: ‘initializeOpenGLShims’ was not declared in this scope; did you mean ‘initializeOpenGLShimsIfNeeded’?
   69 |         success = initializeOpenGLShims();
      |                   ^~~~~~~~~~~~~~~~~~~~~
      |                   initializeOpenGLShimsIfNeeded
/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp: In member function ‘unsigned int WebCore::GLContext::version()’:
/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp:174:71: error: ‘::glGetString’ has not been declared
  174 |         String versionString = String(reinterpret_cast<const char*>(::glGetString(GL_VERSION)));
      |                                                                       ^~~~~~~~~~~
/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebCore/platform/graphics/GLContext.cpp:174:83: error: ‘GL_VERSION’ was not declared in this scope; did you mean ‘GCC_VERSION’?
  174 |         String versionString = String(reinterpret_cast<const char*>(::glGetString(GL_VERSION)));
      |                                                                                   ^~~~~~~~~~
      |                                                                                   GCC_VERSION

Reproducible: Always
Comment 1 Dmitry Baranov 2021-10-21 22:48:14 UTC
Created attachment 746070 [details]
build.log
Comment 2 Dmitry Baranov 2021-10-21 22:48:29 UTC
Created attachment 746073 [details]
emerge --info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-22 00:07:32 UTC
Thanks for the report. Going to run some use combo tests for leio overnight.
Comment 4 Mart Raudsepp gentoo-dev 2021-10-23 09:41:26 UTC
Please attach the correct build.log, comment 1 is from some gnome-shell extension instead
Comment 5 Arseny Solokha 2021-10-23 10:23:31 UTC
Created attachment 746259 [details]
emerge --info
Comment 6 Arseny Solokha 2021-10-23 10:23:58 UTC
Created attachment 746262 [details]
build.log
Comment 7 Yuriy Dmitriev 2021-10-23 19:33:43 UTC
Created attachment 746361 [details]
build.log compressed via xz

Build failed.
Comment 8 Yuriy Dmitriev 2021-10-23 19:57:56 UTC
In file included from /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk
-2.34.1/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordina
tedGraphics.cpp:32,
                 from /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkit-gt
k-2.34.1_build/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-35.c
pp:8:
/var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/WebKit/
WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:41:10: fatal error: WebCo
re/CoordinatedGraphicsLayer.h: No such file or directory
   41 | #include <WebCore/CoordinatedGraphicsLayer.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4818/4847] /usr/bin/x86_64-pc-linux-gnu-g++ -DBUILDING_GTK__=1 -DBUILDING_WEBKI
T -DBUILDING_WITH_CMAKE=1 -DBUILDING_WebKit -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\
Comment 9 Mart Raudsepp gentoo-dev 2021-10-25 13:10:52 UTC
There's build logs from multiple different issues here now, at least two different. One seems to be USE=-jumbo-build, which also gets triggered with USE=-opengl for me, and the other with USE=-opengl, I think. Concentrating on the WebCore/CoordinatedGraphicsLayer.h issue right now, but unsure when I have the time to get to the bottom of it.
Comment 10 Mart Raudsepp gentoo-dev 2021-10-25 13:50:33 UTC
Actually the other one is USE=-X, not -opengl
Comment 11 Yuriy Dmitriev 2021-10-25 13:51:22 UTC
(In reply to Mart Raudsepp from comment #9)
> There's build logs from multiple different issues here now, at least two
> different. One seems to be USE=-jumbo-build, which also gets triggered with
> USE=-opengl for me, and the other with USE=-opengl, I think. Concentrating
> on the WebCore/CoordinatedGraphicsLayer.h issue right now, but unsure when I
> have the time to get to the bottom of it.


Also have -opengl flag set. But +egl for wayland.


USE="X aac acl aio alsa amd64 bzip2 cairo cli conch crypt dri egl flac gdbm gtk3 http2 iconv infinality io-uring ipv6 jpeg jpeg2k libav libglvnd libtirpc  linguas_ru mmx ncurses nftables nls nptl ogg openmp pam pcre png readline rsync-verify seccomp split-usr sse sse2 ssl tcpd theora thinkpad threads truetype unicode vim-syntax vorbis vpx wayland wayland-compositor xattr xwayland zlib"
Comment 12 Mart Raudsepp gentoo-dev 2021-10-25 13:55:23 UTC
Please do not use USE=-opengl unless you are building for a weird embedded system that can't even do GLES.
Comment 13 Yuriy Dmitriev 2021-10-27 13:40:43 UTC
(In reply to Mart Raudsepp from comment #12)
> Please do not use USE=-opengl unless you are building for a weird embedded
> system that can't even do GLES.

Hi again)
Via bruteforce(all: emerge -DNu world):
make.conf +opengl; package.use: no change
make.conf -opengl; package.use: +opengl
make.conf -opengl; package.use: no change

No result. Package not compiled.

Equipment: Lenovo T420 (core-i5) && Intel NUC (Low level celeron 21'year)
2 machines.

With best wishes - YD.
Comment 14 Alex Xu (Hello71) 2021-11-14 23:28:35 UTC
(In reply to Dmitry Baranov from comment #0)
> [2655/5044] /usr/bin/x86_64-pc-linux-gnu-g++ ...
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp
> 
> FAILED:
> Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/GLContext.cpp.o
> 
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp: In function ‘bool
> WebCore::initializeOpenGLShimsIfNeeded()’:
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp:69:19: error:
> ‘initializeOpenGLShims’ was not declared in this scope; did you mean
> ‘initializeOpenGLShimsIfNeeded’?
>    69 |         success = initializeOpenGLShims();
>       |                   ^~~~~~~~~~~~~~~~~~~~~
>       |                   initializeOpenGLShimsIfNeeded
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp: In member function ‘unsigned int
> WebCore::GLContext::version()’:
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp:174:71: error: ‘::glGetString’ has
> not been declared
>   174 |         String versionString = String(reinterpret_cast<const
> char*>(::glGetString(GL_VERSION)));
>       |                                                                     
> ^~~~~~~~~~~
> /var/tmp/portage/net-libs/webkit-gtk-2.34.1/work/webkitgtk-2.34.1/Source/
> WebCore/platform/graphics/GLContext.cpp:174:83: error: ‘GL_VERSION’ was not
> declared in this scope; did you mean ‘GCC_VERSION’?
>   174 |         String versionString = String(reinterpret_cast<const
> char*>(::glGetString(GL_VERSION)));
>       |                                                                     
> ^~~~~~~~~~
>       |                                                                     
> GCC_VERSION
> 
> Reproducible: Always

(In reply to Mart Raudsepp from comment #10)
> Actually the other one is USE=-X, not -opengl

this one is from wrong rebase of opengl-without-X-fixes.patch; second chunk of Source/WebCore/platform/graphics/GLContext.cpp is already applied on 2.34.1, but both were deleted from 2.34.1-opengl-without-X-fixes.patch. rebase needs to re-include first chunk of 2.28.2-opengl-without-X-fixes.patch. iow 2.34.1-opengl-without-X-fixes.patch needs to add:

diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp
index b217988b990..1ba0eb8a482 100644
--- a/Source/WebCore/platform/graphics/GLContext.cpp
+++ b/Source/WebCore/platform/graphics/GLContext.cpp
@@ -28,6 +28,9 @@

 #if USE(GLX)
 #include "GLContextGLX.h"
+#endif
+
+#if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE)
 #include "OpenGLShims.h"
 #endif

i don't know anything about the USE=-jumbo-build though.
Comment 15 Dmitry Baranov 2021-12-21 22:28:47 UTC
same for 2.34.2
Comment 16 Yuriy Dmitriev 2021-12-22 00:07:35 UTC
(In reply to Dmitry Baranov from comment #15)
> same for 2.34.2

Today I have first success build it along this topic exists. This is like art.


You (and my) GL_* errors come from X11-opengl related include headers. Subj need +X and +opengl flags enabled.

This is stupid situation. webkit-gtk must be compiled without X11 libs and headers. GTK can do it!!!

version 2.32.4 can use flags -X -opengl as global in make.conf.
Current 2.34.2 I success compile only when set +X && +opengl in make.conf.

I am like BTS-miner. Only consume electrical power))))).
Comment 17 Yuriy Dmitriev 2021-12-22 00:13:43 UTC
I vote for rename package.
Rename from webkit-gtk to webkit-gtk-x11-opengl-gstreamer-and-more

It is unable to work under pure wayland environment.

Regards - Y.D.
Comment 18 Arseny Solokha 2021-12-22 00:28:42 UTC
(In reply to Yuriy Dmitriev from comment #17)
> It is unable to work under pure wayland environment.

Of course it can. The right solution has been posted in comment 14 weeks ago.
Comment 19 Yuriy Dmitriev 2021-12-22 00:30:55 UTC
Problem come to my love gentoo from upstream bug #220183

Introduce build switch USE_OPENGL_OR_ES
Comment 20 Yuriy Dmitriev 2021-12-22 00:35:17 UTC
(In reply to Yuriy Dmitriev from comment #19)
> Problem come to my love gentoo from upstream bug #220183
> 
> Introduce build switch USE_OPENGL_OR_ES

Forum software mistake. This is not gentoo bug. This bug number from bugs.webkit.org number 220183
Comment 21 Dmitry Baranov 2021-12-22 20:50:53 UTC
[ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl geolocation gnome-keyring gstreamer introspection jpeg2k jumbo-build opengl (seccomp) wayland X (-aqua) -avif -examples -gamepad -gles2-only -gtk-doc -lcms -libnotify -spell -systemd -test"

[ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl geolocation gles2-only gnome-keyring gstreamer introspection jpeg2k jumbo-build (seccomp) wayland -X (-aqua) -avif -examples -gamepad -gtk-doc -lcms -libnotify -opengl -spell -systemd -test"

Compilation succeeds with these two configurations.
Comment 22 Yuriy Dmitriev 2021-12-22 21:37:56 UTC
(In reply to Dmitry Baranov from comment #21)
> [ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl
> geolocation gnome-keyring gstreamer introspection jpeg2k jumbo-build opengl
> (seccomp) wayland X (-aqua) -avif -examples -gamepad -gles2-only -gtk-doc
> -lcms -libnotify -spell -systemd -test"
> 
> [ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl
> geolocation gles2-only gnome-keyring gstreamer introspection jpeg2k
> jumbo-build (seccomp) wayland -X (-aqua) -avif -examples -gamepad -gtk-doc
> -lcms -libnotify -opengl -spell -systemd -test"
> 
> Compilation succeeds with these two configurations.

Nice!!!
And what about package.use? If possible...please provide..

With best wishes - YD.
Comment 23 Yuriy Dmitriev 2021-12-23 20:41:07 UTC
(In reply to Dmitry Baranov from comment #21)
> [ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl
> geolocation gnome-keyring gstreamer introspection jpeg2k jumbo-build opengl
> (seccomp) wayland X (-aqua) -avif -examples -gamepad -gles2-only -gtk-doc
> -lcms -libnotify -spell -systemd -test"
> 
> [ebuild   R    ] net-libs/webkit-gtk-2.34.2:4/37::gentoo  USE="egl
> geolocation gles2-only gnome-keyring gstreamer introspection jpeg2k
> jumbo-build (seccomp) wayland -X (-aqua) -avif -examples -gamepad -gtk-doc
> -lcms -libnotify -opengl -spell -systemd -test"
> 
> Compilation succeeds with these two configurations.

First config working.
Second configuration also working. Tested by me. Different hardware.

Minig process complete. ))))))

With best wishes - YD.
Comment 24 Mart Raudsepp gentoo-dev 2022-01-02 22:18:37 UTC
I don't understand how fixing this patch alone will help building with USE=-opengl at this point, given bug 820443

New transient zoom support from https://bugs.webkit.org/show_bug.cgi?id=197002 implements a layerForTransientZoom unconditionally for GTK, which in turn returns and requires a CoordinatedGraphicsLayer, which only exists with USE_OPENGL_OR_ES only (which defines USE_COORDINATED_GRAPHICS and enables all that).

I will push the patch fix and a blind workaround to the build failure in bug 820443, but I suspect it'll still have problems - maybe it'll build but crash and burn at runtime or something. If issues come in, I'm inclined to drop the USE flag support to disable this, unless someone writes an upstreamable patch to wire this up for non-GL cases properly (e.g. not do transient zoom support then or something)
Comment 25 Mart Raudsepp gentoo-dev 2022-01-02 22:30:15 UTC
AH, I got thoroughly confused by the multiple build.logs here, combined with the double negative in "CMAKE_DISABLE_FIND_PACKAGE_OpenGL=OFF".

So Dmitry and Arseny are hitting the problems with USE=-X, and the fixed patch will fix it.

And Yuriy build log is hitting bug 820443 instead.
Comment 26 Larry the Git Cow gentoo-dev 2022-01-02 22:46:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4695bb5e5677e5590e5322204034c71f2ff89c63

commit 4695bb5e5677e5590e5322204034c71f2ff89c63
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2022-01-02 21:30:13 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2022-01-02 22:44:13 +0000

    net-libs/webkit-gtk: fix USE=-opengl build patch
    
    When adapting the patch to 2.34 series I saw that the latter hunk was
    included upstream now, and assumed all is fine or didn't notice I'm
    deleting multiple hunks - but the first hunk for header includes is
    still necessary.
    
    Thanks-to: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
    Closes: https://bugs.gentoo.org/819384
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 .../files/2.34.3-opengl-without-X-fixes.patch      | 46 ++++++++++++++++++++++
 net-libs/webkit-gtk/webkit-gtk-2.34.3.ebuild       |  2 +-
 2 files changed, 47 insertions(+), 1 deletion(-)