ziglibs / positron

A web renderer frontend for zig applications
110 stars 6 forks source link

Fail to build the project with zig 0.12.0 and 0.13.0 #4

Open cseblog opened 3 months ago

cseblog commented 3 months ago
$ zig build
xxxx\build.zig:6:21: error: root struct of file 'std' has no member named 'build'
pub fn build(b: *std.build.Builder) void {
                 ~~~^~~~~~
xxx\zig\0.13.0\files\lib\std\std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
referenced by:
    runBuild__anon_8955xxx\zig\0.13.0\files\lib\std\Build.zig:2115:50
    main:xxx\zig\0.13.0\files\lib\compiler\build_runner.zig:301:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
coolaj86 commented 2 months ago

I you install v0.10.1 and make a few modifications to bring it up from the v0.10-dev-xxxxxx it was created with, you can get a bit closer:

curl -sS https://webi.sh/zig@0.10 | sh
source ~/.config/envman/PATH.env
git clone https://github.com/coolaj86/positron.git
pushd ./positron/
git submodule init
git submodule update

pushd ./vendor/serve/
git switch master
sd 'addIncludeDir' 'addIncludePath' vendor/serve/build.zig
popd

zig build

PR at https://github.com/ziglibs/positron/pull/5.