Opened 4 days ago

Closed 3 days ago

Last modified 25 hours ago

#71022 closed defect (fixed)

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]

Reported by: amadeus24 Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.10.2
Keywords: sequoia Cc:
Port: libsvg

Description

Reinstalling macports on an MB Pro with M1 Max, Sequoia and libsvg quit at build.

Attachments (1)

main.log (82.5 KB) - added by amadeus24 4 days ago.

Download all attachments as: .zip

Change History (7)

Changed 4 days ago by amadeus24

Attachment: main.log added

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

Keywords: catalina bigsur monterey ventura sonoma sequoia added; libsvg don't build removed
Summary: libsvg don't buildlibsvg @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]

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. Implicit function declarations have been forbidden since Xcode 12 so I expected this to have been broken on earlier OS versions already, but our 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.

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

Keywords: catalina bigsur monterey ventura sonoma removed
Version: 2.10.2

comment:3 Changed 3 days ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In cbb7e48e21d439782ec2ef188977d42efeac46fb/macports-ports (master):

libsvg: fix implicit declaration errors

Closes: #71022

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

Ah, that explains it. You previously reported this problem in #66971 on an earlier macOS and we fixed some of the problems then.

comment:5 Changed 3 days ago by jmroot (Joshua Root)

I guess maybe some other systems headers were pulling in stdlib.h previously.

comment:6 Changed 25 hours ago by amadeus24

Now it works, thanks!

Note: See TracTickets for help on using tickets.