zigcc: undefined symbol: __isoc23_* when combining Janet and Raylib libraries
Zig Version
0.11.0 and 0.12.0-dev.1814+5c0d58b71
Steps to Reproduce and Observed Behavior
Here is a repository with reproduction steps and an error message: https://github.com/greenfork/isoc23.
Here they are verbatim:
$ git clone https://github.com/greenfork/isoc23.git
$ cd isoc23
# Wait a bit because this command downloads a large Raylib repository!
$ git submodule update --init --recursive jaylib
# Add janet.h to the hardcoded in jaylib include path (remember to delete it afterwords)
$ sudo mkdir /usr/local/include/janet
$ sudo cp src/janet.h /usr/local/include/janet/
$ zig version
0.11.0
$ zig build # works fine
$ zig build -Dtarget=x86_64-linux-gnu # fails
zig build-exe isoc23 Debug x86_64-linux-gnu: error: the following command failed with 3 compilation errors:
/home/grfork/zig-linux-x86_64-0.11.0/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /tmp/isoc23/src/thehouse_hello_world.c /tmp/isoc23/src/janet.c /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a -lGL -lX11 /tmp/isoc23/zig-cache/o/75663b2f53ebaf3a2586f24809272912/libjaylib.a -lc --cache-dir /tmp/isoc23/zig-cache --global-cache-dir /home/grfork/.cache/zig --name isoc23 -target x86_64-linux-gnu -mcpu x86_64 -I /tmp/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-gnu 3 errors
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /tmp/isoc23/zig-cache/o/1dfae6069d01d348c4482230698d5016/rglfw.o:(_glfwParseUriList) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by context.c:408 (jaylib/raylib/src/external/glfw/src/context.c:408)
note: /tmp/isoc23/zig-cache/o/1dfae6069d01d348c4482230698d5016/rglfw.o:(_glfwRefreshContextAttribs) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
note: referenced by tinyobj_loader_c.h:792 (jaylib/raylib/src/external/tinyobj_loader_c.h:792)
note: /tmp/isoc23/zig-cache/o/7fbd155baba90ba2941e259d327944c1/rmodels.o:(tinyobj_parse_and_index_mtl_file) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
note: referenced by glad.h:8550 (jaylib/raylib/src/external/glad.h:8550)
note: /tmp/isoc23/zig-cache/o/c8be532591c10fa8971ba04591cac7e4/rcore.o:(glad_gl_find_core_gl) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /tmp/isoc23/zig-cache/o/1dfae6069d01d348c4482230698d5016/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /tmp/isoc23/zig-cache/o/1dfae6069d01d348c4482230698d5016/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /tmp/isoc23/zig-cache/o/1dfae6069d01d348c4482230698d5016/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a488295558bcebe973d5d2fd0f35b729/libraylib.a
$ zig version # same on master
0.12.0-dev.1814+5c0d58b71
$ zig build -Dtarget=x86_64-linux-gnu # fails
$ sudo rm -r /usr/local/include/janet
Expected Behavior
The project compiles with any target specified.
About the project, it uses Zig to compile a C project:
- Janet language with amalgamation build
src/janet.candsrc/janet.h - Raylib using its
build.ziginjaylib/raylib/src/build.zigmaintained independently from me - Jaylib wrapper around Raylib for Janet in
jaylib/build.zigthat I wrote
There are two issues I found, probably related:
- https://github.com/llvm/llvm-project/issues/64388
- https://github.com/ziglang/zig/issues/17536
And also an explanation about the #define _GNU_SOURCE which is present in janet.c: https://github.com/openssl/openssl/issues/22833
Yeah, there are some open glibc linking issues with Zig. I thought the current git builds had fixes for these string problems (I could definitely see there being additional problems, too, though). You might try targeting an older version of glibc with:
$ zig build -Dtarget=x86_64-linux-gnu.2.17
and see if that fixes (or changes) the problem. (Generally versions after 2.17 should work.)
Or you might target the musl C library (-Dtarget=x86_64-linux-musl).
Or, try building on a host with an older version of glibc. I assume your host has v2.38? (ldd --version should tell us).
For gnu.2.17 I get the same problem:
> zig build -Dtarget=x86_64-linux-gnu.2.17
zig build-exe isoc23 Debug x86_64-linux-gnu.2.17: error: the following command failed with 3 compilation errors:
/home/grfork/zig-linux-x86_64-0.11.0/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /tmp/isoc23/src/thehouse_hello_world.c /tmp/isoc23/src/janet.c /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a -lGL -lX11 /tmp/isoc23/zig-cache/o/362e7f9a9f49ae84d0e5e54a4c9dcd6c/libjaylib.a -lc --cache-dir /tmp/isoc23/zig-cache --global-cache-dir /home/grfork/.cache/zig --name isoc23 -target x86_64-linux-gnu.2.17 -mcpu x86_64 -I /tmp/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-gnu.2.17 3 errors
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /tmp/isoc23/zig-cache/o/5b408fbf747687143d52eebf24e0be38/rglfw.o:(_glfwParseUriList) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by rtext.c:2051 (jaylib/raylib/src/rtext.c:2051)
note: /tmp/isoc23/zig-cache/o/ba450d3731715ba9dc05b2e55bdd8ac7/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
note: referenced by rtext.c:2058 (jaylib/raylib/src/rtext.c:2058)
note: /tmp/isoc23/zig-cache/o/ba450d3731715ba9dc05b2e55bdd8ac7/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
note: referenced by rtext.c:2065 (jaylib/raylib/src/rtext.c:2065)
note: /tmp/isoc23/zig-cache/o/ba450d3731715ba9dc05b2e55bdd8ac7/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /tmp/isoc23/zig-cache/o/5b408fbf747687143d52eebf24e0be38/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /tmp/isoc23/zig-cache/o/5b408fbf747687143d52eebf24e0be38/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /tmp/isoc23/zig-cache/o/5b408fbf747687143d52eebf24e0be38/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/362d4a10b5370f9ced79956931d943a5/libraylib.a
For trying to build for musl there are also errors about __fcntl_time64:
> zig build -Dtarget=x86_64-linux-musl
zig build-exe isoc23 Debug x86_64-linux-musl: error: the following command failed with 4 compilation errors:
/home/grfork/zig-linux-x86_64-0.11.0/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /tmp/isoc23/src/thehouse_hello_world.c /tmp/isoc23/src/janet.c /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a -lGL -lX11 /tmp/isoc23/zig-cache/o/2cdb71e53ec7e9728b5841e58e052205/libjaylib.a -lc --cache-dir /tmp/isoc23/zig-cache --global-cache-dir /home/grfork/.cache/zig --name isoc23 -target x86_64-linux-musl -mcpu x86_64 -I /tmp/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-musl 4 errors
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by rtext.c:2051 (jaylib/raylib/src/rtext.c:2051)
note: /tmp/isoc23/zig-cache/o/3e33ea2af0d29fe68e4b06f989f11b92/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by rtext.c:2058 (jaylib/raylib/src/rtext.c:2058)
note: /tmp/isoc23/zig-cache/o/3e33ea2af0d29fe68e4b06f989f11b92/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by rtext.c:2065 (jaylib/raylib/src/rtext.c:2065)
note: /tmp/isoc23/zig-cache/o/3e33ea2af0d29fe68e4b06f989f11b92/rtext.o:(LoadBMFont) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(_glfwParseUriList) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(parseMapping) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
error: ld.lld: undefined symbol: __fcntl_time64
note: referenced by x11_init.c:1062 (jaylib/raylib/src/external/glfw/src/x11_init.c:1062)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(createEmptyEventPipe) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by x11_init.c:1063 (jaylib/raylib/src/external/glfw/src/x11_init.c:1063)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(createEmptyEventPipe) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced by x11_init.c:1066 (jaylib/raylib/src/external/glfw/src/x11_init.c:1066)
note: /tmp/isoc23/zig-cache/o/f86f9d76b7e3fa058445e48b766e2efc/rglfw.o:(createEmptyEventPipe) in archive /tmp/isoc23/zig-cache/o/a91aa86e920a35f68abd85864d4e40aa/libraylib.a
note: referenced 1 more times
My version is 2.38, right, I'm on Arch Linux. I'm not sure I know how to build with an older version of glibc. But I suppose it could be irrelevant, my final goal is to compile a Linux build and a Windows build. For Windows I get different errors, probably will need to address them later:
> zig build -Dtarget=x86_64-windows-gnu
zig build-exe isoc23 Debug x86_64-windows-gnu: error: the following command failed with 25 compilation errors:
/home/grfork/zig-linux-x86_64-0.11.0/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /tmp/isoc23/src/thehouse_hello_world.c /tmp/isoc23/src/janet.c /tmp/isoc23/zig-cache/o/01b47b3de8dffbcbbffbde810e4032d6/raylib.lib -lwinmm -lgdi32 -lopengl32 /tmp/isoc23/zig-cache/o/8ae7461216cb1fbf15cf226190b39c25/jaylib.lib -lc --cache-dir /tmp/isoc23/zig-cache --global-cache-dir /home/grfork/.cache/zig --name isoc23 -target x86_64-windows-gnu -mcpu x86_64 -I /tmp/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-windows-gnu 25 errors
error: lld-link: undefined symbol: EnumProcessModules
note: referenced by /tmp/isoc23/src/core/util.c:1064
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(symbol_clib)
error: lld-link: undefined symbol: __declspec(dllimport) closesocket
note: referenced by /tmp/isoc23/src/core/ev.c:334
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_stream_close_impl)
note: referenced by /tmp/isoc23/src/core/net.c:537
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
note: referenced by /tmp/isoc23/src/core/net.c:571
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
note: referenced 3 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSARecvFrom
note: referenced by /tmp/isoc23/src/core/ev.c:2216
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(ev_callback_read)
error: lld-link: undefined symbol: __declspec(dllimport) WSAGetLastError
note: referenced by /tmp/isoc23/src/core/ev.c:2218
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(ev_callback_read)
note: referenced by /tmp/isoc23/src/core/ev.c:2467
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(ev_callback_write)
note: referenced by /tmp/isoc23/src/core/net.c:259
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(net_sched_accept_impl)
note: referenced 1 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSASendTo
note: referenced by /tmp/isoc23/src/core/ev.c:2465
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(ev_callback_write)
error: lld-link: undefined symbol: __declspec(dllimport) getsockopt
note: referenced by /tmp/isoc23/src/core/net.c:142
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(net_callback_connect)
error: lld-link: undefined symbol: __declspec(dllimport) setsockopt
note: referenced by /tmp/isoc23/src/core/net.c:205
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(net_callback_accept)
note: referenced by /tmp/isoc23/src/core/net.c:584
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(serverify_socket)
note: referenced by /tmp/isoc23/src/core/net.c:937
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_stream_flush)
note: referenced 2 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSASocketW
note: referenced by /tmp/isoc23/src/core/net.c:250
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(net_sched_accept_impl)
note: referenced by /tmp/isoc23/src/core/net.c:505
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
note: referenced by /tmp/isoc23/src/core/net.c:685
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: AcceptEx
note: referenced by /tmp/isoc23/src/core/net.c:258
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(net_sched_accept_impl)
error: lld-link: undefined symbol: __declspec(dllimport) freeaddrinfo
note: referenced by /tmp/isoc23/src/core/net.c:427
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_sockaddr)
note: referenced by /tmp/isoc23/src/core/net.c:436
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_sockaddr)
note: referenced by /tmp/isoc23/src/core/net.c:469
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
note: referenced 8 more times
error: lld-link: undefined symbol: __declspec(dllimport) getaddrinfo
note: referenced by /tmp/isoc23/src/core/net.c:382
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_get_addrinfo)
note: referenced by /tmp/isoc23/src/core/net.c:478
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: gai_strerrorA
note: referenced by /tmp/isoc23/src/core/net.c:384
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_get_addrinfo)
note: referenced by /tmp/isoc23/src/core/net.c:481
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: __declspec(dllimport) bind
note: referenced by /tmp/isoc23/src/core/net.c:528
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
note: referenced by /tmp/isoc23/src/core/net.c:696
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: __declspec(dllimport) WSAConnect
note: referenced by /tmp/isoc23/src/core/net.c:552
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: __declspec(dllimport) ioctlsocket
note: referenced by /tmp/isoc23/src/core/net.c:100
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_net_socknoblock)
error: lld-link: undefined symbol: __declspec(dllimport) shutdown
note: referenced by /tmp/isoc23/src/core/net.c:632
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_shutdown)
error: lld-link: undefined symbol: __declspec(dllimport) listen
note: referenced by /tmp/isoc23/src/core/net.c:713
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: __declspec(dllimport) getsockname
note: referenced by /tmp/isoc23/src/core/net.c:783
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_getsockname)
error: lld-link: undefined symbol: __declspec(dllimport) inet_ntop
note: referenced by /tmp/isoc23/src/core/net.c:743
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_so_getname)
note: referenced by /tmp/isoc23/src/core/net.c:751
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_so_getname)
error: lld-link: undefined symbol: __declspec(dllimport) ntohs
note: referenced by /tmp/isoc23/src/core/net.c:746
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_so_getname)
note: referenced by /tmp/isoc23/src/core/net.c:754
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_so_getname)
error: lld-link: undefined symbol: __declspec(dllimport) getpeername
note: referenced by /tmp/isoc23/src/core/net.c:799
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_getpeername)
error: lld-link: undefined symbol: __declspec(dllimport) htonl
note: referenced by /tmp/isoc23/src/core/net.c:1012
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_setsockopt)
error: lld-link: undefined symbol: __declspec(dllimport) inet_pton
note: referenced by /tmp/isoc23/src/core/net.c:1013
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_setsockopt)
note: referenced by /tmp/isoc23/src/core/net.c:1019
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(cfun_net_setsockopt)
error: lld-link: undefined symbol: __declspec(dllimport) WSAStartup
note: referenced by /tmp/isoc23/src/core/net.c:1083
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_net_init)
error: lld-link: undefined symbol: __declspec(dllimport) WSACleanup
note: referenced by /tmp/isoc23/src/core/net.c:1089
note: /tmp/isoc23/zig-cache/o/220133fce5ed69adb057312814801181/janet.obj:(janet_net_deinit)
Can you try with a recent Zig build? I'm pretty sure there are fixes (like #17489) that are not in v0.11.0.
That said, the fact that you're seeing __isoc23_sscanf when linking with Musl is a bit disconcerting. As far as I understand it, that symbol is only part of glibc, and not something that should be defined when using Musl header files. I wonder if your build is pulling in host header files, instead of using the Zig-supplied ones for the target C library?
I have tried it with the current master version of zig 0.12.0-dev.1834+f36ac227b.
-Dtarget=x86_64-linux-gnu -- same errors
> /home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build -Dtarget=x86_64-linux-gnu
zig build-exe isoc23 Debug x86_64-linux-gnu: error: the following command failed with 3 compilation errors:
/home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /home/grfork/isoc23/src/thehouse_hello_world.c /home/grfork/isoc23/src/janet.c /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a -lGL -lX11 /home/grfork/isoc23/zig-cache/o/9900b8c8b78f756457df40f6e5ffeafa/libjaylib.a -lc --cache-dir /home/grfork/isoc23/zig-cache --global-cache-dir/home/grfork/.cache/zig --name isoc23 -target x86_64-linux-gnu -mcpu x86_64 -I /home/grfork/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-gnu 3 errors
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by rtext.c:2051 (jaylib/raylib/src/rtext.c:2051)
note: /home/grfork/isoc23/zig-cache/o/267d085b674df72a8bd4a90dfe8f1053/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
note: referenced by rtext.c:2058 (jaylib/raylib/src/rtext.c:2058)
note: /home/grfork/isoc23/zig-cache/o/267d085b674df72a8bd4a90dfe8f1053/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
note: referenced by rtext.c:2065 (jaylib/raylib/src/rtext.c:2065)
note: /home/grfork/isoc23/zig-cache/o/267d085b674df72a8bd4a90dfe8f1053/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /home/grfork/isoc23/zig-cache/o/4410aab7831af50d9cdd309ba5b2f7ab/rglfw.o:(_glfwParseUriList) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /home/grfork/isoc23/zig-cache/o/4410aab7831af50d9cdd309ba5b2f7ab/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /home/grfork/isoc23/zig-cache/o/4410aab7831af50d9cdd309ba5b2f7ab/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /home/grfork/isoc23/zig-cache/o/4410aab7831af50d9cdd309ba5b2f7ab/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/96a26e9b4afa7be3b3878ebd368adad6/libraylib.a
-Dtarget=x86_64-linux-gnu.2.17 -- same errors
> /home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build -Dtarget=x86_64-linux-gnu.2.17
zig build-exe isoc23 Debug x86_64-linux-gnu.2.17: error: the following command failed with 3 compilation errors:
/home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /home/grfork/isoc23/src/thehouse_hello_world.c /home/grfork/isoc23/src/janet.c /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a -lGL -lX11 /home/grfork/isoc23/zig-cache/o/91a9431b8b194a20b9057d98e2304064/libjaylib.a -lc --cache-dir /home/grfork/isoc23/zig-cache --global-cache-dir/home/grfork/.cache/zig --name isoc23 -target x86_64-linux-gnu.2.17 -mcpu x86_64 -I /home/grfork/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-gnu.2.17 3 errors
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by rtext.c:2051 (jaylib/raylib/src/rtext.c:2051)
note: /home/grfork/isoc23/zig-cache/o/c01a931d577101bf1085eefabfe41446/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
note: referenced by glad.h:8550 (jaylib/raylib/src/external/glad.h:8550)
note: /home/grfork/isoc23/zig-cache/o/321df1d71e5c15b712ba0aa512942325/rcore.o:(glad_gl_find_core_gl) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
note: referenced by rtext.c:2058 (jaylib/raylib/src/rtext.c:2058)
note: /home/grfork/isoc23/zig-cache/o/c01a931d577101bf1085eefabfe41446/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /home/grfork/isoc23/zig-cache/o/16cafd61211e7e517e35db1a74de4db1/rglfw.o:(_glfwParseUriList) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /home/grfork/isoc23/zig-cache/o/16cafd61211e7e517e35db1a74de4db1/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /home/grfork/isoc23/zig-cache/o/16cafd61211e7e517e35db1a74de4db1/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /home/grfork/isoc23/zig-cache/o/16cafd61211e7e517e35db1a74de4db1/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/7b872f088ac22123b7df03790f3bfa46/libraylib.a
-Dtarget=x86_64-linux-musl -- same errors
> /home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build -Dtarget=x86_64-linux-musl
zig build-exe isoc23 Debug x86_64-linux-musl: error: the following command failed with 4 compilation errors:
/home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /home/grfork/isoc23/src/thehouse_hello_world.c /home/grfork/isoc23/src/janet.c /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a -lGL -lX11 /home/grfork/isoc23/zig-cache/o/9576605e160080c172e7aa306472c539/libjaylib.a -lc --cache-dir /home/grfork/isoc23/zig-cache --global-cache-dir/home/grfork/.cache/zig --name isoc23 -target x86_64-linux-musl -mcpu x86_64 -I /home/grfork/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-linux-musl 4 errors
error: ld.lld: undefined symbol: __isoc23_sscanf
note: referenced by rtext.c:2051 (jaylib/raylib/src/rtext.c:2051)
note: /home/grfork/isoc23/zig-cache/o/5e29ef2ba21f847ccf09ee9bf1711a77/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by rtext.c:2058 (jaylib/raylib/src/rtext.c:2058)
note: /home/grfork/isoc23/zig-cache/o/5e29ef2ba21f847ccf09ee9bf1711a77/rtext.o:(LoadBMFont) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by glad.h:8550 (jaylib/raylib/src/external/glad.h:8550)
note: /home/grfork/isoc23/zig-cache/o/13355226dee1fea36d0c205b6d4bf785/rcore.o:(glad_gl_find_core_gl) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced 6 more times
error: ld.lld: undefined symbol: __isoc23_strtol
note: referenced by init.c:213 (jaylib/raylib/src/external/glfw/src/init.c:213)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(_glfwParseUriList) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
error: ld.lld: undefined symbol: __isoc23_strtoul
note: referenced by input.c:223 (jaylib/raylib/src/external/glfw/src/input.c:223)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by input.c:224 (jaylib/raylib/src/external/glfw/src/input.c:224)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by input.c:228 (jaylib/raylib/src/external/glfw/src/input.c:228)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(parseMapping) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
error: ld.lld: undefined symbol: __fcntl_time64
note: referenced by x11_init.c:1062 (jaylib/raylib/src/external/glfw/src/x11_init.c:1062)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(createEmptyEventPipe) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by x11_init.c:1063 (jaylib/raylib/src/external/glfw/src/x11_init.c:1063)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(createEmptyEventPipe) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced by x11_init.c:1066 (jaylib/raylib/src/external/glfw/src/x11_init.c:1066)
note: /home/grfork/isoc23/zig-cache/o/1f48bd8432033430d990de7a3d951f64/rglfw.o:(createEmptyEventPipe) in archive /home/grfork/isoc23/zig-cache/o/9d6cbd4497b2a314170cb0c9508249c2/libraylib.a
note: referenced 1 more times
-Dtarget=x86_64-windows-gnu -- same errors
> /home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build -Dtarget=x86_64-windows-gnu
zig build-exe isoc23 Debug x86_64-windows-gnu: error: the following command failed with 25 compilation errors:
/home/grfork/zig-linux-x86_64-0.12.0-dev.1834+f36ac227b/zig build-exe -cflags -std=c99 -DJANET_BUILD_TYPE=release -- /home/grfork/isoc23/src/thehouse_hello_world.c /home/grfork/isoc23/src/janet.c /home/grfork/isoc23/zig-cache/o/aba516e95e9f462530bbeed96990bd34/raylib.lib -lwinmm -lgdi32 -lopengl32 /home/grfork/isoc23/zig-cache/o/cab062f172b52656189ad5e0ac7381bf/jaylib.lib -lc --cache-dir /home/grfork/isoc23/zig-cache --global-cache-dir /home/grfork/.cache/zig --name isoc23 -target x86_64-windows-gnu -mcpu x86_64 -I /home/grfork/isoc23/src -L /usr/lib --listen=-
Build Summary: 3/6 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install isoc23 transitive failure
└─ zig build-exe isoc23 Debug x86_64-windows-gnu 25 errors
error: lld-link: undefined symbol: EnumProcessModules
note: referenced by /home/grfork/isoc23/src/core/util.c:1064
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(symbol_clib)
error: lld-link: undefined symbol: __declspec(dllimport) closesocket
note: referenced by /home/grfork/isoc23/src/core/ev.c:334
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_stream_close_impl)
note: referenced by /home/grfork/isoc23/src/core/net.c:537
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
note: referenced by /home/grfork/isoc23/src/core/net.c:571
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
note: referenced 3 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSARecvFrom
note: referenced by /home/grfork/isoc23/src/core/ev.c:2216
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(ev_callback_read)
error: lld-link: undefined symbol: __declspec(dllimport) WSAGetLastError
note: referenced by /home/grfork/isoc23/src/core/ev.c:2218
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(ev_callback_read)
note: referenced by /home/grfork/isoc23/src/core/ev.c:2467
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(ev_callback_write)
note: referenced by /home/grfork/isoc23/src/core/net.c:259
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(net_sched_accept_impl)
note: referenced 1 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSASendTo
note: referenced by /home/grfork/isoc23/src/core/ev.c:2465
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(ev_callback_write)
error: lld-link: undefined symbol: __declspec(dllimport) getsockopt
note: referenced by /home/grfork/isoc23/src/core/net.c:142
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(net_callback_connect)
error: lld-link: undefined symbol: __declspec(dllimport) setsockopt
note: referenced by /home/grfork/isoc23/src/core/net.c:205
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(net_callback_accept)
note: referenced by /home/grfork/isoc23/src/core/net.c:584
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(serverify_socket)
note: referenced by /home/grfork/isoc23/src/core/net.c:937
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_stream_flush)
note: referenced 2 more times
error: lld-link: undefined symbol: __declspec(dllimport) WSASocketW
note: referenced by /home/grfork/isoc23/src/core/net.c:250
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(net_sched_accept_impl)
note: referenced by /home/grfork/isoc23/src/core/net.c:505
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
note: referenced by /home/grfork/isoc23/src/core/net.c:685
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: AcceptEx
note: referenced by /home/grfork/isoc23/src/core/net.c:258
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(net_sched_accept_impl)
error: lld-link: undefined symbol: __declspec(dllimport) freeaddrinfo
note: referenced by /home/grfork/isoc23/src/core/net.c:427
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_sockaddr)
note: referenced by /home/grfork/isoc23/src/core/net.c:436
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_sockaddr)
note: referenced by /home/grfork/isoc23/src/core/net.c:469
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
note: referenced 8 more times
error: lld-link: undefined symbol: __declspec(dllimport) getaddrinfo
note: referenced by /home/grfork/isoc23/src/core/net.c:382
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_get_addrinfo)
note: referenced by /home/grfork/isoc23/src/core/net.c:478
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: gai_strerrorA
note: referenced by /home/grfork/isoc23/src/core/net.c:384
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_get_addrinfo)
note: referenced by /home/grfork/isoc23/src/core/net.c:481
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: __declspec(dllimport) bind
note: referenced by /home/grfork/isoc23/src/core/net.c:528
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
note: referenced by /home/grfork/isoc23/src/core/net.c:696
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: __declspec(dllimport) WSAConnect
note: referenced by /home/grfork/isoc23/src/core/net.c:552
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_connect)
error: lld-link: undefined symbol: __declspec(dllimport) ioctlsocket
note: referenced by /home/grfork/isoc23/src/core/net.c:100
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_net_socknoblock)
error: lld-link: undefined symbol: __declspec(dllimport) shutdown
note: referenced by /home/grfork/isoc23/src/core/net.c:632
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_shutdown)
error: lld-link: undefined symbol: __declspec(dllimport) listen
note: referenced by /home/grfork/isoc23/src/core/net.c:713
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_listen)
error: lld-link: undefined symbol: __declspec(dllimport) getsockname
note: referenced by /home/grfork/isoc23/src/core/net.c:783
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_getsockname)
error: lld-link: undefined symbol: __declspec(dllimport) inet_ntop
note: referenced by /home/grfork/isoc23/src/core/net.c:743
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_so_getname)
note: referenced by /home/grfork/isoc23/src/core/net.c:751
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_so_getname)
error: lld-link: undefined symbol: __declspec(dllimport) ntohs
note: referenced by /home/grfork/isoc23/src/core/net.c:746
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_so_getname)
note: referenced by /home/grfork/isoc23/src/core/net.c:754
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_so_getname)
error: lld-link: undefined symbol: __declspec(dllimport) getpeername
note: referenced by /home/grfork/isoc23/src/core/net.c:799
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_getpeername)
error: lld-link: undefined symbol: __declspec(dllimport) htonl
note: referenced by /home/grfork/isoc23/src/core/net.c:1012
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_setsockopt)
error: lld-link: undefined symbol: __declspec(dllimport) inet_pton
note: referenced by /home/grfork/isoc23/src/core/net.c:1013
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_setsockopt)
note: referenced by /home/grfork/isoc23/src/core/net.c:1019
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(cfun_net_setsockopt)
error: lld-link: undefined symbol: __declspec(dllimport) WSAStartup
note: referenced by /home/grfork/isoc23/src/core/net.c:1083
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_net_init)
error: lld-link: undefined symbol: __declspec(dllimport) WSACleanup
note: referenced by /home/grfork/isoc23/src/core/net.c:1089
note: /home/grfork/isoc23/zig-cache/o/176379f4ab84e0233cc953a22d3fadfd/janet.obj:(janet_net_deinit)
I'm also running into this. @greenfork were you able to resolve this?
Nope