Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944148 - mail-client/alpine-2.26-r4: build failure with gcc-15 (conflicting types/too many arguments)
Summary: mail-client/alpine-2.26-r4: build failure with gcc-15 (conflicting types/too ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: gcc-15
  Show dependency tree
 
Reported: 2024-11-20 14:28 UTC by Holger Hoffstätte
Modified: 2024-11-26 10:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2024-11-20 14:28:55 UTC
Unfortunately as expected:

gcc-15 -DHAVE_CONFIG_H   -I../../include -I../../include -I/usr/include/openssl  -g  -pipe -march=znver2 -O2 -Wno-error=strict-prototypes -Wno-error=incompatible-pointer-types -DOPENSSL_1_1_0 -DOPENSSL_API_COMPAT=0x10100000L -c -o collate.o collate.c
In file included from collate.c:15:
collate.c: In function 'set_collation':
../../include/system.h:94:19: error: conflicting types for 'strcoll'; have 'int(void)'
   94 | # define collator strcoll
      |                   ^~~~~~~
collate.c:29:16: note: in expansion of macro 'collator'
   29 |     extern int collator();  /* set to strcoll if available in system.h */
      |                ^~~~~~~~
In file included from ../../include/system.h:45:
/usr/include/string.h:163:12: note: previous declaration of 'strcoll' with type 'int(const char *, const char *)'
  163 | extern int strcoll (const char *__s1, const char *__s2)
      |            ^~~~~~~
collate.c:31:15: warning: assignment to 'int (*)(void)' from incompatible pointer type 'int (*)(char *, char *)' [-Wincompatible-pointer-types]
   31 |     pcollator = strucmp;
      |               ^
collate.c: In function 'sstrcasecmp':
collate.c:79:13: error: too many arguments to function 'pcollator'
   79 |     return((*pcollator)(*(char **)s1, *(char **)s2));
      |            ~^~~~~~~~~~~
make[4]: *** [Makefile:487: collate.o] Error 1



Reproducible: Always
Comment 1 Holger Hoffstätte 2024-11-20 17:08:11 UTC
I tried to fix these but it then fails further down the road, in a place that is known to be terminally broken & wrong. While this (and my other things) is already fixed upstream as part of what I sent there last year, it would require applying ~170k of patches.

Those _do_ make it build with gcc-15 (I used the executable to read IMAP mail \o/) but don't mix with the current version of upstream's own extension patchset, which we of course use (and which is desirable, see https://alpineapp.email/alpine/index.html). I encouraged the author to just merge the extensions into the tree, but progress is glacial.

I'll try rebasing/fixing up the extension patchset, but if that doesn't work we will have to skip patching this for gcc-15 until upstream make a new release. :(
Comment 2 Holger Hoffstätte 2024-11-20 19:16:59 UTC
I managed to rebase the extension patchset on top of two large commits from upstream git that fix most modern C issues. As a consequence we can drop our duplicated chappa-clang patches. The patchball is large enough that it needs to be external (~812k unpacked), but I have a stable location for that.

I'll run this for a few days and then will make a PR.
Comment 3 Holger Hoffstätte 2024-11-21 11:59:46 UTC
This turned out to be even worse than initially expected since the release tarball is actually NOT what's in the git repo under the release tag.
Therefore the PR first creates a consistent timeline via git commits and then optionally adds the rebased & fixed chappa patchset on top.

This should tide us over until upstream makes a new release.
Comment 4 Larry the Git Cow gentoo-dev 2024-11-25 21:52:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdb3cc704d92ce3af5ee49e809702aa1be18f737

commit cdb3cc704d92ce3af5ee49e809702aa1be18f737
Author:     Holger Hoffstätte <holger@applied-asynchrony.com>
AuthorDate: 2024-11-21 11:31:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-25 21:52:23 +0000

    mail-client/alpine: add upstream patches to fix build with gcc-15
    
    Add patches from upstream git to fix all serious C99/C23 problems.
    The "chappa" extension patches were rebased on top of that.
    This should tide us over until the next release.
    
    Closes: https://bugs.gentoo.org/944148
    Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
    Closes: https://github.com/gentoo/gentoo/pull/39395
    Signed-off-by: Sam James <sam@gentoo.org>

 mail-client/alpine/Manifest              |   1 +
 mail-client/alpine/alpine-2.26-r5.ebuild | 109 +++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)
Comment 5 Ulrich Müller gentoo-dev 2024-11-26 10:32:11 UTC
Patch 0023 of the series fails:

 * Applying 0023-Fix-for-a-better-bound-check-in-imap-src-c-client-nn.patch ...
patching file imap/src/c-client/nntp.c
patching file pith/pine.hlp
Hunk #1 FAILED at 147.
1 out of 1 hunk FAILED -- saving rejects to file pith/pine.hlp.rej       [ !! ]
Comment 6 Holger Hoffstätte 2024-11-26 10:34:20 UTC
(In reply to Ulrich Müller from comment #5)
> Patch 0023 of the series fails:
> 
>  * Applying 0023-Fix-for-a-better-bound-check-in-imap-src-c-client-nn.patch
> ...
> patching file imap/src/c-client/nntp.c
> patching file pith/pine.hlp
> Hunk #1 FAILED at 147.
> 1 out of 1 hunk FAILED -- saving rejects to file pith/pine.hlp.rej       [
> !! ]

No, it really does not. Please see https://bugs.gentoo.org/944973