ziglang / www.ziglang.org

https://ziglang.org/
MIT License
292 stars 176 forks source link

Some build system examples can cause website build failure #399

Open Atomk opened 1 month ago

Atomk commented 1 month ago

After working around #389, running zig build serve on my system (Windows) results in the following failures. I understand these samples are not really meant to be run on any system, I just want to be able to complete a build to test my changes. If that's not possible, I would clarify in the README that Windows is not supported and/or that some dependencies are needed to build the website.

  1. Line: const tool_run = b.addSystemCommand(&.{"jq"});
PS C:\...\www.ziglang.org> zig build serve
serve
└─ run server
   └─ website
      └─ install generated to ja-JP\learn\index.html
         └─ run layout (learn\index.smd)
            └─ Zine Index Content
               └─ run index-assets
                  └─ run doctest (build-system/10.5-system-tool/build.zig) failure
install
└─ install generated to word.txt
   └─ run jq failure
error: unable to spawn jq: FileNotFound

2.

serve
└─ run server
   └─ website
      └─ install generated to ja-JP\learn\index.html
         └─ run layout (learn\index.smd)
            └─ Zine Index Content
               └─ run index-assets
                  └─ run doctest (build-system/system-libraries/build.zig) failure
install
└─ install zip
   └─ zig build-exe zip Debug native failure
error: error: unable to find dynamic system library 'z' using strategy 'paths_first'. searched paths: none
serve
└─ run server
   └─ website
      └─ install generated to ja-JP\learn\index.html
         └─ run layout (learn\index.smd)
            └─ Zine Index Content
               └─ run index-assets
                  └─ run doctest (build-system/write-files/build.zig) failure
install
└─ install generated to project.tar.gz
   └─ run tar (project.tar.gz) failure
tar: al\Programs\Python\P??U???????????????????p: Couldn't visit directory: No such file or directory
tar: Error exit delayed from previous errors.
error: the following command exited with error code 1:
Atomk commented 1 month ago

Workaround: in the three failing build.zig files, turn // build=succeed into // build=fail.