[MacPorts] #71022: libsvg @0.1.4: error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] (was: libsvg don't build)

MacPorts noreply at macports.org
Wed Oct 2 19:17:18 UTC 2024


#71022: libsvg @0.1.4: error: call to undeclared library function 'malloc' with
type 'void *(unsigned long)'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
-------------------------+-------------------------------------------------
  Reporter:  amadeus24   |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:  catalina bigsur monterey ventura
      Port:  libsvg      |  sonoma sequoia
-------------------------+-------------------------------------------------
Changes (by ryandesign):

 * keywords:  libsvg don't build => catalina bigsur monterey ventura sonoma
     sequoia


Comment:

 The log says:

 {{{
 svg_paint.c:42:18: error: call to undeclared library function 'malloc'
 with type 'void *(unsigned long)'; ISO C99 and later do not support
 implicit function declarations [-Wimplicit-function-declaration]
    42 |         char            *id = malloc (length+1);
       |                               ^
 }}}

 This is curious. [wiki:WimplicitFunctionDeclaration Implicit function
 declarations] have been forbidden since Xcode 12 so I expected this to
 have been broken on earlier OS versions already, but our
 [https://ports.macports.org/port/libsvg/details/ port health indicators]
 show successful builds on macOS 14 and earlier. Still, this version of
 libsvg dates back to 2005, so I would not be at all surprised if it
 contained such bugs.

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


More information about the macports-tickets mailing list