在 2025-5-7 23:59, Cowley, Kevin via Gcc-help 写道:
HI We have an issue when building on our Win8.1 Build machines. The issue used to be sporadic, 1 in 100 builds or so, but over the last few months has become regular, fails 75 in 100 times. The failure point is always random, and two different build machines exhibit the same fault. We believe it to be a windows/system issue but understanding what GCC is doing would allow us to potentially work out and remove the cause of the issue. It always occurs during compilation of Ada files. The failure is always the same "CreateProcess No Such file or Directory".
Would you please confirm whether it's a 32-bit or 64-bit system?
We know the source always exists at the point of failure, and we're always building 'clean'. Since this is all GCC tells us, we're somewhat stuck in diagnosing the issue. Is there any mechanism that would get GCC to give us more information about what is was attempting to do when the failure occurs.
In 'libiberty/pex-win32.c' there's: ``` /* Create the child process. */ pid = win32_spawn (obj, executable, (flags & PEX_SEARCH) != 0, argv, env, dwCreationFlags, &si, &pi); if (pid == (pid_t) -1) pid = spawn_script (obj, executable, argv, env, dwCreationFlags, &si, &pi); if (pid == (pid_t) -1) { *err = ENOENT; *errmsg = "CreateProcess"; } ```The code is probably not very good, as it just maps all errors to `ENOENT`. I suggest you add some logs there; be sure to print the value of `GetLastError()`.
-- Best regards, LIU Hao
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature