mainGNU a2ps - Support: sr #110413, Build failure due to implicit...

 
 

sr #110413: Build failure due to implicit declaration of functions

Submitter:  Ryan Carsten Schmidt <ryandesign>
Submitted:  Wed 30 Dec 2020 03:55:41 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  Mac OS
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 05 Feb 2023 12:04:41 AM UTC, comment #1: 

This should be fixed by recent alpha releases, and in the upcoming 4.15.

Reuben Thomas <rrt>
Group administrator
Wed 30 Dec 2020 03:55:41 AM UTC, original submission:  

Hello, a2ps 4.14 fails to build on macOS with Xcode 12 due to implicit declaration of functions, such as:


error: implicit declaration of function 'puts' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
error: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Werror,-Wimplicit-function-declaration]
error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
error: implicit declaration of function 'ioctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
error: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]


Implicit declaration of functions has been deprecated since C99 but has only been a warning in most compilers until Apple changed it to an error in Xcode 12 in preparation for introducing ARM-based Macs. ARM uses different calling conventions for variadic and non-variadic functions so the compiler needs to know before you call a function what kind of function it is.

This was reported to MacPorts here: https://trac.macports.org/ticket/61729

I committed this patch to MacPorts to fix it: https://github.com/macports/macports-ports/blob/96a2a9021cfeb38f5b7abff54fc5d599ec8ce214/print/a2ps/files/implicit.patch

There have been many commits to your git repository since 4.14 was released so this patch may not be applicable to your sources anymore.

Perhaps you could try building your latest sources, and examine both the build output and the config.log for any remaining instances of implicit function declarations, fix them, and then maybe think about doing a new release of a2ps, since it has been 13 years since 4.14.

Ryan Carsten Schmidt <ryandesign>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rrt (Posted a comment)
  • -email is unavailable- added by ryandesign (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-05 rrt Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code