I don't know what this error means

I recently updated to the new current stable 0.16.0 and I guess I’m having migration/teething issues. I will provide further info on request. I’m new here, I don’t really know the norms.

❯ zig build
install
└─ install audio
└─ compile exe audio Debug native 3 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/16.1.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/16.1.1/../../../../lib/crt1.o:.sframe error: fatal linker error: unhandled relocation type R_X86_64_PC64 at offset 0x1c note: in /usr/lib/libc_nonshared.a(atexit.oS):.sframe

I guess I should say that I am on Manjaro (ArchLinux). I added SDL3 (from codeburg) and ZigZag (from github, possibly not the latest, mite have moved?) to the project.

I recently ran into this issue too but only when building a project with a C dependency (in your case SDL3).

You should try building using the LLVM backend with 0.16 Linker error when building Zig from source - #5 by alexrp

You can also downgrade your libc in arch as a workaround https://codeberg.org/ziglang/zig/issues/31272#issuecomment-13790015

Is this possibly because zig isn’t using the folders that were installed with the zig binary? I used the AUR zig-0.16-bin package which installs in /opt/zig-0.16 and has a symlink to /usr/lib/zig.

The official Zig package is now version 0.16.0 so removing the AUR package and installing the official package fixed it. Not sure why.

https://codeberg.org/ziglang/zig/issues/31272#issuecomment-16112966

Seems the official Zig package now contains the commit with the fix too