Skip to content

unrecognized argument: '--zig-lib-dir' #20628

@e0ff

Description

@e0ff

Zig Version

0.14.0-dev.244+0d79aa017

Steps to Reproduce and Observed Behavior

When I run the following command to try to build the latest version of zig:

zig build -p stage3 --search-prefix ../zig-bootstrap/out/x86_64-linux-gnu-baseline/ --zig-lib-dir lib -Dstatic-llvm

I get the following error:

unrecognized argument: '--zig-lib-dir'
  access the help menu with 'zig build -h'
error: the following build command failed with exit code 1:
/home/jeremy/src/zig/.zig-cache/o/04f409a5553650b211f747552cb2d319/build /home/jeremy/.local/bin/zig/zig /home/jeremy/src/zig /home/jeremy/src/zig/.zig-cache /home/jeremy/.cache/zig --seed 0x21503f73 -Ze77f9396bd147a4a -p stage3 --search-prefix ../zig-bootstrap/out/x86_64-linux-gnu-baseline/ --zig-lib-dir lib -Dstatic-llvm

If I run zig build -h it just starts building and does not display the help menu and I get the following error:

/home/jeremy/src/zig/build.zig:598:25: error: no field or member function named 'addUpdateSourceFiles' in 'Build'
    const copy_zig_h = b.addUpdateSourceFiles();
                       ~^~~~~~~~~~~~~~~~~~~~~
/home/jeremy/.local/bin/zig/lib/zig/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
    build: /home/jeremy/src/zig/build.zig:535:26
    runBuild__anon_8843: /home/jeremy/.local/bin/zig/lib/zig/std/Build.zig:2156:43
    4 reference(s) hidden; use '-freference-trace=6' to see all references
/home/jeremy/src/zig/build.zig:1285:64: error: no field named 'zig_lib_directory' in struct 'Build.Graph'
        cmd.addArgs(&.{ "--zig-lib-dir", b.fmt("{}", .{b.graph.zig_lib_directory}) });
                                                               ^~~~~~~~~~~~~~~~~
/home/jeremy/.local/bin/zig/lib/zig/std/Build.zig:112:19: note: struct declared here
pub const Graph = struct {
                  ^~~~~~
/home/jeremy/src/zig/test/tests.zig:774:45: error: type '[]const u8' does not support struct initialization syntax
        const cleanup = b.addRemoveDirTree(.{ .cwd_relative = tmp_path });
                                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected Behavior

To build zig, I've used that command in the past to build it and it has worked but maybe something has changed and I've missed it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNo 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