You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
translate-c unhappy when building outside source directory #47
you'll get error: failed to check cache: '../081992ed24df120cd2edde6e56346371/.zig-cache/o/4e4e86279020dbd67ed90b5b94e6e6ba/py.zig' file_hash FileNotFound. Not only does py.zig not exist, its parent (4e4e86279020dbd67ed90b5b94e6e6ba/) does not exist either
Expected Behavior
zig translate-c should write its output to a file regardless of in what folder zig build is run
Activity
jburgy commentedon Jul 11, 2025
See https://discord.com/channels/605571803288698900/1393290799684390962 for context as to why
zig buildruns outside the source rootjburgy commentedon Jul 12, 2025
Should this be blocking ziglang/zig#20630?
Vexu commentedon Jul 12, 2025
No, your example works as expected when using https://github.com/ziglang/translate-c.
jburgy commentedon Jul 12, 2025
Not sure I follow that statement. Am I not using
ziglang/translate-cwhen I doscratch$ zig build --build-file ../081992ed24df120cd2edde6e56346371/build.zig --verbose /opt/zig-linux-x86_64-0.14.0/zig translate-c -lc --listen=- -I /opt/python/3.13.0/include/python3.13 ../081992ed24df120cd2edde6e56346371/py.h CLICOLOR_FORCE=1 pkg-config --list-all /opt/zig-linux-x86_64-0.14.0/zig build-lib -lpython3.13 -ODebug -L /opt/python/3.13.0/lib --dep py -Mroot=../081992ed24df120cd2edde6e56346371/root.zig -ODebug -Mpy=../081992ed24df120cd2edde6e56346371/.zig-cache/o/4e4e86279020dbd67ed90b5b94e6e6ba/py.zig -lc --cache-dir ../081992ed24df120cd2edde6e56346371/.zig-cache --global-cache-dir /home/jburgy/.cache/zig --name ext -dynamic --zig-lib-dir /opt/zig-linux-x86_64-0.14.0/lib/ --listen=- install └─ install ext └─ zig build-lib ext Debug native 1 errors error: failed to check cache: '../081992ed24df120cd2edde6e56346371/.zig-cache/o/4e4e86279020dbd67ed90b5b94e6e6ba/py.zig' file_hash FileNotFound(I should also mention that the problem goes away when I use
@cImportinstead of an explicitpy.hand.addTranslateCinbuild.zig)Vexu commentedon Jul 12, 2025
Not yet, that's why the issue is open.