Skip to content

zig std build fails with link errors on Windows #24450

@edqx

Description

@edqx

Zig Version

0.15.0-dev.1034+bd97b6618

Steps to Reproduce and Observed Behavior

On windows, run zig std:

PS C:\Users\aquila> zig std
error: lld-link: undefined symbol: WSASocketW
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
error: lld-link: undefined symbol: WSAGetLastError
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced 6 more times
error: lld-link: undefined symbol: bind
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
error: lld-link: undefined symbol: listen
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
error: lld-link: undefined symbol: getsockname
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
error: lld-link: undefined symbol: WSAStartup
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
error: lld-link: undefined symbol: closesocket
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced 3 more times
error: lld-link: undefined symbol: accept
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)
    note: referenced by AppData\Local\zig\o\ce31a623b03f84b0ca54c40b132ddbb2\std_zcu.obj:(std-docs.main)

possibly due to #24146

Expected Behavior

I expected it to build the docs and open a local server to view the docs in my browser.

Works on Zig 0.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    autodocThe web application for interactive documentation and generation of its assets.bugObserved behavior contradicts documented or intended behavioros-windowsregressionIt worked in a previous version of Zig, but stopped working.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions