bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 4.2.90 release candidate available


From: Eli Zaretskii
Subject: Re: GNU make 4.2.90 release candidate available
Date: Wed, 28 Aug 2019 12:29:22 +0300

> From: Paul Smith <address@hidden>
> Date: Mon, 26 Aug 2019 09:00:13 -0400
> 
> A new release candidate for GNU make 4.3 is available now for download:
> 
>     36083ab822b50a9ecbf5467cdadff55c  make-4.2.90.tar.bz2
>     e2c9abdeaf3725f8654a5e9d7a121fa9  make-4.2.90.tar.gz

Building this on MS-Windows using mingw.org's MinGW (GCC 7.3.0,
Binutils 2.32) reveals the following problems:

1. build_w32.bat fails to link:

     D:\gnu\make-4.2.90-guile>gcc -mthreads -gdwarf-2 -g3 -O2 -o 
.\GccRel\gnumake.exe @.\GccRel\link.sc 
-Wl,--out-implib=.\GccRel\libgnumake-1.dll.a
     gcc: error: .GccRelsrcar.o: No such file or directory
     gcc: error: .GccRelsrcarscan.o: No such file or directory
     gcc: error: .GccRelsrccommands.o: No such file or directory
     gcc: error: .GccRelsrcdefault.o: No such file or directory
     gcc: error: .GccRelsrcdir.o: No such file or directory
     gcc: error: .GccRelsrcexpand.o: No such file or directory
     gcc: error: .GccRelsrcfile.o: No such file or directory
     gcc: error: .GccRelsrcfunction.o: No such file or directory
     gcc: error: .GccRelsrcgetopt.o: No such file or directory
     gcc: error: .GccRelsrcgetopt1.o: No such file or directory
     gcc: error: .GccRelsrcguile.o: No such file or directory
     gcc: error: .GccRelsrchash.o: No such file or directory
     gcc: error: .GccRelsrcimplicit.o: No such file or directory
     gcc: error: .GccRelsrcjob.o: No such file or directory
     gcc: error: .GccRelsrcload.o: No such file or directory
     gcc: error: .GccRelsrcloadapi.o: No such file or directory
     gcc: error: .GccRelsrcmain.o: No such file or directory
     gcc: error: .GccRelsrcmisc.o: No such file or directory
     gcc: error: .GccRelsrcoutput.o: No such file or directory
     gcc: error: .GccRelsrcread.o: No such file or directory
     gcc: error: .GccRelsrcremake.o: No such file or directory
     gcc: error: .GccRelsrcremote-stub.o: No such file or directory
     gcc: error: .GccRelsrcrule.o: No such file or directory
     gcc: error: .GccRelsrcsigname.o: No such file or directory
     gcc: error: .GccRelsrcstrcache.o: No such file or directory
     gcc: error: .GccRelsrcvariable.o: No such file or directory
     gcc: error: .GccRelsrcversion.o: No such file or directory
     gcc: error: .GccRelsrcvpath.o: No such file or directory
     gcc: error: .GccRelsrcw32pathstuff.o: No such file or directory
     gcc: error: .GccRelsrcw32w32os.o: No such file or directory
     gcc: error: .GccRelsrcw32compatposixfcn.o: No such file or directory
     gcc: error: .GccRelsrcw32subprocmisc.o: No such file or directory
     gcc: error: .GccRelsrcw32subprocsub_proc.o: No such file or directory
     gcc: error: .GccRelsrcw32subprocw32err.o: No such file or directory
     gcc: error: .GccRellibfnmatch.o: No such file or directory
     gcc: error: .GccRellibglob.o: No such file or directory
     gcc: error: .GccRellibgetloadavg.o: No such file or directory

     .\GccRel build FAILED!

   This seems to be due to a subtle bug/misfeature in the GNU linker:
   it doesn't grok backslashes in file names in response files.  I
   needed to introduce a special variable to give each linker its
   preferred flavor of slashes.

2. Several compilation warnings (I can post the actual messages if
needed).

The patches for the problems I found are below.  Paul, if they are OK
with you, I will push them.  One issue we should probably talk about
is the UMASK gork: it isn't really working, as GCC emits warnings for
its use anyway ("statement with no effect" and "unused variable").  I
think the code should simply invoke 'umask' conditionally, and we
should lose the UMASK macro.

