glfw: Illegal instruction in pollEvents() #75
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code
while the above code running, if you press a keyboard key that will crash with this messsage:
i think this is because currently mach can't build for wayland
Hi @AliChraghi - thanks for the bug report! A few things:
I believe that @silversquirl's patch in https://github.com/hexops/mach/pull/72 likely fixes this, please try again and let me know. I do not think it is caused by any mismatch of Wayland vs. X11 support but rather is undefined behavior being caught in the GLFW source code by Zig / UBSan.
You can build for Wayland if you like today by changing your
build.zig:It should "just work", but there may be unknown issues present. I wouldn't advise doing this however as GLFW's Wayland backend is still very immature, in the next version of GLFW there will be support for choosing between X11 and Wayland backends at runtime and so we will begin building for both by default. https://github.com/glfw/glfw/pull/1958
-Drelease-fasttemporarily as that will have Zig disable UBSan - until we track down the source of the undefined behavior and patch it in GLFW source code.thank you! #72 worked for X11. but adding
.linux_window_manager = .Waylandcause build error. i believe that's because:build.ziggithub.com/hexops/mach@82a9cf616d/glfw/build.zig (L126)lib/glfw/upstream/glfw/srccalledwayland-xdg-shell-client-protocol.h.Ahh, okay. I will see if I can fix this soon (unless someone wants to try and sends PRs for it!)
You're right about the typo.
For wayland-xdg-shell, we will need to add the right apt packages to the
fecth.shscript here so our SDK has the headers/libs so we can cross compile. https://github.com/hexops/sdk-linux-x86_64Filed https://github.com/hexops/mach/issues/76 and https://github.com/hexops/mach/issues/77 to track these two issues. I will close this one since the original illegal instruction issue is fixed.