Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899782 - mail-filter/spamassassin-4.0.0-r1 has implicit function declarations in configure logs (GCC-13-SYSTEM)
Summary: mail-filter/spamassassin-4.0.0-r1 has implicit function declarations in confi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-03-06 09:32 UTC by Agostino Sarubbo
Modified: 2023-03-19 16:58 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,135.31 KB, text/plain)
2023-03-06 09:32 UTC, Agostino Sarubbo
Details
config.log for reference. (config.log,35.94 KB, text/plain)
2023-03-17 15:39 UTC, Philippe Chaintreuil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-03-06 09:32:34 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: mail-filter/spamassassin-4.0.0-r1 has implicit function declarations in configure logs (GCC-13-SYSTEM).
Discovered on: amd64 (internal ref: gcc13_tinderbox)

NOTE:
(GCC-13-SYSTEM) in the summary means that the bug was found on a machine that runs gcc-13 but this bug MAY or MAY NOT BE related to the new compiler
See also: https://bugs.gentoo.org/898488#c4.
Comment 1 Agostino Sarubbo gentoo-dev 2023-03-06 09:32:36 UTC
Created attachment 856262 [details]
build.log

build log and emerge --info
Comment 2 Philippe Chaintreuil 2023-03-17 15:39:01 UTC
Created attachment 858107 [details]
config.log for reference.
Comment 3 Philippe Chaintreuil 2023-03-17 15:46:06 UTC
Gonna' mumble to myself in here.

Only section in config.log that I see which refers to "implicit":
============================================================================
configure:2499: checking for ANSI C header files
configure:2524: x86_64-pc-linux-gnu-gcc -c -O2 -pipe -mtune=generic  conftest.c >&5
configure:2530: $? = 0
configure:2534: test -z 
                         || test ! -s conftest.err
configure:2537: $? = 0
configure:2540: test -s conftest.o
configure:2543: $? = 0
configure:2632: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -mtune=generic  -Wl,-O1 -Wl,--as-needed conftest.c  >&5
conftest.c: In function 'main':
conftest.c:26:7: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   26 |       exit(2);
      |       ^~~~
conftest.c:10:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    9 | #include <ctype.h>
  +++ |+#include <stdlib.h>
   10 | #if ((' ' & 0x0FF) == 0x020)
conftest.c:26:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   26 |       exit(2);
      |       ^~~~
conftest.c:26:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
conftest.c:27:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   27 |   exit (0);
      |   ^~~~
conftest.c:27:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
configure:2635: $? = 0
configure:2637: ./conftest
configure:2640: $? = 0
configure:2655: result: yes
============================================================================

From configure itself:

============================================================================
if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
                   (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      exit(2);
  exit (0);
}
_ACEOF
============================================================================

But I have no idea where that's coming from.  grepping in .../spamc/ for "LOWER" or "exit" only return these two files.  Is it a standard autoconf test, like a part of AC_HEADER_STDC?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-17 15:55:43 UTC
That one is a standard autoconf test, so eautoreconf should fix it (we have it patched in Gentoo & the next autoconf release fixes it).
Comment 5 Larry the Git Cow gentoo-dev 2023-03-19 03:22:45 UTC
The bug has been closed via the following commit(s):

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

commit e1b5e2c00f0849411d482dc1af43fe9120903da3
Author:     Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
AuthorDate: 2023-03-18 00:49:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-19 03:06:03 +0000

    mail-filter/spamassassin: eautoreconf spamc
    
    To deal with "implicit function declarations" in configure logs coming
    out of a standard autoconf test, run eautoreconf on spamc.  Word is that
    the standard test is fixed in the next autoconf release, so this may not
    need to stick around for too long.
    
    Closes: https://bugs.gentoo.org/899782
    Closes: https://github.com/gentoo/gentoo/pull/30200
    Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../spamassassin/spamassassin-4.0.0-r2.ebuild      | 338 +++++++++++++++++++++
 1 file changed, 338 insertions(+)
Comment 6 Philippe Chaintreuil 2023-03-19 16:58:21 UTC
Thanks, Sam!