Opened 4 months ago

Last modified 5 weeks ago

#62247 accepted defect

anacron @2.3_3: error: implicitly declaring library function 'abort'

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc:
Port: anacron

Description

Another victim of -Werror=implicit-function-declaration being set by default:

make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_anacron/anacron/work/anacron-2.3'
cc -c -DSPOOLDIR=\"/opt/local/var/spool/anacron\" -DRELEASE=\"2.3\" -DANACRONTAB=\"/opt/local/etc/anacrontab\"  -Wall -pedantic -O2 -I. log.c -o log.o
cc -c -DSPOOLDIR=\"/opt/local/var/spool/anacron\" -DRELEASE=\"2.3\" -DANACRONTAB=\"/opt/local/etc/anacrontab\"  -Wall -pedantic -O2 -I. main.c -o main.o
cc -c -DSPOOLDIR=\"/opt/local/var/spool/anacron\" -DRELEASE=\"2.3\" -DANACRONTAB=\"/opt/local/etc/anacrontab\"  -Wall -pedantic -O2 -I. matchrx.c -o matchrx.o
cc -c -DSPOOLDIR=\"/opt/local/var/spool/anacron\" -DRELEASE=\"2.3\" -DANACRONTAB=\"/opt/local/etc/anacrontab\"  -Wall -pedantic -O2 -I. obstack.c -o obstack.o
obstack.c:406:5: error: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
    abort ();
    ^
obstack.c:406:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'abort'
obstack.c:486:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit (obstack_exit_failure);
  ^
obstack.c:486:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
2 errors generated.
make: *** [obstack.o] Error 1
make: *** Waiting for unfinished jobs....
matchrx.c:50:2: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
        memset(sub_offsets, 0, sizeof(regmatch_t) * (n_sub + 1));
        ^
matchrx.c:50:2: note: include the header <string.h> or explicitly provide a declaration for 'memset'
1 error generated.
main.c:125:6: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
            exit(0);
            ^
main.c:125:6: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
log.c:174:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
    exit(FAILURE_EXIT);
    ^
log.c:174:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 error generated.
1 error generated.
make: *** [matchrx.o] Error 1
make: *** [log.o] Error 1
make: *** [main.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_anacron/anacron/work/anacron-2.3'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_anacron/anacron/work/anacron-2.3" && /usr/bin/make -j16 -w all PREFIX=/opt/local 
Exit code: 2
Error: Failed to build anacron: command execution failed
DEBUG: Error code: CHILDSTATUS 61653 2

Change History (3)

comment:1 Changed 4 months ago by ryandesign (Ryan Schmidt)

Keywords: bigsur catalina added
Summary: anacron @2.3_3 fails to buildanacron @2.3_3: error: implicitly declaring library function 'abort'

This is the well-known implicit declaration of function issue with Xcode 12 and later that needs to be fixed in the usual way (include the right headers in the right places).

comment:2 Changed 4 months ago by ryandesign (Ryan Schmidt)

Owner: set to ryandesign
Status: newaccepted

Almost done fixing this and modernizing the rest of the port, except that #62292 is causing trouble.

comment:3 in reply to:  2 Changed 5 weeks ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

Almost done fixing this and modernizing the rest of the port, except that #62292 is causing trouble.

#62292 is closed now

Note: See TracTickets for help on using tickets.