Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland? #119

Closed
ghost opened this issue Mar 22, 2022 · 9 comments
Closed

Wayland? #119

ghost opened this issue Mar 22, 2022 · 9 comments

Comments

@ghost
Copy link

ghost commented Mar 22, 2022

Running the hello world example for me is producing on wayland native is producing this error:

INFO: Initializing raylib 3.7
WARNING: GLFW: Error: 65544 Description: X11: The DISPLAY environment variable is missing
WARNING: GLFW: Failed to initialize GLFW
thread 'main' panicked at 'Attempting to create window failed!', /home/yujiri/.cargo/registry/src/github.mirror.nvdadr.com-1ecc6299db9ec823/raylib-3.7.0/src/core/mod.rs:208:13

I heard from the Nim bindings that Raylib is supposed to support Wayland, so does anyone know what I'd need to do to get that to work here? I tried installing packages for raylib and glfw-wayland just incase but that didn't have any effect.

OS: Artix Linux

@ghost
Copy link
Author

ghost commented Apr 17, 2022

Update: the upstream Raylib examples do not work out of the box for me either, so this is not an issue with raylib-rs. My apologies.

@ghost ghost closed this as completed Apr 17, 2022
@ghost
Copy link
Author

ghost commented Apr 17, 2022

Update! I traced the issue with raylib upstream through glfw to me not having wayland-protocols installed. After installing that and rebuilding, raylib works natively on wayland for me, raylib-rs still does not.

@the-gremlin
Copy link

the-gremlin commented Jul 8, 2022

wouldn't this issue be resolved after #127 was merged?

@ghost
Copy link
Author

ghost commented Jul 27, 2022

Ah! Sorry, I didn't get a notification on this. Using the master version, I got a project using this crate to build but it segfaults on start, just after saying INFO: Initializing raylib 3.7.

@ghost
Copy link
Author

ghost commented Jul 27, 2022

I wonder if this could have to do with libc issues. I've switched to a musl distribution (Alpine) since

@ghost
Copy link
Author

ghost commented Jul 27, 2022

Indeed, it seems to work back on my Artix installation. RIP

@ghost
Copy link
Author

ghost commented Jul 30, 2022

I checked out upstream raylib 3.7 and could run the examples on my system without segfault

@ghost
Copy link
Author

ghost commented Aug 1, 2022

Update: by editing the downloaded C source in ~/.cargo/git/checkouts, I deducated that the problem is some sort of failure to load glfw, as the segfault occurs at the first call to glfw.

I don't know why. I've got glfw-wayland-dev installed, and the compiled binary for my project when examined with ldd shows:

	/lib/ld-musl-x86_64.so.1 (0x7f3ed4a31000)
	libglfw.so.3 => /usr/lib/libglfw.so.3 (0x7f3ed47cf000)
	libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x7f3ed47be000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f3ed4a31000)
	libffi.so.8 => /usr/lib/libffi.so.8 (0x7f3ed47b1000)

(interestingly, for some reason if built in x mode, ldd shows only ld-musl-x86_64)

@ghost
Copy link
Author

ghost commented Aug 14, 2022

Whoa, this workaround solved it for me!

@ghost ghost closed this as completed Aug 14, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant