Bug 256188 - x11-toolkits/wlroots: libglvnd and X11=off trip an assert
Summary: x11-toolkits/wlroots: libglvnd and X11=off trip an assert
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-27 12:12 UTC by Ghost
Modified: 2021-05-27 20:07 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jbeich)


Attachments
a hack (727 bytes, text/plain)
2021-05-27 12:12 UTC, Ghost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ghost 2021-05-27 12:12:08 UTC
Created attachment 225307 [details]
a hack

make.conf with:

DEFAULT_VERSIONS+= gl=libglvnd,mesa-devel and stuff
OPTIONS_UNSET+= X11 XCB XLIB and stuff

Starting x11-wm/sway results in assert "wlr_egl_is_current" being tripped.
Removing said assert (patch) results in a working sway session with working desktop GL (tested via glmark2 patched to load libOpenGL.so.0 instead of libGL).

No idea if it is related to how things are with FreeBSD ports or an upstream bug.
Note that starting wayfire without this patch works and results in default gray desktop with a cursor.

Currently ENOTIME to dig into that assert, leaving the bug so it is searchable.
Comment 1 Ghost 2021-05-27 12:14:00 UTC
Note: this is with libglvnd 1.3.3 (updated locally). 1.3.2 has the same issue, I updated it to 1.3.3 to see if updating libglvnd alone can fix this.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2021-05-27 15:09:09 UTC
Can you reproduce using https://github.com/freebsd/freebsd-ports/compare/main...jbeich:wlroots-0.14 ?

Alternatively, try reproducing using unmodified upstream sources:

$ git clone https://github.com/swaywm/sway
$ git clone https://github.com/swaywm/wlroots sway/subprojects/wlroots
$ meson setup \
  --buildtype=debug \
  --force-fallback-for=wlroots \
  -Dxwayland=disabled \
  -Dwlroots:examples=false \
  -Dwlroots:x11-backend=disabled \
  -Dwlroots:xcb-errors=disabled \
  -Dwlroots:xwayland=disabled \
  sway_build sway
$ meson compile -C sway_build
$ sway_build/sway/sway -c /path/to/test-sway.conf

I couldn't reproduce myself with GL_DEFAULT=libglvnd,mesa-libs (mesa-devel uses libmap.conf) but only tested sway+wlroots without X11.
Comment 3 Ghost 2021-05-27 20:07:11 UTC
This issue was in cairo. I was hesitant to upgrade it to 1.7.4 after seeing the GLX PR and reverted that commit locally, but the new version has the required fixes.

1.7.4 is regressed and can't build with the Desktop GL as before, but GLESV2 is OK:
https://svnweb.freebsd.org/ports?view=revision&revision=538507

Thanks for how-to about building wlroots from git with the debug symbols; I'm sure this will help in future, and sorry for the noise.