raylib.zig icon indicating copy to clipboard operation
raylib.zig copied to clipboard

Compiler segfault when cross-compiling a project for Windows

Open recursiveGecko opened this issue 1 year ago • 3 comments

Hi,

I'm working on a small project using Raylib.zig and I'm experiencing some issues when I try to cross-compile the project from Linux to x86_64_windows_gnu. I've tried various recent Zig 0.11-dev versions but they all segfault when I try to build the project in any of the Release modes - Debug builds work fine.

Here's the failing GitHub Actions output from the minimal example project I'm trying to build: https://github.com/recursiveGecko/zig-raylib-segfault-repro/actions/runs/5624683409/job/15241992190#step:4:66

I've filed an issue in the Zig repo, but I'd like to know if there's anything I can do in the meantime to work around it?

Any tips, example projects or guides would be really appreciated! Thanks :)

recursiveGecko avatar Jul 24 '23 16:07 recursiveGecko

I encounter the same problem on a Windows machine with my example repo. Unfortunately I have no idea what causes that error 😅 Thanks for filing an issue in the zig repo. I hope this get fixed soon. I set a reminder for myself to test this periodically and let you know if it works again.

ryupold avatar Aug 04 '23 11:08 ryupold

Same here on MacOS M1

rdoetjes avatar Sep 24 '23 18:09 rdoetjes

This works only on linux, because it links with LIBC https://github.com/ryupold/raylib.zig/blob/bd561b3689bc4e703f46bf1908633abb09680b4b/build.zig#L93

Some changes might need to be made to raylib upstream, before this can be fixed.

ProIcons avatar Apr 03 '24 08:04 ProIcons