--- ./build_w32.bat~0   2019-08-26 00:18:19.000000000 +0300
+++ ./build_w32.bat     2019-08-28 11:58:21.256000000 +0300
@@ -154,6 +154,8 @@ exit 1
 
 :FoundMSVC
 set OUTDIR=.\WinRel
+set LNKOUT=.\WinRel
+set S=\
 set "OPTS=/O2 /D NDEBUG"
 set LINKOPTS=
 if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
@@ -168,9 +170,13 @@ goto Build
 
 :FindGcc
 set OUTDIR=.\GccRel
+:: GNU linker doesn't like backslashes in @FILE, so we use a separate var
+set LNKOUT=./GccRel
+set S=/
 set OPTS=-O2
 if "%DEBUG%" == "Y" set OPTS=-O0
 if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
+if "%DEBUG%" == "Y" set LNKOUT=./GccDebug
 if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
 :: Show the compiler version that we found
 echo.
@@ -204,43 +210,43 @@ copy lib\fnmatch.in.h %OUTDIR%\lib\fnmat
 
 if exist %OUTDIR%\link.sc del %OUTDIR%\link.sc
 
-call :Compile src\ar
-call :Compile src\arscan
-call :Compile src\commands
-call :Compile src\default
-call :Compile src\dir
-call :Compile src\expand
-call :Compile src\file
-call :Compile src\function
-call :Compile src\getopt
-call :Compile src\getopt1
-call :Compile src\guile GUILE
-call :Compile src\hash
-call :Compile src\implicit
-call :Compile src\job
-call :Compile src\load
-call :Compile src\loadapi
-call :Compile src\main GUILE
-call :Compile src\misc
-call :Compile src\output
-call :Compile src\read
-call :Compile src\remake
-call :Compile src\remote-stub
-call :Compile src\rule
-call :Compile src\signame
-call :Compile src\strcache
-call :Compile src\variable
-call :Compile src\version
-call :Compile src\vpath
-call :Compile src\w32\pathstuff
-call :Compile src\w32\w32os
-call :Compile src\w32\compat\posixfcn
-call :Compile src\w32\subproc\misc
-call :Compile src\w32\subproc\sub_proc
-call :Compile src\w32\subproc\w32err
-call :Compile lib\fnmatch
-call :Compile lib\glob
-call :Compile lib\getloadavg
+call :Compile src%S%ar
+call :Compile src%S%arscan
+call :Compile src%S%commands
+call :Compile src%S%default
+call :Compile src%S%dir
+call :Compile src%S%expand
+call :Compile src%S%file
+call :Compile src%S%function
+call :Compile src%S%getopt
+call :Compile src%S%getopt1
+call :Compile src%S%guile GUILE
+call :Compile src%S%hash
+call :Compile src%S%implicit
+call :Compile src%S%job
+call :Compile src%S%load
+call :Compile src%S%loadapi
+call :Compile src%S%main GUILE
+call :Compile src%S%misc
+call :Compile src%S%output
+call :Compile src%S%read
+call :Compile src%S%remake
+call :Compile src%S%remote-stub
+call :Compile src%S%rule
+call :Compile src%S%signame
+call :Compile src%S%strcache
+call :Compile src%S%variable
+call :Compile src%S%version
+call :Compile src%S%vpath
+call :Compile src%S%w32%S%pathstuff
+call :Compile src%S%w32%S%w32os
+call :Compile src%S%w32%S%compat%S%posixfcn
+call :Compile src%S%w32%S%subproc%S%misc
+call :Compile src%S%w32%S%subproc%S%sub_proc
+call :Compile src%S%w32%S%subproc%S%w32err
+call :Compile lib%S%fnmatch
+call :Compile lib%S%glob
+call :Compile lib%S%getloadavg
 
 if not "%COMPILER%" == "gcc" call :Compile src\w32\compat\dirent
 
@@ -262,7 +268,8 @@ goto :EOF
 ::
 
 :Compile
-echo %OUTDIR%\%1.%O% >>%OUTDIR%\link.sc
+if "%COMPILER%" == "gcc" echo %LNKOUT%/%1.%O% >>%OUTDIR%\link.sc
+if not "%COMPILER%" == "gcc" echo %LNKOUT%\%1.%O% >>%OUTDIR%\link.sc
 set EXTRAS=
 if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
 if exist "%OUTDIR%\%1.%O%" del "%OUTDIR%\%1.%O%"
@@ -277,7 +284,7 @@ goto CompileDone
 :GccCompile
 :: GCC Compile
 echo on
