Bug 258269 - graphics/libglvnd: update to 1.3.4
Summary: graphics/libglvnd: update to 1.3.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL: https://gitlab.freedesktop.org/glvnd/...
Keywords: patch, patch-ready
: 258434 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-05 03:02 UTC by Jan Beich
Modified: 2021-09-17 17:16 UTC (History)
5 users (show)

See Also:
zeising: maintainer-feedback+
antoine: exp-run+


Attachments
v1 (apply via "git am") (2.05 KB, patch)
2021-09-05 03:02 UTC, Jan Beich
no flags Details | Diff
v1.1 (apply via "git am") (2.40 KB, patch)
2021-09-05 18:20 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2021-09-05 03:02:14 UTC
Created attachment 227664 [details]
v1 (apply via "git am")

- See URL for upstream changes
- Optionally required by https://github.com/swaywm/wlroots/commit/101b9a193d91 and https://github.com/swaywm/wlroots/commit/3cf2535c2339
- EGL headers update is slightly risky but not as much as graphics/mesa-dri/files/patch-compat-include-guards removal was.

Builds fine (poudriere testport):
- 11.4 amd64/i386
- 12.2 aarch64/amd64/i386
- 13.0 amd64/i386
- 14.0 aarch64/amd64/armv6/armv7/i386
Comment 1 Gerald Pfeifer freebsd_committer 2021-09-05 10:12:09 UTC
Also the current version in the tree does not fetch. 

Can you please expedite pushing this into the tree? Thank you!


===>  Cleaning for libglvnd-1.3.3
:
=> glvnd-libglvnd-0f0d49f0f3707f26f68bc44f4cd83144f5f4de86_GL0.tar.gz doesn't seem to exist in /home/gerald/ports/distfiles/.
=> Attempting to fetch https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/0f0d49f0f3707f26f68bc44f4cd83144f5f4de86.tar.gz?dummy=/glvnd-libglvnd-0f0d49f0f3707f26f68bc44f4cd83144f5f4de86_GL0.tar.gz
fetch: https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/0f0d49f0f3707f26f68bc44f4cd83144f5f4de86.tar.gz?dummy=/glvnd-libglvnd-0f0d49f0f3707f26f68bc44f4cd83144f5f4de86_GL0.tar.gz: Gateway Time-out
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/glvnd-libglvnd-0f0d49f0f3707f26f68bc44f4cd83144f5f4de86_GL0.tar.gz
fetch: http://distcache.FreeBSD.org/ports-distfiles/glvnd-libglvnd-0f0d49f0f3707f26f68bc44f4cd83144f5f4de86_GL0.tar.gz: Not Found
=> Couldn't fetch it
Comment 2 Jan Beich freebsd_committer 2021-09-05 18:20:27 UTC
Created attachment 227691 [details]
v1.1 (apply via "git am")

- Drop -DEGL_NO_X11 (already default) when libglvnd is built with X11 disabled
Comment 3 commit-hook freebsd_committer 2021-09-05 18:21:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=faa54c8325903424349630d2e80942ed881fb594

commit faa54c8325903424349630d2e80942ed881fb594
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-05 18:12:10 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-05 18:21:02 +0000

    x11-toolkits/qt5-gui: unbreak with libglvnd >= 1.3.4

    executing config test egl-x11
    [...]
    > main.cpp:13:14: error: cannot initialize a variable of type 'Display *' (aka '_XDisplay *') with an rvalue of type 'EGLNativeDisplayType' (aka 'void *')
    >     Display *dpy = EGL_DEFAULT_DISPLAY;
    >              ^     ~~~~~~~~~~~~~~~~~~~
    [...]
    QPA backends:
      XCB:
        GL integrations:
          EGL-X11 Plugin ..................... no
    [...]
    ====> Checking for pkg-plist issues (check-plist)
    ===> Parsing plist
    ===> Checking for items in STAGEDIR missing from pkg-plist
    ===> Checking for items in pkg-plist which are not in STAGEDIR
    Error: Missing: %%QT_CMAKEDIR%%/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake
    Error: Missing: %%QT_PLUGINDIR%%/xcbglintegrations/libqxcb-egl-integration.so
    ===> Error: Plist issues found.
    *** Error code 1

    PR:             258269
    See also:       https://bugs.gentoo.org/810343

 .../qt5-gui/files/patch-src_gui_configure.json (new)     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Comment 4 commit-hook freebsd_committer 2021-09-05 18:21:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3f23fec4c93a16578e357f551bb0205c1b947c16

