#Building the Zig compiler from source on Windows, stuck on Option 1b.

1 messages · Page 1 of 1 (latest)

charred oasis
#

I'm trying to build the Zig compiler from source on Windows using option 1b per the Wiki:

https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows

I have unzipped the webkit, but when I run the suggested command

.\bin\zig.exe build -p stage3 --search-prefix C:\Users\10aded\Software\zig+llvm+lld+clang --zig-lib-dir lib -Dstatic-llvm -Duse-zig-libcxx -Dtarget=x86_64-windows-gnu

I get the following error:

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
PS C:\Users\10aded\Software\zig+llvm+lld+clang>

This doesn't seem like a simple "complier is out of date" issue. How can I use the pre-packaged Zig compiler to make the build?

tidal stratus
#

I've never used it but it seems like you're trying to zig build within the devkit?
You probably need to download the latest source, unzip it and run that cmd from within that folder

charred oasis
#

Maybe there's a standard way to create a build.zig file, but I have basically 0 experience in creating them.

tidal stratus
#

just give the suggestion a try

charred oasis
#

If your suggestion works I'll update the Wiki page to make the step clearer.

random shale
#
Option 1b: Zig build

Unzip the dev kit and then in cmd.exe in your Zig source checkout:

important part is the your Zig source checkout

charred oasis
#

It's working now, what exactly the step was supposed to do wasn't clear to me but now it is.

#

Okay now I'm getting a legit error:

install transitive failure
├─ install generated to doc/langref.html transitive failure
│  └─ run docgen (langref.html) transitive failure
│     └─ zig build-exe docgen Debug native failure
├─ install generated/ transitive failure
│  └─ zig test Debug x86_64-windows-gnu failure
└─ install zig transitive failure
   └─ zig build-exe zig Debug x86_64-windows-gnu failure```
#

Time to update the dev kit.

charred oasis
#

I'm beginning to see why Kelley wants to get rid of LLVM from debug builds... LLVM seems to love taking its time to build the compiler.