GithubHelp home page GithubHelp logo

Comments (5)

slimsag avatar slimsag commented on August 19, 2024 1

Hi @alichraghi - thanks for the bug report! A few things:

  1. 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.

  2. 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

  1. 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.

slimsag avatar slimsag commented on August 19, 2024 1

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.

alichraghi avatar alichraghi commented on August 19, 2024

i think this is because currently mach can't build for wayland

from mach.

alichraghi avatar alichraghi commented on August 19, 2024

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",

.Wayland => "_D_GLFW_WAYLAND",

  • there's a missing header file in lib/glfw/upstream/glfw/src called wayland-xdg-shell-client-protocol.h.

from mach.

slimsag avatar slimsag commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.