Skip to content

windows build with zig-bootstrap generated binaries fails #19290

Description

@neeraj9

Zig Version

0.11.0-dev.995+7350f0d9b

Steps to Reproduce and Observed Behavior

git clone https://github.com/ziglang/zig-bootstrap
cd zig-bootstrap
build.bat x86_64-windows-gnu baseline
cd ..
git clone https://github.com/ziglang/zig
cd zig
..\zig-bootstrap\out-win\zig-x86_64-windows-gnu-baseline\zig.exe build -p stage3 --search-prefix ..\zig-bootstrap\out-win\x86_64-windows-gnu-baseline --zig-lib-dir lib -Dstatic-llvm

Expected Behavior

Zig should build from binaries generated from zig-bootstrap, but I get the following error:

error: sub-compilation of zig_libc failed
    C:\Users\neera\AppData\Local\zig\b\731734966a7ad78f2b905fc1c41a5214\builtin.zig:9:44: note: enum 'builtin.LinkMode' has no member named 'Static'
pub const link_mode = std.builtin.LinkMode.Static;
                                           ^~~~~~
    I:\Work\git\ziglang\zig\lib\std\builtin.zig:502:22: note: enum declared here
pub const LinkMode = enum {
                     ^~~~
referenced by:
    enum 'builtin.LinkMode' has no member named 'Static': n.zig:1:2
    pilation of zig_libc failed: n.zig:1:2
error: sub-compilation of compiler_rt failed
    C:\Users\neera\AppData\Local\zig\b\731734966a7ad78f2b905fc1c41a5214\builtin.zig:9:44: note: enum 'builtin.LinkMode' has no member named 'Static'
pub const link_mode = std.builtin.LinkMode.Static;
                                           ^~~~~~
    I:\Work\git\ziglang\zig\lib\std\builtin.zig:502:22: note: enum declared here
pub const LinkMode = enum {
                     ^~~~
referenced by:
    enum 'builtin.LinkMode' has no member named 'Static': n.zig:1:2
    \Users\neera\AppData\Local\zig\b\731734966a7ad78f2b905fc1c41a5214\builtin.zig: n.zig:1:2
I:\Work\git\ziglang\zig\lib\std\dwarf.zig:970:106: error: value with comptime-only type 'comptime_int' depends on runtime control flow
            const base_address = compile_unit.die.getAttrAddr(di, AT.low_pc, compile_unit.*) catch |err| switch (err) {
                                                                                                         ^~~~~~
I:\Work\git\ziglang\zig\lib\std\dwarf.zig:970:94: note: runtime control flow here
            const base_address = compile_unit.die.getAttrAddr(di, AT.low_pc, compile_unit.*) catch |err| switch (err) {
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
referenced by:
    scanAllFunctions: I:\Work\git\ziglang\zig\lib\std\dwarf.zig:814:58
    openDwarfDebugInfo: I:\Work\git\ziglang\zig\lib\std\dwarf.zig:2184:11
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorquestionNo questions on the issue tracker, please.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions