Comments (5)
Hi @alichraghi - thanks for the bug report! A few things:
-
I believe that @silversquirl's patch in #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
:
-glfw.link(b, exe, .{});
+glfw.link(b, exe, .{.linux_window_manager = .Wayland});
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. glfw/glfw#1958
- If you continue to run into such illegal instruction crashes, you can workaround them by building with
-Drelease-fast
temporarily as that will have Zig disable UBSan - until we track down the source of the undefined behavior and patch it in GLFW source code.
from mach.
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.sh
script here so our SDK has the headers/libs so we can cross compile. https://github.com/hexops/sdk-linux-x86_64
from mach.
i think this is because currently mach can't build for wayland
from mach.
thank you! #72 worked for X11. but adding .linux_window_manager = .Wayland
cause build error. i believe that's because:
- typing mistake in
build.zig
- .Wayland => "_D_GLFW_WAYLAND",
+ .Wayland => "-D_GLFW_WAYLAND",
Line 126 in 82a9cf6
- there's a missing header file in
lib/glfw/upstream/glfw/src
calledwayland-xdg-shell-client-protocol.h
.
from mach.
Filed #76 and #77 to track these two issues. I will close this one since the original illegal instruction issue is fixed.
from mach.
Related Issues (20)
- core: Frequency logic needs more extensive tests
- finish and document our novel/unique event system
- flac/opus: move sysaudio examples into main repo
- mach: `zig build run-sprite2d` on macOS cmd+q to quit the application crashes, closing the window via button does not.
- finish replacing direct3d-headers with directx-headers package
- editor: should not directly depend on spirv_cross, spirv_tools, sysgpu
- examples: should not depend on anything but mach
- mach: use b.lazyDependency where possible
- Tracking issue: priorities of real-world Mach users
- get pixi working with sysgpu with Linux/Vulkan backend
- ecs: `General protection exception (no address available)` HOT 2
- all: nominate Zig 2024.05 HOT 2
- testing: reconsider expect/got order
- mach: ensure usage-as-dependency does not involve building all examples, basisu
- verify aftersun/pixi are quick to build, and file size of deps on disk is reasonable
- core: improve entrypoint API / docs
- 32 bit windows does not compile
- sysaudio: verify that we have a sane latency in all backends HOT 1
- all: use lazyDependency to optimize dependency fetching
- sysaudio: @sizeOf(T) is not the same as @bitSizeOf(T)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mach.