Opened 4 years ago

Closed 4 years ago

#61965 closed defect (fixed)

dap @3.7_0: implicit declaration of function 'dap_main' is invalid in C99

Reported by: ShadSterling (Shad Sterling) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc:
Port: dap

Description

:info:build dapruns.c:211:7: error: implicitly declaring library function 'strcat' with type 'char *(char *, const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build       strcat(name, suff);
:info:build       ^
:info:build dapruns.c:211:7: note: include the header <string.h> or explicitly provide a declaration for 'strcat'
:info:build            ^
:info:build prob.c:283:8: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use `isfinite((double)x)` instead. [-Wdeprecated-declarations]
:info:build   if (!finite(z))
:info:build        ^dappp.c:642:17: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build       namelen = strlen(*argv);
:info:build                 ^
:info:build dappp.c:642:17: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
:info:build ps1.c:904:29: error: implicit declaration of function 'dap_il' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build   dap_vd("pict_npts 0", 0); dap_il("pict_npts", &pict_npts);
:info:build                             ^
:info:build ps1.c:905:29: error: implicit declaration of function 'dap_sl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build   ptesti = (int *) &testd; /* *ptesti is the low order word of testd */  dap_vd("pict_type 5", 0); dap_sl("pict_type", pict_type);
:info:build                             ^
:info:build          ^ ~~~~~~~~~~~~~~
:info:build dap0.c:238:3: error: implicit declaration of function 'dap_main' is invalid in C99 [-Werror,-Wimplicit-function-declaration]ps1.c:906:30: 
:info:build error  dap_main(argc, argv);
:info:build   ^
:info:build : implicit declaration of function 'dap_dl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build   dap_vd("pict_dash -1", 0); dap_dl("pict_dash", &pict_dash);
:info:build                              ^

This came up in reinstalling everything after moving to Big Sur

Attachments (1)

main.log (49.5 KB) - added by ShadSterling (Shad Sterling) 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ShadSterling (Shad Sterling)

Attachment: main.log added

comment:1 Changed 4 years ago by ShadSterling (Shad Sterling)

It works with configure.compiler=macports-clang-11

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

Keywords: catalina added

Sure. This is the well-known implicit-function-declarations-are-now-an-error "feature" of Xcode 12.

I've tried updating the port to 3.10 and it still has the problem.

The INSTALL file even mentions it:

Note: when DAP_HOME/src/dap.c compiles, you will get a warning:

implicit declaration of function `strcat'

and when DAP_HOME/src/dap0.c compiles, you will get a warning:

implicit declaration of function `dap_main'

Ignore these warnings.

Of course, we cannot ignore the warnings as suggested, since it is now and error and no longer a warning. dap appears to be unmaintained upstream so I'll see if I can fix it.

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 940955568a2f07158e6f95bc3076387ee499f9e5/macports-ports (master):

dap: Fix implicit declaration of functions

Closes: #61965

Note: See TracTickets for help on using tickets.