[MacPorts] #62291: ssed @3.62: error: implicitly declaring library function 'strcmp'

MacPorts noreply at macports.org
Sun Feb 14 00:57:29 UTC 2021


#62291: ssed @3.62: error: implicitly declaring library function 'strcmp'
-------------------------+--------------------
 Reporter:  cooljeanius  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.4
 Keywords:               |       Port:  ssed
-------------------------+--------------------
 Another victim of -Werror=implicit-function-declaration being on by
 default now:
 {{{
 if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl
 -I../pcre -I..       -I../lib -I../intl -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
 -MT getline.o -MD -MP -MF ".deps/getline.Tpo" -c -o getline.o getline.c; \
         then mv -f ".deps/getline.Tpo" ".deps/getline.Po"; else rm -f
 ".deps/getline.Tpo"; exit 1; fi
 if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl
 -I../pcre -I..       -I../lib -I../intl -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
 -MT obstack.o -MD -MP -MF ".deps/obstack.Tpo" -c -o obstack.o obstack.c; \
         then mv -f ".deps/obstack.Tpo" ".deps/obstack.Po"; else rm -f
 ".deps/obstack.Tpo"; exit 1; fi
 if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl
 -I../pcre -I..       -I../lib -I../intl -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
 -MT strverscmp.o -MD -MP -MF ".deps/strverscmp.Tpo" -c -o strverscmp.o
 strverscmp.c; \
         then mv -f ".deps/strverscmp.Tpo" ".deps/strverscmp.Po"; else rm
 -f ".deps/strverscmp.Tpo"; exit 1; fi
 getopt.c:576:30: error: implicitly declaring library function 'strcmp'
 with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-
 declaration]
       if (optind != argc && !strcmp (argv[optind], "--"))
                              ^
 getopt.c:576:30: note: include the header <string.h> or explicitly provide
 a declaration for 'strcmp'
 getopt.c:655:21: error: implicitly declaring library function 'strlen'
 with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-
 declaration]
                 == (unsigned int) strlen (p->name))
                                   ^
 getopt.c:655:21: note: include the header <string.h> or explicitly provide
 a declaration for 'strlen'
 getopt.c:703:6: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
                    else
                    ^
 1 warning and 2 errors generated.
 getline.c:34:1: error: conflicting types for 'getline'
 getline (lineptr, n, stream)
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:355:9:
 note: previous declaration is here
 ssize_t getline(char ** __restrict __linep, size_t * __restrict
 __linecapp, FILE * __restrict __stream)
 __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
         ^
 make[2]: *** [getopt.o] Error 1
 make[2]: *** Waiting for unfinished jobs....
 1 error generated.
 make[2]: *** [getline.o] Error 1
 utils.c:96:4: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
           unlink (open_files->name);
           ^
 utils.c:134:8: warning: promoted type 'int' of K&R function parameter is
 not compatible with the parameter type 'bool' declared in a previous
 prototype [-Wknr-promoted-parameter]
   bool fail;
        ^
 ./utils.h:25:61: note: previous declaration is here
 FILE *ck_fopen P_((const char *name, const char *mode, bool fail));
                                                             ^
 utils.c:332:7: error: implicit declaration of function 'unlink' is invalid
 in C99 [-Werror,-Wimplicit-function-declaration]
       unlink (unlink_if_fail);
       ^
 1 warning and 2 errors generated.
 make[2]: *** [utils.o] Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62/lib'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62'
 make: *** [all] Error 2
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62"
 && /usr/bin/make -j16 -w all
 Exit code: 2
 Error: Failed to build ssed: command execution failed
 DEBUG: Error code: CHILDSTATUS 65095 2
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/62291>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list