#1008

Build.pathFromRoot in BIO build.zig is not found

Openliamhaysopened 17d ago

build.zig uses the Build.pathFromRoot function, but Zig can't find it:

build.zig:69:10: error: no field or member function named 'pathFromRoot' in 'Build'
        b.pathFromRoot("clang2rustasm.py"),
        ~^~~~~~~~~~~~~
/home/liam/venv/lib/python3.14/site-packages/ziglang/lib/std/Build.zig:1:1: note: struct declared here
const Build = @This();
^~~~~
build.zig:69:10: note: method invocation only supports up to one level of implicit pointer dereferencing
build.zig:69:10: note: use '.*' to dereference pointer
referenced by:
    runPackageScript [inlined]: /home/liam/venv/lib/python3.14/site-packages/ziglang/lib/std/Build.zig:2144:50
    main: /home/liam/venv/lib/python3.14/site-packages/ziglang/lib/compiler/configurer.zig:138:29
    4 reference(s) hidden; use '-freference-trace=6' to see all references

Furthermore, the source for the Build module specifically says that pathFromRoot is not intended to be used outside the module itself and that it shouldn't even be used in Zig's own build system: https://github.com/ziglang/zig/blob/master/lib/std/Build.zig#L1735. The function is public, but Zig can't find it for some reason.

I don't know up from down in Zig, but just taking out the b.pathFromRoot call seems to make the BIO build system work.

Activity

0

No activity yet.