-%COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src 
-I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H 
%EXTRAS% -o %OUTDIR%\%1.%O% -c %1.c
+%COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src 
-I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H 
%EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
 @echo off
 
 :CompileDone
@@ -285,13 +292,14 @@ if not exist "%OUTDIR%\%1.%O%" exit 1
 goto :EOF
 
 :Link
-echo Linking %OUTDIR%/%MAKE%.exe
+echo.
+echo Linking %LNKOUT%/%MAKE%.exe
 if "%COMPILER%" == "gcc" goto GccLink
 
 :: MSVC Link
 echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
odbccp32.lib >>%OUTDIR%\link.sc
 echo on
-link.exe /NOLOGO /SUBSYSTEM:console /PDB:%OUTDIR%\%MAKE%.pdb %LINKOPTS% 
/OUT:%OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc
+link.exe /NOLOGO /SUBSYSTEM:console /PDB:%LNKOUT%\%MAKE%.pdb %LINKOPTS% 
/OUT:%LNKOUT%\%MAKE%.exe @%LNKOUT%\link.sc
 @echo off
 goto :EOF
 
@@ -299,7 +307,7 @@ goto :EOF
 :: GCC Link
 echo on
 echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
-lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
-%COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %OUTDIR%\%MAKE%.exe 
@%OUTDIR%\link.sc -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a
+%COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %LNKOUT%/%MAKE%.exe 
@%LNKOUT%/link.sc -Wl,--out-implib=%LNKOUT%/libgnumake-1.dll.a
 @echo off
 goto :EOF
 
@@ -388,8 +396,10 @@ set LINKOPTS=
 set MAKE=
 set NOGUILE=
 set O=
+set S=
 set OPTS=
 set OUTDIR=
+set LNKOUT=
 set PKGMSC=
 set VSVARS=
 goto :EOF


--- ./src/arscan.c~0    2019-08-25 19:57:50.000000000 +0300
+++ ./src/arscan.c      2019-08-28 10:54:17.490375000 +0300
@@ -909,7 +909,7 @@ ar_member_touch (const char *arname, con
   for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
     ar_hdr.ar_date[ui] = ' ';
   sprintf (TOCHAR (ar_hdr.ar_date), "%lu", (long unsigned) statbuf.st_mtime);
-  ar_hdr.ar_date[strlen (ar_hdr.ar_date)] = ' ';
+  ar_hdr.ar_date[strlen ((char *) ar_hdr.ar_date)] = ' ';
 #else
   ar_hdr.ar_date = statbuf.st_mtime;
 #endif


--- ./src/config.h.W32~0        2019-08-26 14:34:02.000000000 +0300
+++ ./src/config.h.W32  2019-08-28 11:47:58.927875000 +0300
@@ -470,6 +470,11 @@ char *ttyname (int);
 /* Define to empty if 'const' does not conform to ANSI C. */
 /* #undef const */
 
+#ifdef __MINGW32__
+# undef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+
 #include <sys/types.h>
 
 /* Define to 'int' if <sys/types.h> doesn't define. */


--- ./src/output.c~0    2019-08-25 19:57:50.000000000 +0300
+++ ./src/output.c      2019-08-28 11:47:00.506000000 +0300
@@ -281,7 +281,9 @@ release_semaphore (void *sem)
 int
 output_tmpfd (void)
 {
+#ifdef HAVE_UMASK
   MODE_T mask = UMASK (0077);
+#endif
   int fd = -1;
   FILE *tfile = tmpfile ();
 
@@ -297,7 +299,9 @@ output_tmpfd (void)
 
   set_append_mode (fd);
 
+#ifdef HAVE_UMASK
   UMASK (mask);
+#endif
 
   return fd;
 }


--- ./src/w32/subproc/sub_proc.c~0      2019-08-25 19:57:50.000000000 +0300
+++ ./src/w32/subproc/sub_proc.c        2019-08-28 11:44:13.568500000 +0300
@@ -108,7 +108,7 @@ DWORD process_wait_for_multiple_objects(
             continue;
             break;
           case WAIT_FAILED:
-            fprintf(stderr,"WaitForMultipleOjbects failed waiting with error 
%d\n", GetLastError());
+            fprintf(stderr,"WaitForMultipleOjbects failed waiting with error 
%lu\n", GetLastError());
             break;
           default:
             if (retVal >= WAIT_ABANDONED_0) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]