bug-make
[Top][All Lists]
Advanced

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

[bug #56895] Cannot build make due to compiler warnings/failures


From: David A. Wheeler
Subject: [bug #56895] Cannot build make due to compiler warnings/failures
Date: Sat, 14 Sep 2019 23:32:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/bugs/?56895>

                 Summary: Cannot build make due to compiler warnings/failures
                 Project: make
            Submitted by: dwheeler
            Submitted on: Sun 15 Sep 2019 03:32:15 AM UTC
                Severity: 3 - Normal
              Item Group: Build/Install
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Compilation of the current git commit 271e572ba2f16f8d5b1d45c768bdec060073c279
dated Tue Sep 10 19:09:39 2019 +0300 fails on Cygwin, and probably many other
systems, because the latest gcc reports warnings that because of -WError
become compilation failures.

This affects these files:
* src/getopt.c
* src/job.c
* lib/findprog.h

Running "gcc --version" reports:
gcc (GCC) 7.4.0

To get to this point, simply "git clone" the current version onto Cygwin (and
probably other systems) and try to:
./bootstrap && ./configure && make check


Below is the relevant extract of the failure report (I had to remove -WError
to get it to run all the way to the final failure):

make[1]: Entering directory '/home/dwheeler/make'
depbase=`echo src/getopt.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H   -Isrc -I./src -Ilib -I./lib -DLIBDIR=\"/usr/local/lib\"
-DINCLUDEDIR=\"/usr/local/include\" -DLOCALEDIR=\"/usr/local/share/locale\" 
-DMAKE_MAINTAINER_MODE   -C -Wall -Wextra -Wwrite-strings -Wshadow
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond -g -O2 -MT
src/getopt.o -MD -MP -MF $depbase.Tpo -c -o src/getopt.o src/getopt.c &&\
mv -f $depbase.Tpo $depbase.Po

src/getopt.c: In function ‘_getopt_initialize’:
src/getopt.c:380:25: warning: unused parameter ‘argc’
[-Wunused-parameter]
 _getopt_initialize (int argc, char *const *argv, const char *optstring)
                         ^~~~
src/getopt.c:380:44: warning: unused parameter ‘argv’
[-Wunused-parameter]
 _getopt_initialize (int argc, char *const *argv, const char *optstring)
                                            ^~~~
src/getopt.c: In function ‘_getopt_internal’:
src/getopt.c:679:8: warning: suggest explicit braces to avoid ambiguous
‘else’ [-Wdangling-else]
     if (opterr)
        ^

...

depbase=`echo src/job.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H   -Isrc -I./src -Ilib -I./lib -DLIBDIR=\"/usr/local/lib\"
-DINCLUDEDIR=\"/usr/local/include\" -DLOCALEDIR=\"/usr/local/share/locale\" 
-DMAKE_MAINTAINER_MODE   -C -Wall -Wextra -Wwrite-strings -Wshadow
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond -g -O2 -MT
src/job.o -MD -MP -MF $depbase.Tpo -c -o src/job.o src/job.c &&\
mv -f $depbase.Tpo $depbase.Po
src/job.c: In function ‘child_execute_job’:
src/job.c:2374:19: error: too few arguments to function
‘find_in_given_path’
     cmd = (char *)find_in_given_path (argv[0], p);
                   ^~~~~~~~~~~~~~~~~~
In file included from src/job.c:141:0:
lib/findprog.h:52:20: note: declared here
 extern const char *find_in_given_path (const char *progname, const char
*path,
                    ^~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1341: src/job.o] Error 1
make[1]: Leaving directory '/home/dwheeler/make'
make: *** [Makefile:1427: all-recursive] Error 1





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56895>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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