commit 3f23fec4c93a16578e357f551bb0205c1b947c16
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-05 18:15:04 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-05 18:21:03 +0000

    www/webkit2-gtk3: unbreak with libglvnd >= 1.3.4

    Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp:132:5: error: unknown type name 'XVisualInfo'
        XVisualInfo visualTemplate;
        ^
    Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp:136:5: error: unknown type name 'XVisualInfo'
        XVisualInfo* visualInfo = XGetVisualInfo(m_display, VisualScreenMask, &visualTemplate, &visualCount);
        ^
    Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp:136:57: error: use of undeclared identifier 'VisualScreenMask'
        XVisualInfo* visualInfo = XGetVisualInfo(m_display, VisualScreenMask, &visualTemplate, &visualCount);
                                                            ^

    PR:             258269

 ...tform_graphics_x11_PlatformDisplayX11.cpp (new) | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
Comment 5 Jan Beich freebsd_committer 2021-09-05 18:31:34 UTC
https://github.com/KhronosGroup/EGL-Registry/commit/64aa561f1971 needs more testing.
Comment 6 Evgeniy Khramtsov 2021-09-05 18:35:47 UTC
(In reply to commit-hook from comment #3)

According to repology, Linux distro crux which has 1.3.4 used eglplatform.h from mesa instead:
https://crux.nu/ports/crux-3.6/xorg/libglvnd/Pkgfile
https://crux.nu/ports/crux-3.6/xorg/libglvnd/eglplatform.h

Maybe do the same? I didn't diff their eglplatform.h; currently busy with something else.
Comment 7 Evgeniy Khramtsov 2021-09-05 19:03:57 UTC
(In reply to Evgeniy Khramtsov from comment #6)

Nevermind, seems to be an older eglplatform.h.
Comment 8 Jan Beich freebsd_committer 2021-09-05 20:52:25 UTC
x11@ team, I may need an *advance* approval to avoid QA deadlock a la bug 246767.
Comment 9 Niclas Zeising freebsd_committer 2021-09-06 10:17:45 UTC
I am not sure what you mean with advance approval.  Either it is ready, or it is not?  If we are waiting for an exp-run, then that should be done first.

Does libglvnd not have any release tarballs, instead of fetching from gitlab?

I see no problem with this, if the exp run is OK.
Comment 10 Jan Beich freebsd_committer 2021-09-06 11:15:09 UTC
(In reply to Niclas Zeising from comment #9)
> Does libglvnd not have any release tarballs, instead of fetching from gitlab?

See https://repology.org/project/libglvnd/information#Downloads If you don't like GL_COMMIT (bug 242329) then I can convert to USE_GITHUB (mirror, old home). However, this would be a minor scope creep.
Comment 11 Jan Beich freebsd_committer 2021-09-06 11:41:15 UTC
(In reply to Jan Beich from comment #10)
> I can convert to USE_GITHUB (mirror, old home)

See bug 258314 but I'm not good as devil's advocate, so the rationale maybe gibberish.
Comment 13 commit-hook freebsd_committer 2021-09-10 04:33:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4b052e44639b8c7f1fb6f48d239015a7429df46f

commit 4b052e44639b8c7f1fb6f48d239015a7429df46f
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-10 03:24:37 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-10 04:33:04 +0000

    emulators/qemu31: unbreak with libglvnd >= 1.3.4

    In file included from ui/egl-helpers.c:21:
    include/ui/egl-helpers.h:46:55: error: unknown type name 'Window'
    EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
                                                          ^
    ui/egl-helpers.c:276:55: error: unknown type name 'Window'
    EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
                                                          ^

    PR:             258269
    Reported by:    antoine (via exp-run)

 emulators/qemu31/files/patch-egl-no-x11 (new) | 53 +++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
Comment 14 commit-hook freebsd_committer 2021-09-10 04:33:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=401356c68dd0b526acfd0e75b83da32001628c06

commit 401356c68dd0b526acfd0e75b83da32001628c06
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-10 02:18:27 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-10 04:32:45 +0000

    x11/slop: unbreak with libglvnd >= 1.3.4

    src/framebuffer.cpp:55:9: error: use of undeclared identifier 'XDestroyImage'; did you mean 'XDestroyIC'?
            XDestroyImage( image );
            ^~~~~~~~~~~~~
            XDestroyIC
    /usr/local/include/X11/Xlib.h:3867:13: note: 'XDestroyIC' declared here
    extern void XDestroyIC(
                ^
    src/framebuffer.cpp:55:24: error: cannot initialize a parameter of type 'XIC' (aka '_XIC *') with an lvalue of type 'XImage *' (aka '_XImage *')
            XDestroyImage( image );
                           ^~~~~
    /usr/local/include/X11/Xlib.h:3869:1: note: passing argument to parameter here
    );
    ^

    PR:             258269
    Reported by:    antoine (via exp-run)

 x11/slop/Makefile | 3 +++
 x11/slop/distinfo | 2 ++
 2 files changed, 5 insertions(+)
Comment 15 commit-hook freebsd_committer 2021-09-10 04:33:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8854151b59681a4ce0b56939fa62b1ed060872ae

commit 8854151b59681a4ce0b56939fa62b1ed060872ae
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-10 02:58:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-10 04:33:04 +0000

    x11-wm/plasma5-kwin: unbreak with libglvnd >= 1.3.4

    src/plugins/platforms/x11/common/eglonxbackend.cpp:227:66: error: cannot initialize a parameter of type 'EGLNativeWindowType' (aka 'void *') with an lvalue of type 'xcb_window_t' (aka 'unsigned int')
            surface = eglCreateWindowSurface(eglDisplay(), config(), window, nullptr);
                                                                     ^~~~~~

    PR:             258269
    Reported by:    antoine (via exp-run)
    See also:       https://bugs.gentoo.org/810511

 x11-wm/plasma5-kwin/files/patch-bug440372 (new) | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Comment 16 Jan Beich freebsd_committer 2021-09-10 04:42:49 UTC
All trivial - fixed. Please, continue the exp-run.

Note, plasma5-kwin runtime was tested as following:

  $ if [ -n "$WAYLAND_DISPLAY" ]; then
      # Spawn rootful to let kwin_x11 take over as classic WM
      export DISPLAY=:$(daemon Xwayland -retro -displayfd 1 2>/dev/null)
      # Force kwin_wayland to use X11 backend i.e., nest on Xwayland
      unset WAYLAND_DISPLAY
    else
      # Prevent kwin_x11 from taking over Xorg
      export DISPLAY=:$(daemon Xephyr -retro -displayfd 1 2>/dev/null)
    fi
  $ daemon -f kwin_x11
  $ daemon -f kwin_wayland
  $ export WAYLAND_DISPLAY=$(sockstat -lu | awk '/kwin_way/ { print $6; exit }')
  $ WINIT_UNIX_BACKEND=x11 alacritty &
  $ WINIT_UNIX_BACKEND=wayland alacritty &
Comment 17 Jan Beich freebsd_committer 2021-09-11 17:21:23 UTC
*** Bug 258434 has been marked as a duplicate of this bug. ***
Comment 18 Niclas Zeising freebsd_committer 2021-09-15 08:36:12 UTC
I was merely curious about the release tar ball, I don't think it is necessary to switch to use the one from the github mirror.

What is the status of the exp-run?
Comment 19 Antoine Brodin freebsd_committer 2021-09-15 12:30:01 UTC
Exp-run looks fine
Comment 20 Jan Beich freebsd_committer 2021-09-15 14:04:55 UTC
I'm still waiting for approval.
Comment 21 Jan Beich freebsd_committer 2021-09-15 17:27:03 UTC
FWIW, the next package build starts in ~8 hours at 25:00 UTC today (aka 01:00 UTC tomorrow). vulkan-{headers,loader} and libxkbcommon updates would trigger rebuild of all consumers gtk3/gtk4/qt5-gui/sdl2 consumers until https://github.com/freebsd/poudriere/issues/822. Having libglvnd in the same bandwagon would help "poudriere bulk -b <branch>" users to not wait again.
Comment 22 Niclas Zeising freebsd_committer 2021-09-17 15:12:19 UTC
(In reply to Jan Beich from comment #21)
I was pretty clear in Comment #9 that this was OK if the exp run was clean.
Comment 23 commit-hook freebsd_committer 2021-09-17 17:16:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=841c9c30cb0c72335ffcf1d42d82f3271de64d2f

commit 841c9c30cb0c72335ffcf1d42d82f3271de64d2f
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-09-05 02:55:58 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-09-17 17:14:55 +0000

    graphics/libglvnd: update to 1.3.4

    - graphics/egl-wayland: drop libglvnd < 1.3.4 workaround
    - x11-toolkits/wlroots: rebuild to enable EGL_EXT_device_persistent_id

    Changes:        https://gitlab.freedesktop.org/glvnd/libglvnd/-/compare/v1.3.3...v1.3.4
    PR:             258269
    Exp-run by:     antoine
    Approved by:    zeising

 graphics/egl-wayland/Makefile | 2 --
 graphics/egl-wayland/distinfo | 2 --
 graphics/libglvnd/Makefile    | 6 ++----
 graphics/libglvnd/distinfo    | 6 +++---
 x11-toolkits/wlroots/Makefile | 1 +
 5 files changed, 6 insertions(+), 11 deletions(-)