fix(ci): enable Wayland in linux Desktop wheel builds#199
fix(ci): enable Wayland in linux Desktop wheel builds#199banteg wants to merge 1 commit intoelectronstudio:masterfrom
Conversation
|
I believe the official raylib releases don't enable Wayland because it's still considered problematic? I think they tried it and then disabled it again? Anyway I don't think we should change something like this for 5.5. Maybe for 5.6. |
|
Yeah official policy still seems to be it's not ready for use. https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#wayland |
|
I reported the initial bug report when trying out crimson. I confirm this patch does fix the issue. |
|
Thanks for the pointer. I read through the wiki + linked issues/PRs in raylib. My understanding now is you’re right that upstream intentionally keeps Wayland off by default in current raylib. Makefile default: raysan5/raylib#4369 So changing defaults in 5.5 is likely not the right move. For clarity, this seems to be the key maintainer decision point:
And separately, found this on the wiki warning being stale:
Given that, I’m happy to align with project policy and not force-enable Wayland for 5.5 wheels. I think at this point we can close this PR and then we can revisit default behavior when upstream policy changes in 5.6+. |
|
People seem to still have problems when Wayland is enabled on high dpi displays and when getting mouse coords. What was the Crimson bug this solves? Have you tried raylib_sdl, it's generally better than the default glfw? |
|
Looks like the solution for Crimson would be "install xwayland" in the instructions? |
|
the crimson bug was: so this is an early display/window backend init issue. i also checked x86_64/i686: still X11-oriented; aarch64: includes wayland markers (WAYLAND_DISPLAY, SDL Wayland video driver, wl_display*) so recommending given upstream policy and wayland issues with hidpi and mouse coords, i agree we should not flip defaults in 5.5. i'll document xwayland + libX11 as the crimson workaround for pypi-wheel installs on my side. |
Summary
This PR makes Linux Desktop wheels Wayland-capable by building raylib/GLFW with both Wayland and X11 backends enabled.
It addresses failures like:
GLFW: Error: 65544 Description: X11: Failed to load XlibGLFW: Failed to initialize GLFWon Wayland-only environments that do not have Xlib available.
Root Cause
Current Linux Desktop wheel builds compile raylib with default GLFW options, which effectively produce X11-only Desktop artifacts for our published wheels.
For Linux jobs, we were building with
-DPLATFORM=Desktopbut without explicitly enablingGLFW_BUILD_WAYLAND.There is also a builder-image compatibility issue:
ubuntu16-modernmanylinux builder has an olderwayland-scanner.private-code, which that older scanner does not support.What Changed
All changes are in the Linux wheel workflow (
.github/workflows/build.yml).1) Linux x86_64 Desktop wheels (
build-linuxjob)raylib-platform == Desktop:wayland-protocols.private-code->code.-DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=ON.2) Linux i686 Desktop wheels (
build-linux32job)wayland-protocols.private-code->codecompatibility rewrite.-DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=ON.3) Linux arm64 Desktop wheels (
build-linux-arm64job)wayland-protocolsto apt packages.raylib-platform == Desktop, pass:-DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=ON.Scope / Non-Goals
Why This Is Safe
Validation
I validated this in the same legacy builder context used for manylinux Desktop wheels (
electronstudio/ubuntu16-modern):wayland-scannerandprivate-code._raylib_cffibinary contains both symbols:_glfwConnectWayland_glfwConnectX11This confirms the artifact is dual-backend capable.
Downstream Impact
This should unblock Wayland-only users (including
uvxusers of downstream apps that depend onraylib) without requiring distro/Nix-specific repackaging workarounds.Follow-up (optional)
Once the manylinux builder image is modernized, we can remove the temporary
private-codecompatibility rewrite and keep only explicitGLFW_BUILD_WAYLAND=ON.