This is for both zig 16.0 and 15.2.
I started encountering this after updating with sudo pacman -Syu in arch.
The project’s only dependency is Sokol.
…/zig/FoodMasterIoGate ❯ ./zig/zig build run
run
└─ run exe FoodMaster
└─ compile exe FoodMaster Debug native 2 errors
error: fatal linker error: unhandled relocation type R_X86_64_PC64 at offset 0x1c
note: in /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../lib/crt1.o:.sframe
error: fatal linker error: unhandled relocation type R_X86_64_PC64 at offset 0x2c
note: in /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../lib/crt1.o:.sframe
error: 2 compilation errors
failed command: /home/plebosaur/dev/zig/FoodMasterIoGate/zig/zig build-exe .zig-cache/o/e81b8e6edc58f2f98ea2133c8b4a8952/libsokol
_clib.a -ODebug -I .zig-cache/o/38ed62dd25d826f0875428ff1fbc26d4 --dep sokol --dep zorgfile -Mroot=/home/plebosaur/dev/zig/FoodMa
sterIoGate/src/root.zig .zig-cache/o/e81b8e6edc58f2f98ea2133c8b4a8952/libsokol_clib.a -I .zig-cache/o/38ed62dd25d826f0875428ff1fb
c26d4 -Msokol=/home/plebosaur/dev/zig/FoodMasterIoGate/zig-pkg/sokol-0.1.0-pb1HK6VgNgBI8wSklN7Gk_SV_sgIKAa-p3042rJ6HQH1/src/sokol
/sokol.zig -ODebug --dep sokol --dep fontsData -Mzorgfile=/home/plebosaur/dev/zig/FoodMasterIoGate/zorgfile.zig -MfontsData=.zig-
cache/c/95bb5d732a962c2e01ef869c8e400936/options.zig -lasound -lGL -lX11 -lXi -lXcursor -lc --cache-dir .zig-cache --global-cache
-dir /home/plebosaur/.cache/zig --name FoodMaster --zig-lib-dir zig/lib/ --listen=-
Build Summary: 3/6 steps succeeded (1 failed)
run transitive failure
└─ run exe FoodMaster transitive failure
└─ compile exe FoodMaster Debug native 2 errors
error: the following build command failed with exit code 1:
.zig-cache/o/5acc02ad6d65c11b42049d869d32d215/build /home/plebosaur/dev/zig/FoodMasterIoGate/zig/zig zig/lib /home/plebosaur/dev/zig/FoodMasterIoGate .zig-cache /home/plebosaur/.cache/zig --seed 0x1d1d1f73 -Zcccc0ce811354626 run
I can still compile using LLVM backend (which is what I am doing currently).