Skip to content

Zig CC - warning(link): failed to save linking hash digest file: PathAlreadyExists #9632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
doawoo opened this issue Aug 27, 2021 · 3 comments
Milestone

Comments

@doawoo
Copy link

doawoo commented Aug 27, 2021

I'm attempting to use Zig as a drop-in C/C++ compiler for the Erlang BEAM VM, a fairly non-trivial application I know! However I've had a fair amount of success, and have produced some working bins using the bootstrapping config! (And 1 fully working build)
However I'm running into an issue I think may be intermittent. Occasionally the configuration fails with an error similar to the following output:

ld.lld -error-limit=0 -z stack-size=16777216 --gc-sections --eh-frame-hdr -m elf_x86_64 -o /root/.cache/zig/o/ce8888c0ef271e014f4b6291c8a8ec32/conftest /root/.cache/zig/o/94ffcf31c5e4cc64cd94e363da2a1e71/Scrt1.o /root/.cache/zig/o/468f28
6874aca0b60f01f3c146352a21/crti.o -L /data/third_party/out/lib -dynamic-linker /lib64/ld-linux-x86-64.so.2 /root/.cache/zig/o/f72c4fbb6ae144af50bb0ba0363dabe2/conftest.o /root/.cache/zig/o/e6594b6bdf5bcecfb938b6455a8ccf86/libcompiler_rt.
a /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/libm.so.6 /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/libpthread.so.0 /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/libc.so.6 /root/.cache/zig/o/c35965bcbdf27efb487c3cf4
58cbf195/libdl.so.2 /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/librt.so.1 /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/libld.so.2 /root/.cache/zig/o/c35965bcbdf27efb487c3cf458cbf195/libutil.so.1 /root/.cache/zig/o/5060c49
3281f22a32e2a15702477b771/libc_nonshared.a /root/.cache/zig/o/892c1b189e8dcfb850ef01e67bac746e/crtn.o --allow-shlib-undefined
warning(link): failed to save linking hash digest file: PathAlreadyExists
error: FileNotFound
configure:3098: $? = 1
configure:3114: error: in `/data/otp_src_24.0/lib/crypto':
configure:3116: error: cannot compute suffix of executables: cannot compile and link
See `config.log' for more details

This seems to possible be a problem with Zig CC's cache? Happy to help dig deeper into what's going on here!

@doawoo
Copy link
Author

doawoo commented Aug 27, 2021

Follow-up on this, the issue goes away once I force parallel configuration to be disabled, seems like some sort of race-condition

@folkertdev
Copy link

I have also gotten this error when running multiple instances of zig in parallel, I think it's a race-condition involving the global cache.

@andrewrk
Copy link
Member

Duplicate of #9431 - I'm on it. High priority for the (already overdue) 0.9.0 release.

@andrewrk andrewrk added this to the 0.9.0 milestone Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants