Created attachment 192508 [details] add WAYLAND to OPTIONS_DEFAULT Hi there kde@ would like (read "needs") the wayland parts of mesa-libs to be able to import the Plasma 5 desktop into FreeBSD (even for the X11 based session). Otherwise it will be impossible to provide official binary packages, as libEGL-parts are missing in the standard mesa-libs package. I'd would be great if this could be changed :) mfg Tobias
Hi, I support this change very much, but also please look at bug 227423. libwayland-egl lives in the official libwayland distribution since 1.15! The patch I posted there enables qt5-wayland to be built by default.
This needs more thought, since I don't want to add wayland dependencies by default to mesa. One idea is to separate out the wayland bits of mesa into a separate port. I haven't looked at the details right now though. We also have to ensure that we don't break platforms without llvm, since wayland requires llvm, at least according to comments in the makefile. This needs further discussion.
(In reply to Niclas Zeising from comment #2) Gallium (required for EGL) depends on LLVM, not Wayland. This is handled in the current port correctly. Please read it carefully: https://github.com/freebsd/freebsd-ports/blob/d334f82120c2749ac67a9df2c3d8d8f354ac5447/graphics/mesa-libs/Makefile#L26-L40 EGL *is* already enabled by default on platforms with LLVM. Adding Wayland support to EGL/DRI2 wouldn't mess with anything else. graphics/wayland is a small dependency, 1mb on amd64, and pretty much all the desktop things depend on it. You can't "separate out the wayland bits". libgbm is linked to libwayland-server, libEGL to both -server and -client. You could make a nowayland flavor for people hell bent on saving one megabyte of disk space :)
Sorry, I had my wires crossed a bit. In fact we should be able to build the X11 part of Plasma5 without this change. But I none the less think, that this change is very non-invasive and does more good than bad :)
(In reply to Greg V from comment #3) Hi Greg, related to Niclas Zeising's idea to "separate wayland bits from mesa-libs". To my knowledge currently it is impossible to install/use anything Wayland-related without Xorg installed because mesa-libs pulls a lot of Xorg-related stuff as dependencies. So this is not only about saving few megabytes on a disk but also about removing garb... eh.. dark legacy (Xorg) from system... Do you think it is the right way to keep Wayland(compositor part) tightly tied to libX11/Xorg? Maybe it is somehow possible to make a noXorg flavor for people hell bent on getting rid of Xorg? :) Regards, Denis
(In reply to Denis Polygalov from comment #5) Oh yeah, that should definitely be possible. With the Meson build system (see https://github.com/myfreeweb/freebsd-ports-dank/blob/master/graphics/mesa-dev/Makefile for an alternative mesa port using it), you should be able to pass -Dplatforms=wayland,drm,surfaceless -Dglx=disabled and get an X-free build. Of course something similar is possible with the old configure script. So it shouldn't be too hard to have port options for X11 and WAYLAND and default|nox11|nowayland flavors that set these options.
Bug 227423 will tackle libwayland-egl issue. WAYLAND=on is still required for other things (Vulkan, libEGL). So, let's change the default to facilitate testing/maintenance. https://lists.freebsd.org/pipermail/freebsd-x11/2017-December/020288.html (In reply to Niclas Zeising from comment #2) > This needs more thought, since I don't want to add wayland dependencies by default to mesa. What benefit do you expect from neglecting Wayland support? X11 isn't going away but in future more Wayland-only apps may appear. > One idea is to separate out the wayland bits of mesa into a separate port. > I haven't looked at the details right now though. Let's not undo bug 218799. Splitting ports adds to maintenance cost and introduces intradependencies (i.e., dependencies in-between parts, including loops). Moving into a flavor won't work until the ports framework supports package alternatives aka variable dependencies, so direct and indirect consumers don't add up in a conflict between flavored and unflavored dependency. > We also have to ensure that we don't break platforms without llvm, > since wayland requires llvm, at least according to comments in the > makefile. Not Wayland but libEGL. Affects only sparc64. Is it that hard to add OPTIONS_EXCLUDE_sparc64=WAYLAND ?
Created attachment 198188 [details] v0
Comment on attachment 198188 [details] v0 Backend choice is not dynamic in glfw at the moment and enabling WAYLAND by default would disable Xorg support. Probably best to leave it off by default for now there.
(In reply to Tobias Kortkamp from comment #9) Yeah might be a good idea to flavorize glfw until they land https://github.com/glfw/glfw/pull/1338
Created attachment 198417 [details] v1 Does this look reasonable? A minor inconvenience to ensure Wayland build never regresses. X11 runtime should be unaffacted (tested mpv/vaapi and firefox). If something goes wrong some or all parts can be reverted. There's plenty of time before the next /quarterly is branched. I'm counting towards maintainer timeout. Review/comments are welcome from anyone. No cookie licking, please.
Comment on attachment 198417 [details] v1 gecko@ would prefer gnome@ enable WAYLAND in x11-toolkits/gtk30 but, otherwise, prepared to create and maintain a slave port.
Off to portmgr@ to check for unexpected bustage in case Wayland support is auto-enabled in consumers.
I have no objection and so approve, regarding the ports I maintain. I have never used wayland though and never tested the WAYLAND options at runtime, though.
Comment on attachment 198417 [details] v1 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile [...] @@ -12,6 +12,7 @@ USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence xv xvmc OPTIONS_DEFINE= TEXTURE VAAPI VDPAU WAYLAND OPTIONS_DEFAULT=TEXTURE +OPTIONS_DEFAULT=WAYLAND This doesn't look right.
Created attachment 198419 [details] v1 (In reply to Tobias Kortkamp from comment #15) Mismerge: TEXTURE is gone in bug 230298. Thanks for catching!
Created attachment 198710 [details] v1.1 - Enable Wayland for sdl20 consumers (e.g., ppsspp) - Rebase bumps after ports r482830, ports r482993
portmgr@, are you planning to wait for timeout (in case of disapproval) before exp-run? I'd like to start fixing consumers in advance (of maintainer timeouts and bug 232729 testing). Ignore FreeBSD 10.* due to EOL, lack of evdev(4) and _EXCLUDE=WAYLAND in some ports. After a week of dogfooding this and a few other Mesa patches in X11 environment and all my poudriere jails while landing unrelated stuff (e.g., bug 232525) I didn't notice any regressions. x11@ is silent about what else is missing. It's kinda boring. ;)
I would like to discuss this with the rest of the graphics team. We have our next VC meeting next week, and I hope this can remain until then, especially since there has not been an exp-run done yet.
(In reply to Niclas Zeising from comment #19) Previous discussion happened in https://lists.freebsd.org/pipermail/freebsd-x11/2017-December/020288.html After that johalun outlined plan of action in https://lists.freebsd.org/pipermail/freebsd-x11/2018-January/020410.html seeking amendments, assuming a decision has been reached. kde@ and gnome@ completed their own items. I've landed mesa-dri/sdl20 patches and handled sparc64. In bug 232767 johalun confirmed compositors are outside of scope at this stage. Everything looks OK but the full picture won't be known until this lands. Anyway, set a deadline for reaching a (new) decision. Not something ambiguous like "next week" just for (another) discussion.
The plan for the plan has always been to reach a decision at our next conference call.
(In reply to Warner Losh from comment #21) at least as far as the base drm / video drivers is concerned.
Created attachment 198928 [details] v1.2 - Add graphics/gstreamer1-plugins-gl - Revert to RUN_DEPENDS in ppsspp as sdl20 now pulls Wayland - Rebase after ports r483514, ports r483567, ports r483650, ports r483807
Created attachment 199012 [details] v1.2 - Rebase after ports r484273 - Don't bump PORTEPOCH in vlc3 ;) Sorry for the noise. I didn't realize there would be so much (mostly rebase) churn in order to pick phabricator for review.
Comment on attachment 199012 [details] v1.2 Approve by the graphics team.
New failure on 11.2 amd64: http://package22.nyi.freebsd.org/data/112amd64-default-PR227509/2018-11-09_09h20m09s/logs/errors/piglit-20180910.log New failures on 11.2 i386: http://package23.nyi.freebsd.org/data/112i386-default-PR227509/2018-11-09_09h20m18s/logs/errors/piglit-20180910.log http://package23.nyi.freebsd.org/data/112i386-default-PR227509/2018-11-09_09h20m18s/logs/errors/gnucash-3.3_1.log
(In reply to Antoine Brodin from comment #26) gnucash may be false positive
A commit references this bug: Author: jbeich Date: Sun Nov 11 23:23:12 UTC 2018 New revision: 484785 URL: https://svnweb.freebsd.org/changeset/ports/484785 Log: graphics/waffle: track graphics/wayland dependency ====> Running Q/A tests (stage-qa) Error: /usr/local/lib/libwaffle-1.so.0.5.2 is linked to /usr/local/lib/libwayland-client.so.0 from graphics/wayland but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libwayland-client.so:graphics/wayland Error: /usr/local/lib/libwaffle-1.so.0.5.2 is linked to /usr/local/lib/libwayland-egl.so.1 from graphics/wayland but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libwayland-egl.so:graphics/wayland PR: 227509 Reported by: antoine (via exp-run) Changes: head/graphics/waffle/Makefile
A commit references this bug: Author: jbeich Date: Sun Nov 11 23:23:27 UTC 2018 New revision: 484786 URL: https://svnweb.freebsd.org/changeset/ports/484786 Log: graphics/piglit: track graphics/wayland dependency CMake Error at CMakeLists.txt:162 (message): Wayland support requires xkbcommon. Failed to find xkbcommon library. PR: 227509 Reported by: antoine (via exp-run) Changes: head/graphics/piglit/Makefile
A commit references this bug: Author: jbeich Date: Sun Nov 11 23:23:41 UTC 2018 New revision: 484787 URL: https://svnweb.freebsd.org/changeset/ports/484787 Log: deskutils/cairo-dock: track more dependencies ====> Running Q/A tests (stage-qa) Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libdbus-1.so.3 from devel/dbus but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libdbus-1.so:devel/dbus Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libGLU.so.1 from graphics/libGLU but it is not declared as a dependency Warning: you need USE_GL+=glu Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libGL.so.1 from graphics/mesa-libs but it is not declared as a dependency Warning: you need USE_GL+=gl Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libwayland-client.so.0 from graphics/wayland but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libwayland-client.so:graphics/wayland Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libXcomposite.so.1 from x11/libXcomposite but it is not declared as a dependency Warning: you need USE_XORG+=xcomposite Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libXrandr.so.2 from x11/libXrandr but it is not declared as a dependency Warning: you need USE_XORG+=xrandr Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libX11.so.6 from x11/libX11 but it is not declared as a dependency Warning: you need USE_XORG+=x11 Error: /usr/local/bin/cairo-dock is linked to /usr/local/lib/libXinerama.so.1 from x11/libXinerama but it is not declared as a dependency Warning: you need USE_XORG+=xinerama PR: 227509 Reported by: antoine (via exp-run) Changes: head/deskutils/cairo-dock/Makefile
(In reply to Antoine Brodin from comment #26) > http://package23.nyi.freebsd.org/data/112i386-default-PR227509/2018-11-09_09h20m18s/logs/errors/piglit-20180910.log Fixed along with its dependency. graphics/piglit + WAYLAND=OFF: https://ptpb.pw/OKea graphics/piglit + WAYLAND=ON: https://ptpb.pw/n8MA > http://package23.nyi.freebsd.org/data/112i386-default-PR227509/2018-11-09_09h20m18s/logs/errors/gnucash-3.3_1.log "Segmentation fault" maybe transient. It builds fine on 11.2 i386 here.
A commit references this bug: Author: jbeich Date: Sun Nov 11 23:54:11 UTC 2018 New revision: 484788 URL: https://svnweb.freebsd.org/changeset/ports/484788 Log: graphics/mesa-libs: enable WAYLAND by default here and in consumers PR: 227509 Requested by: Johannes Lundberg, Greg V Reviewed by: tobik (earlier version) Approved by: madpilot, x11 (zeising), maintainer timeout (2 weeks) Exp-run by: antoine Changes: head/UPDATING head/deskutils/cairo-dock/Makefile head/devel/sdl20/Makefile head/emulators/ppsspp/Makefile head/graphics/gstreamer1-plugins-gl/Makefile head/graphics/mesa-dri/Makefile head/graphics/mesa-libs/Makefile head/graphics/piglit/Makefile head/graphics/waffle/Makefile head/mail/thunderbird/Makefile head/multimedia/libva/Makefile head/multimedia/libva-utils/Makefile head/multimedia/mpv/Makefile head/multimedia/vlc3/Makefile head/sysutils/gnome-control-center/Makefile head/www/firefox/Makefile head/www/firefox/Makefile.options head/www/firefox-esr/Makefile head/www/webkit2-gtk3/Makefile head/x11-toolkits/gtk30/Makefile
Leaving open for 1 week to collect pointy hats.
WAYLAND=on causes problems with Firefox (a opening window problem) reported on irc freebsd (PR should/will follow).
(In reply to w.schwarzenfeld from comment #34) That was never properly reported. Upstream also enabled Wayland *build* since Firefox 65. https://bugzilla.mozilla.org/show_bug.cgi?id=1501218