-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Labels
questionNo questions on the issue tracker, please.No questions on the issue tracker, please.
Description
Zig Version
0.15.1
Steps to Reproduce and Observed Behavior
I installed zig on Windows 11 with winget install zig.zig
. Then ran zig build --help
in a empty directory.
Output: info: initialize build.zig template file with 'zig init' info: see 'zig --help' for more options error: no build.zig file found, in the current directory or any parent directories
Part 2:
I also tried cloning a existing project git clone https://github.com/allyourcodebase/cpython
then run ´`zig build --help`` in it. It started compiling the project (and crashed),
zig build --help
C:\Users\USER\AppData\Local\zig\p\zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h\build.zig:5:18: error: no field or member function named 'addStaticLibrary' in 'Build'
const lib = b.addStaticLibrary(.{
~^~~~~~~~~~~~~~~~~
C:\Users\USER\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.1\lib\std\Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
C:\Users\USER\AppData\Local\zig\p\zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h\build.zig:5:18: note: method invocation only supports up to one level of implicit pointer dereferencing
C:\Users\USER\AppData\Local\zig\p\zlib-1.3.1-ZZQ7lVgMAACwO4nUUd8GLhsuQ5JQq_VAhlEiENJTUv6h\build.zig:5:18: note: use '.*' to dereference pointer
referenced by:
runBuild__anon_82912: C:\Users\USER\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.1\lib\std\Build.zig:2214:33
dependencyInner__anon_78948: C:\Users\USER\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.1\lib\std\Build.zig:2195:29
8 reference(s) hidden; use '-freference-trace=10' to see all references
build.zig:1238:22: error: no field named 'autoconf' in union 'Build.Step.ConfigHeader.Style'
.style = .{ .autoconf = upstream.path("pyconfig.h.in") },
^~~~~~~~
C:\Users\USER\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.1\lib\std\Build\Step\ConfigHeader.zig:7:19: note: union declared here
pub const Style = union(enum) {
^~~~~ ```
### Expected Behavior
I expected to see the help menu.
To just print a help menu shouldn't require me to create a empty project first. All it should do is print the help and exit.
And i don't get why it starts compiling code instead of printing the help message.
``zig --help``, ``zig cc --help`` and ``zig c++ --help`` all prints their respective help messages as expected without compiling anything.
Metadata
Metadata
Assignees
Labels
questionNo questions on the issue tracker, please.No questions on the issue tracker, please.