On Thu, Jun 15, 2017 at 10:33 PM, Orgad Shaneh <org...@gmail.com> wrote:
> Hi, > > I'm using mingw32-make 4.2.1 from MSYS2/mingw32. > > When I abort a build, make fails to unlink the intermediate files. I > previously used 4.1.90, and I don't remember having these problems. > > This happens even for a single job (without -j). > > Output: > main.cpp > mingw32-make[1]: *** Deleting file 'obj/main.o' > mingw32-make[1]: unlink: obj/main.o: Permission denied > ^CTerminate batch job (Y/N)? y > mingw32-make[1]: *** [Makefile:7178: obj/main.o] Error 255 > Terminate batch job (Y/N)? y > mingw32-make: *** [Makefile:5574: app.exe] Error 255 > > - Orgad > Ok, I found out that the bug is not (entirely) in make. What causes this problem is the following patch applied by MSYS2 packages of mingw make: diff -Naur make-4.2.1/main.c make-4.2.1.new/main.c --- make-4.2.1/main.c 2016-05-31 09:17:26.000000000 +0200 +++ make-4.2.1.new/main.c 2017-02-20 22:55:09.051617838 +0100 @@ -1126,8 +1126,11 @@ #endif +/* setlocale interferes with line buffering if using parallel make on MinGW */ +#ifndef __MINGW32__ /* Set up gettext/internationalization support. */ setlocale (LC_ALL, ""); +#endif /* The cast to void shuts up compiler warnings on systems that disable NLS. */ (void)bindtextdomain (PACKAGE, LOCALEDIR); If I revert the patch, delete works as expected. I'll file a bug there. - Orgad
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make