[MacPorts] #63122: cronolog @1.6.2: error: implicitly declaring library function 'strcmp'

MacPorts noreply at macports.org
Mon Jun 21 02:05:25 UTC 2021


#63122: cronolog @1.6.2: error: implicitly declaring library function 'strcmp'
-----------------------------+----------------------
 Reporter:  cooljeanius      |      Owner:  (none)
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.7.1
 Keywords:  bigsur catalina  |       Port:  cronolog
-----------------------------+----------------------
 Another victim of `-Werror=implicit-function-declaration` being on by
 default now:
 {{{
 /usr/bin/clang -DPACKAGE=\"cronolog\" -DVERSION=\"1.6.2\"
 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1
 -DHAVE_UNISTD_H=1 -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_MKDIR=1
 -DHAVE_MKTIME=1 -DHAVE_PUTENV=1 -DHAVE_STRPTIME=1 -DHAVE_LOCALTIME_R=1
 -I. -I.    -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
 -c getopt.c
 getopt.c:577: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:577:30: note: include the header <string.h> or explicitly provide
 a declaration for 'strcmp'
 getopt.c:653:7: error: implicitly declaring library function 'strncmp'
 with type 'int (const char *, const char *, unsigned long)' [-Werror
 ,-Wimplicit-function-declaration]
         if (!strncmp (p->name, nextchar, nameend - nextchar))
              ^
 getopt.c:653:7: note: include the header <string.h> or explicitly provide
 a declaration for 'strncmp'
 getopt.c:656:21: error: implicitly declaring library function 'strlen'
 with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-
 declaration]
                 == (unsigned int) strlen (p->name))
                                   ^
 getopt.c:656:21: note: include the header <string.h> or explicitly provide
 a declaration for 'strlen'
 getopt.c:704:6: warning: add explicit braces to avoid dangling else
 [-Wdangling-else]
                    else
                    ^
 1 warning and 3 errors generated.
 make[1]: *** [getopt.o] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_cronolog/cronolog/work/cronolog-1.6.2/lib'
 make: *** [all-recursive] Error 1
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_cronolog/cronolog/work/cronolog-1.6.2'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_cronolog/cronolog/work/cronolog-1.6.2"
 && /usr/bin/make -j16 -w all
 Exit code: 2
 Error: Failed to build cronolog: command execution failed
 DEBUG: Error code: CHILDSTATUS 62471 2
 }}}

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


More information about the macports-tickets mailing list