Bug 2189133 - a2ps: FTBFS in rawhide, 64-bit and C99 compatibility issues
Summary: a2ps: FTBFS in rawhide, 64-bit and C99 compatibility issues
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: a2ps
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCHelpNeeded
TreeView+ depends on / blocked
 
Reported: 2023-04-24 10:28 UTC by Florian Weimer
Modified: 2023-07-27 16:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-27 16:06:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2023-04-24 10:28:30 UTC
lib/path-concat.c redefines mempcpy before including <string.h>, causing a parse error in the header file (GCC's context reporting isn't great here):

path-concat.c:25:29: error: expected identifier or '(' before 'void'
   25 | # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
      |                             ^~~~
path-concat.c:25:37: error: expected ')' before '(' token
   25 | # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
      |                                     ^

Overall, the package is in a very bad state.

There are also many implicit function declarations during the build, like this example later in the same file:

path-concat.c: In function 'path_concat':
path-concat.c:81:23: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   81 |   p_concat = (char *) malloc (dir_len + base_len + 2);
      |                       ^~~~~~

These will be hard build failures with future compilers, and also tend to cause crashes on 64-bit architectures (if pointers are truncated to int).

The gperf configure version test does not work because it cannot cope with multi-line output from gperf --version.

I'm not sure if it is worth fixing this package because it still does not support UTF-8.

Reproducible: Always

Comment 1 Zdenek Dohnal 2023-04-27 12:56:00 UTC
Hi Florian,

thank you for reporting the issue!

There is a new a2ps version with new upstream https://bugzilla.redhat.com/show_bug.cgi?id=2176254 , I'll try to update to the newest version and we will see how many issue will be fixed.

Comment 2 Orion Poplawski 2023-06-04 20:37:54 UTC
Any progress on the update?

Comment 3 Zdenek Dohnal 2023-06-05 06:35:22 UTC
I'm in the process of rebasing the package to the latest version - https://bugzilla.redhat.com/show_bug.cgi?id=2176254 - it has many downstream patches, so in case you are in hurry, please send a PR with rebase and I'll review it.

Comment 4 Zdenek Dohnal 2023-07-27 16:06:32 UTC
Fixed in rawhide https://koji.fedoraproject.org/koji/taskinfo?taskID=104013671


Note You need to log in before you can comment on or make changes to this bug.