Opened 6 months ago

Last modified 3 months ago

#62631 new defect

fuzz @0.6_1: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]

Reported by: c-kloukinas Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: BigSur Cc: cooljeanius (Eric Gallager)
Port: fuzz

Description

Code is rejected by the compiler because it declares functions (e.g., strcmp) implicitly.

Maybe a missing include (maybe one that used to be auto-included but is no longer so)?

Having the same issue with these other ports btw - will raise separate tickets: grok mcrypt mmencode subversion-python27bindings tightvncport

Attachments (1)

main.log (18.1 KB) - added by c-kloukinas 6 months ago.
main installation log

Download all attachments as: .zip

Change History (3)

Changed 6 months ago by c-kloukinas

Attachment: main.log added

main installation log

comment:1 Changed 3 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:2 Changed 3 months ago by cooljeanius (Eric Gallager)

I'm pretty sure this is in the same getopt.c file that has been patched in other ports; if so, it should be pretty easy to fix here, as well. Here's my output:

/usr/bin/clang -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_GETCWD=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=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:580: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:580:30: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
getopt.c:656: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:656:7: note: include the header <string.h> or explicitly provide a declaration for 'strncmp'
getopt.c:659:21: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
                == (unsigned int) strlen (p->name))
                                  ^
getopt.c:659:21: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
getopt.c:707:6: warning: add explicit braces to avoid dangling else [-Wdangling-else]
                   else
                   ^
1 warning and 3 errors generated.
make: *** [getopt.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_fuzz/fuzz/work/fuzz-0.6'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_fuzz/fuzz/work/fuzz-0.6" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build fuzz: command execution failed
DEBUG: Error code: CHILDSTATUS 54557 2
Note: See TracTickets for help on using tickets.