Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#61446 closed defect (fixed)

man @1.6g+xcode: error: implicitly declaring library function 'strcmp'

Reported by: rswail (Ron Wail) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: bigsur catalina Cc:
Port: man

Description

There appears to be two errors in the build:

  :info:build In file included from to_cat.c:2:
  :info:build In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0
  .sdk/usr/include/stdlib.h:66:
  :info:build In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0
  .sdk/usr/include/sys/wait.h:109:
  :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/signal.h:182:10: error: type name requires a specifier or qualifier
  :info:build         uid_t   si_uid;                 /* sender's ruid */
  :info:build                 ^
  :info:build In file included from glob.c:63:
  :info:build In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/stdlib.h:66:
  :info:build In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/wait.h:109:
  :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/signal.h:182:10: error: type name requires a specifier or qualifier
  :info:build         uid_t   si_uid;                 /* sender's ruid */
  :info:build                 ^

and

  :info:build makemsg.c:62:10: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)'   [-Werror,-Wimplicit-function-declaration]
  :info:build     if (!strcmp(argv[1], "-c")) {
  :info:build          ^
  :info:build makemsg.c:62:10: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'

Change History (5)

comment:1 Changed 4 years ago by rswail (Ron Wail)

Summary: man @1.6g fails to build on Big Sur 11.0.1 and Xcode 12.2man @1.6g+xcode fails to build on Big Sur 11.0.1 and Xcode 12.2

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

Owner: set to ryandesign
Status: newaccepted

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

Resolution: fixed
Status: acceptedclosed

In e742efeadc9428b49fa9370c427a08b5ff175715/macports-ports (master):

man: Use MP flags; fix implicit function; add deps

Use the CFLAGS and LDFLAGS supplied by MacPorts, including optimization
flags and -arch flags. Allows a universal variant to be used.

See: #23108

Fix implicit function declaration which prevents build with Xcode 12 and
later.

Closes: #61446

Add deps on lynx and xz because it opportunistically uses them.

Change the deps from _run to _lib because the configure script needs to
see them at build time.

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

Keywords: bigsur catalina added

I verified and fixed the implicit function declaration using a modified MacPorts base on High Sierra. The remaining Xcode 12-related build failure is now filed as #61558.

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

Summary: man @1.6g+xcode fails to build on Big Sur 11.0.1 and Xcode 12.2man @1.6g+xcode: error: implicitly declaring library function 'strcmp'
Note: See TracTickets for help on using tickets.