Thankyou. Unfortunately, the version of gcc we're using is supplied as part of the ADAcore install so we're not in a position to rebuild it as we don't have the source for the version of GCC we're using. It does at least move our understanding of the issue forward. We're pretty sure it's not a GCC issue per say, its some sort of Windows issue (surprise, surprise, Not!), we're just trying to get a handle on what and why it's now become a major problem rather than an occasional annoyance. Regards Kevin Cowley -----Original Message----- From: LIU Hao <lh_mouse@xxxxxxx> Sent: 08 May 2025 09:53 To: Cowley, Kevin <kevin.cowley@xxxxxxx>; gcc-help@xxxxxxxxxxx Subject: Re: Need to understand what GCC is attempting to do at a failure point 在 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