Freebsd 14.2: build zig from source failed

good morning, nice zig community.

the context: freeBSD 14.2 on a Dell T640.
the problem: I am struggling to build zig from source.

here is one of the errors I get:

error: ld.lld: undefined symbol: msync
note: referenced by posiz.zig:4786
note: /home/dmitry/distro/build_zig/sources/.zig-cache/o/.../build.o: (posix.msync)

there are a lot of undefined symbols and if I am not mistaken all of them relate to the lib/std/posix.zig

Need your help understanding how to overcome this issue.
Please ask for more information.

best regards,
Dmitry

1 Like

fixed here: bsd: fix stage3 linking on freebsd and dragonfly by mikdusan · Pull Request #22456 · ziglang/zig · GitHub

4 Likes