Windows error messages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows error messages

Paul Smith-20
It's always annoyed me that the Windows error messages generated by
make are so much different (and, arguably, less understandable) than
the ones it generates on other platforms.

For example on GNU/Linux:

! make: foobar: No such file or directory
! make: *** [work/misc/general4.mk.7;3: all] Error 127

But on Windows:

! process_begin: CreateProcess(NULL, foobar, ...) failed.
! make (e=2): The system cannot find the file specified.
! make: *** [work/misc/general4.mk.7;3: all] Error 2

Aside from the error code, is there a good reason to show this special
process_begin() message on Windows instead of just using the same error
reporting facilities that make uses on other platforms?

If we did I imagine it would look something like this:

! make: foobar: The system cannot find the file specified.
! make: *** [work/misc/general4.mk.7;3: all] Error 2

I'd really like to make this change if acceptable to the Windows folks
out there.

Cheers!


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

Re: Windows error messages

Eli Zaretskii
> From: Paul Smith <[hidden email]>
> Date: Tue, 10 Sep 2019 11:58:59 -0400
>
> ! process_begin: CreateProcess(NULL, foobar, ...) failed.
> ! make (e=2): The system cannot find the file specified.
> ! make: *** [work/misc/general4.mk.7;3: all] Error 2
>
> Aside from the error code, is there a good reason to show this special
> process_begin() message on Windows instead of just using the same error
> reporting facilities that make uses on other platforms?

The reasons are mostly historical.  The Windows sub-process code is
different from Posix and quite tricky, due to a few corner cases, like
running batch files etc., see the comments there.  In some situations,
seeing the actual way CreateProcess was called can help, because it is
not always easy to guess that in every use case, due to the
complications with quotes, special shell characters, etc.

> If we did I imagine it would look something like this:
>
> ! make: foobar: The system cannot find the file specified.
> ! make: *** [work/misc/general4.mk.7;3: all] Error 2
>
> I'd really like to make this change if acceptable to the Windows folks
> out there.

Fine with me, but maybe leave the current detailed message available
under --debug?

Thanks.

_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make