Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944138 - mail-filter/libmilter-1.0.2_p3-r2 header mfapi.h isn't C23 compatible
Summary: mail-filter/libmilter-1.0.2_p3-r2 header mfapi.h isn't C23 compatible
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 944899 (view as bug list)
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-20 12:39 UTC by Agostino Sarubbo
Modified: 2024-11-25 14:17 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,61.25 KB, text/plain)
2024-11-20 12:39 UTC, Agostino Sarubbo
Details
1-config.log (1-config.log,135.48 KB, text/plain)
2024-11-20 12:39 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-11-20 12:39:41 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: mail-filter/opendkim-2.10.3-r32 fails to compile.
Discovered on: arm64 (internal ref: tinderbox_arm64)
System: GCC-15-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-15)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-11-20 12:39:42 UTC
Created attachment 910499 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-11-20 12:39:43 UTC
Created attachment 910500 [details]
1-config.log

1-config.log
Comment 3 Michael Orlitzky gentoo-dev 2024-11-25 03:57:05 UTC
This is a problem in the libmilter header:

configure:19232: checking for libmilter/mfapi.h
configure:19232: aarch64-unknown-linux-gnu-gcc -c -O2 -march=native -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0  conftest.c >&5
In file included from conftest.c:143:
/usr/include/libmilter/mfapi.h:98:17: error: two or more data types in declaration specifiers
   98 | typedef int     bool;
      |                 ^~~~

The relevant code is,

#if SM_CONF_STDBOOL_H
# include <stdbool.h>
#else /* SM_CONF_STDBOOL_H */
# ifndef __cplusplus
#  ifndef bool
#   ifndef __bool_true_false_are_defined
typedef int     bool;
#    define false       0
#    define true        1
#    define __bool_true_false_are_defined       1
#   endif /* ! __bool_true_false_are_defined */
#  endif /* bool */
# endif /* ! __cplusplus */
#endif /* SM_CONF_STDBOOL_H */

If including <stdbool.h> is a no-op under C23 it might suffice to set SM_CONF_STDBOOL_H to a truthy value.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-25 11:48:07 UTC
stdbool.h is available with >=C99, so I think we can do that.
Comment 5 Larry the Git Cow gentoo-dev 2024-11-25 12:05:14 UTC
The bug has been closed via the following commit(s):

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

commit 29cbc6593419a67b45eacb870f25df68ad92ab61
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-25 12:04:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-25 12:04:15 +0000

    mail-filter/libmilter: fix compat in headers with C23
    
    Building mail-filter/opendkim without this patch would fail because
    mfapi.h doesn't include libmilter's own config header which defines
    SM_CONF_STDBOOL_H.
    
    We certainly only care about >= C99 compilers so we can just always
    take that path.
    
    Closes: https://bugs.gentoo.org/944138
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libmilter-1.0.2_p3-c23-bool.patch        |  19 +++
 mail-filter/libmilter/libmilter-1.0.2_p3-r3.ebuild | 138 +++++++++++++++++++++
 2 files changed, 157 insertions(+)
Comment 6 Michael Orlitzky gentoo-dev 2024-11-25 14:17:08 UTC
*** Bug 944899 has been marked as a duplicate of this bug. ***