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
I'm occasionally seeing errors from zig cc, either one of:
error: unable to build compiler_rt: FileNotFound
error: FileNotFound
Not sure if both errors are just symptoms of the same problem or separate, ultimately it's about some file not being found. Keeping it together in this one issue for now.
zig is used as part of Acton, a programming language
actonc, the Acton compiler, generates C code as output and then invokes zig cc to compile that
the generated .h and .c files are written to a random temporary directory, like /tmp/acton-23ha3sASc4Mf
failures mostly happen in CI while running test suite
test suite consists of ~100 small acton programs, so actonc is run on each and invokes zig cc at least twice for each program (compiles acton module separately and then builds final executable)
tests are compiled and run concurrently, so zig cc is potentially running concurrently
It's not entirely simple to reproduce since it isn't happening consistently but rather sporadically. I have started collecting observed occurrences in actonlang/acton#1095
This includes a commit that likely fixed the problems we've seen with
spurious "File not found" errors from zig, see
ziglang/zig#13515. Although, since switching
to using zig more natively with build.zig, I don't think I've seen those
errors. Doesn't hurt upgrading though.
Cool! I agree that the linked commit sounds like a very plausible explanation and since that is now fixed, so is likely this issue.
I've switched to latest nightlies in the Acton project, where I encountered these issues.
I should say that I have recently also done changes to how zig is called from within Acton and I believe that since those changes the "File not found" issues have not appeared, but it's not entirely conclusive as it wasn't that frequently occurring in the first place. A little hard to tell.
I think the easiest thing going forward is to close this issue. If I see the problem again, I can reopen this issue or open a new one.
Zig Version
v0.10.0
Steps to Reproduce and Observed Behavior
I'm occasionally seeing errors from
zig cc
, either one of:error: unable to build compiler_rt: FileNotFound
error: FileNotFound
Not sure if both errors are just symptoms of the same problem or separate, ultimately it's about some file not being found. Keeping it together in this one issue for now.
actonc
, the Acton compiler, generates C code as output and then invokeszig cc
to compile that/tmp/acton-23ha3sASc4Mf
zig cc
at least twice for each program (compiles acton module separately and then builds final executable)zig cc
is potentially running concurrentlyIt's not entirely simple to reproduce since it isn't happening consistently but rather sporadically. I have started collecting observed occurrences in actonlang/acton#1095
Best bet to reproduce locally is to run the test suite in https://github.com/actonlang/acton/ repeatedly:
apt install gcc haskell-stack libprotobuf-c-dev make pkg-config procps zlib1g-dev
git clone https://github.com/actonlang/acton.git
cd acton && make -j
make test
until it failsI found #9431 while searching, but it's closed and well, the problem is certainly present in v0.10.0.
--verbose
to thezig cc
invocation, which I'm about to do...Expected Behavior
Program to compile successfully!
The text was updated successfully, but these errors were encountered: