Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#62776 closed defect (fixed)

feh@3.2.1: build fails due to implicit function definition

Reported by: jeffrey-hokanson (Jeffrey M. Hokanson) Owned by: kurthindenburg (Kurt Hindenburg)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port: feh

Description

I'm running macOS 11.3 with Xcode 12.5. I'm getting what I think is a common error where the build used to work under Xcode 11, but now that implicit functions definitions throw errors, the build fails.

Here is the relevant portion of the build log:

:notice:build --->  Building feh
:debug:build Executing org.macports.build (feh)
:debug:build Environment: 
:debug:build CC='/usr/bin/clang'
:debug:build CC_PRINT_OPTIONS='YES'
:debug:build CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/.CC_PRINT_OPTIONS'
:debug:build CFLAGS='-Os -arch x86_64'
:debug:build CPATH='/opt/local/include'
:debug:build CPPFLAGS='-I/opt/local/include'
:debug:build DEVELOPER_DIR='/Library/Developer/CommandLineTools'
:debug:build LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64'
:debug:build LIBRARY_PATH='/opt/local/lib'
:debug:build MACOSX_DEPLOYMENT_TARGET='11.2'
:debug:build SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1" && /usr/bin/make -j4 -w all PREF
IX=/opt/local 'exif=1' 'verscmp=0' 
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1" && /usr/bin/make -j4 -w all PREFIX
=/opt/local 'exif=1' 'verscmp=0' 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1'
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/man'
:info:build make[1]: Nothing to be done for `all'.
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/man'
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/share/applications'
:info:build make[1]: Nothing to be done for `all'.
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/share/applications'
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/src'
:info:build /usr/bin/clang -Os -arch x86_64 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=
\"feh\" -DVERSION=\"3.2.1\" -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=\"feh\" -DVERSIO
N=\"3.2.1\" -I/opt/local/include  -c -o getopt.o getopt.c
:info:build /usr/bin/clang -Os -arch x86_64 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=
\"feh\" -DVERSION=\"3.2.1\" -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=\"feh\" -DVERSIO
N=\"3.2.1\" -I/opt/local/include  -c -o getopt1.o getopt1.c
:info:build /usr/bin/clang -Os -arch x86_64 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=
\"feh\" -DVERSION=\"3.2.1\" -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=\"feh\" -DVERSIO
N=\"3.2.1\" -I/opt/local/include  -c -o gib_hash.o gib_hash.c
:info:build /usr/bin/clang -Os -arch x86_64 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=\"feh\" -DVERSION=\"3.2.1\" -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/opt/local\" -DPACKAGE=\"feh\" -DVERSION=\"3.2.1\" -I/opt/local/include  -c -o gib_imlib.o gib_imlib.c
:info:build getopt.c:366:5: warning: unused parameter 'argc' [-Wunused-parameter]
:info:build int argc;
:info:build     ^
:info:build getopt.c:367:14: warning: unused parameter 'argv' [-Wunused-parameter]
:info:build char *const *argv;
:info:build              ^
:info:build getopt.c:539:26: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build                 if (optind != argc && !strcmp(argv[optind], "--")) {
:info:build                                        ^
:info:build getopt.c:539:26: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
:info:build getopt.c:610:9: error: implicitly declaring library function 'strncmp' with type 'int (const char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
:info:build                         if (!strncmp(p->name, nextchar, nameend - nextchar)) {
:info:build                              ^
:info:build getopt.c:610:9: note: include the header <string.h> or explicitly provide a declaration for 'strncmp'
:info:build getopt.c:611:63: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build                                 if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen(p->name)) {
:info:build                                                                                           ^
:info:build getopt.c:611:63: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
:info:build 2 warnings and 3 errors generated.
:info:build make[1]: *** [getopt.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1/src'
:info:build make: *** [build-src] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_feh/feh/work/feh-3.2.1" && /usr/bin/make -j4 -w all PREFIX=/opt/local 'exif=1' 'verscmp=0' 
:info:build Exit code: 2
:error:build Failed to build feh: command execution failed
:debug:build Error code: CHILDSTATUS 32831 2

Change History (6)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

We could start by trying to update feh to a newer version; maybe they've already fixed it.

comment:2 Changed 3 years ago by jeffrey-hokanson (Jeffrey M. Hokanson)

I tried building feh 3.6.3 from source at https://git.finalrewind.org/feh, but I got a similar error when running make:

filelist.c:414:10: error: implicit declaration of function 'strverscmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

comment:3 Changed 3 years ago by jeffrey-hokanson (Jeffrey M. Hokanson)

This is apparently a known issue on the feh github page; https://github.com/derf/feh/issues/385. Adding the parameter verscmp=0 to the make line fixed the issue.

comment:4 Changed 2 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added

trying to get 3.8 to build - a number of "invalid in C99" under 12.1

comment:5 Changed 2 years ago by kurthindenburg (Kurt Hindenburg)

Owner: set to kurthindenburg
Resolution: fixed
Status: newclosed

In e7356b06de044d31cf55250785bbeb058a3865a4/macports-ports (master):

feh: update to 3.8; fix +universal

Use patch provided by johnrosshunt(@gmail.com) in https://github.com/macports/macports-ports/pull/59701. I can only
test on 12.1 system; both -universal and + universal work.

closes #59701
closes #62776

comment:6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

In 472274aa8d3e090391eec74d152c348cc4399042/macports-ports (master):

feh: Improve implicit function declaration fix

See: #62776

Note: See TracTickets for help on using tickets.