Opened 4 years ago

Closed 4 years ago

#61870 closed defect (fixed)

primegen @0.97_0: implicitly declaring library function 'printf', 'exit'

Reported by: vespasian99 Owned by: toy
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina haspatch Cc:
Port: primegen

Description

primegen build fails on Big Sur arm64: implicitly declaring 'printf', 'exit'.

Attachments (1)

main.log (13.8 KB) - added by vespasian99 4 years ago.
build log

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by vespasian99

Attachment: main.log added

build log

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to toy
Status: newassigned

comment:2 Changed 4 years ago by toy

Looks like it is not related to arm64, but to clang version. For previous versions it was only warning about absence of header for printf and exit, but now it is an error. I'll try to add a patch.

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Yes, it changed from a warning to an error in Xcode 12. The reason for that was potential arm64 ABI issues.

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

Keywords: catalina haspatch added; arm64 removed
Summary: primegen @0.97_0 fails to build on Apple Siliconprimegen @0.97_0: implicitly declaring library function 'printf', 'exit'

comment:5 Changed 4 years ago by Ivan Kuchin <tadump+git@…>

Resolution: fixed
Status: assignedclosed

In 7752f4c66c4b4a08725b2dcf75fb71c558f48053/macports-ports (master):

primegen: Fix implicit function declarations

Fix issues in code that are causing error in Xcode 12 and caused
warnings in previous versions. Namely include missing stdio.h, use int
as return type for main and use return instead of exit in main.

Closes: #61870

Note: See TracTickets for help on using tickets.