Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
646 stars 119 forks source link

Does not work with Wayland #157

Open Raff727 opened 2 weeks ago

Raff727 commented 2 weeks ago

I am running Debian 13 testing with the standard configuration of Gnome which uses Wayland

First of all normal raylib examples compile and run normally so it's not an issue with something outside of these bindings. What i have tried for raylib-zig:

.linkSystemLibrary("wayland-client"); .linkSystemLibrary("wayland-cursor"); .linkSystemLibrary("wayland-egl"); .linkSystemLibrary("xkbcommon");

and yet even though it compiles i get this error when i try to run the program: INFO: Initializing raylib 5.5-dev INFO: Platform backend: DESKTOP (GLFW) INFO: Supported raylib modules: INFO: > rcore:..... loaded (mandatory) INFO: > rlgl:...... loaded (mandatory) INFO: > rshapes:... loaded (optional) INFO: > rtextures:. loaded (optional) INFO: > rtext:..... loaded (optional) INFO: > rmodels:... loaded (optional) INFO: > raudio:.... loaded (optional) WARNING: GLFW: Error: 65544 Description: Wayland: Failed to load libwayland-client WARNING: GLFW: Failed to initialize GLFW Segmentation fault at address 0x0 ???:?:?: 0x0 in ??? (???) fish: Job 1, './zig-out/bin/tetris' terminated by signal SIGABRT (Abort)

Not-Nik commented 2 weeks ago

Could you try, in addition to your linkSystemLibrary calls, to add raylib_artifact.defineCMacro("_GLFW_WAYLAND", null);

Raff727 commented 2 weeks ago

Sadly this doesn't change anything

LunarWarg commented 2 days ago

On arch with wayland (hyprland) I can't reproduce this. 2024-10-17-094854_hyprshot

Are you using Nvidia? https://wiki.debian.org/Wayland : "GDM (GNOME Display Manager) will automatically use Wayland when supported, except when using the proprietary NVIDIA driver, in which case it will fall back to X11 due to instability."

Raff727 commented 2 days ago

No I'm using an integrated specifically that of an i7-1185G7. And echo "$XDG_SESSION_TYPE gives me wayland, as well as the examples of normal raylib which give the same INFO statement as in your screenshot.