open-reckless-drivin
open-reckless-drivin copied to clipboard
Build fails on M1 Mac
zig build-exe reckless-drivin Debug native: error: the following command failed with 3 compilation errors: /opt/homebrew/Cellar/zig/0.11.0/bin/zig build-exe /Users/tomlube/Downloads/open-reckless-drivin-main/src/main.zig /Users/tomlube/Downloads/open-reckless-drivin-main/zig-cache/o/d4c7f6d5a6c1ecd275844df4f2980157/libraylib.a -cflags -fno-sanitize=undefined -- /Users/tomlube/Downloads/open-reckless-drivin-main/src/c/lzrw.c -lc --cache-dir /Users/tomlube/Downloads/open-reckless-drivin-main/zig-cache --global-cache-dir /Users/tomlube/.cache/zig --name reckless-drivin -I /Users/tomlube/Downloads/open-reckless-drivin-main/zig-cache/i/5c690dd0957aad475dd4f0b41919d0db/include -I /Users/tomlube/Downloads/open-reckless-drivin-main/src/c -framework CoreServices -framework AppKit -framework CoreGraphics -framework Foundation -framework IOKit --listen=- Build Summary: 5/8 steps succeeded; 1 failed (disable with --summary none) install transitive failure └─ install reckless-drivin transitive failure └─ zig build-exe reckless-drivin Debug native 3 errors src/objects.zig:354:13: error: invalid builtin function: '@abs' if (@abs(obdata.rot_vel) > max_rot_vel) { ^~~~~~~~~~~~~~~~~~~~ src/render.zig:296:71: error: invalid builtin function: '@abs' var num_blocks = @as(i32, @intFromFloat(math.ceil(@abs((x2 - x1) / (y2 - y1)) - @as(f32, @floatFromInt(size))))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/render.zig:404:63: error: invalid builtin function: '@abs' var num_blocks: i32 = @intFromFloat(@ceil(@abs((x2 - x1) / (y2 - y1)) - @as(f32, @floatFromInt(size)))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ tomlube@Toms-Air open-reckless-drivin-main %
Hi! What version of Zig are you using? I should update the readme, but I am currently using a very recent master build (0.12.0-dev.2341+92211135f) on an M2 Mac without issue