[MacPorts] #61753: libast: error: implicitly declaring library function 'strlen' (was: Eterm installation on BigSur failing on libast)

MacPorts noreply at macports.org
Sat Dec 5 20:05:07 UTC 2020


#61753: libast: error: implicitly declaring library function 'strlen'
------------------------+-----------------------------
  Reporter:  rsmacleod  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  catalina bigsur
      Port:  libast     |
------------------------+-----------------------------
Changes (by ryandesign):

 * priority:  High => Normal
 * keywords:  libast Eterm => catalina bigsur


Old description:

> Hi,
> I am upgrading a Mac Mini to Bigsur and most of my fresh installs from
> MacPorts are working fine, except for Eterm.  I get a crash while making
> libist.
>
> Looks like some compiler problems:
>
> :info:build snprintf.c:45:22: error: unknown type name 'size_t'
>
> :info:build vsnprintf(char *str, size_t count, const char *fmt, va_list
> args)
>
> :info:build
>             ^
> :info:build snprintf.c:53:13: error: implicitly declaring library
> function 'str\
> len' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-
> function-decl\
> aration]
> :info:build     return (strlen(str));
> :info:build             ^
> :info:build snprintf.c:53:13: note: include the header <string.h> or
> explicitly\
>  provide a declaration for 'strlen'
> :info:build snprintf.c:58:21: error: unknown type name 'size_t'
> :info:build snprintf(char *str, size_t count, const char *fmt, ...)
> :info:build                     ^
>
> Thanks in advance for your help.
> Rob (U of Utah)

New description:

 Hi,
 I am upgrading a Mac Mini to Bigsur and most of my fresh installs from
 MacPorts are working fine, except for Eterm.  I get a crash while making
 libist.

 Looks like some compiler problems:

 {{{
 :info:build snprintf.c:45:22: error: unknown type name 'size_t'

 :info:build vsnprintf(char *str, size_t count, const char *fmt, va_list
 args)

 :info:build
             ^
 :info:build snprintf.c:53:13: error: implicitly declaring library function
 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-
 function-declaration]
 :info:build     return (strlen(str));
 :info:build             ^
 :info:build snprintf.c:53:13: note: include the header <string.h> or
 explicitly provide a declaration for 'strlen'
 :info:build snprintf.c:58:21: error: unknown type name 'size_t'
 :info:build snprintf(char *str, size_t count, const char *fmt, ...)
 :info:build                     ^
 }}}

 Thanks in advance for your help.\\
 Rob (U of Utah)

--

Comment:

 Yup, the well-known implicit function declaration problem we see with tons
 of ports as of Xcode 12. Needs to be fixed by including the right headers.

-- 
Ticket URL: <https://trac.macports.org/ticket/61753#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list