Bug 8204 - Please use more recent autoconf for releases
Summary: Please use more recent autoconf for releases
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: P2 normal
Target Milestone: 4.0.1
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-19 13:47 UTC by fweimer@redhat.com
Modified: 2024-03-11 03:19 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
configure script rebuilt patch None Giovanni Bechis [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description fweimer@redhat.com 2023-12-19 13:47:27 UTC
SpamAssassin 4.0 was released with a configure script generated by autoconf 2.59, according to its file header. This autoconf version generates shell code that does not set the STDC_HEADERS macro correctly on compilers which do support implicit function declarations by default (Clang 16 and GCC 14, for example).

Alternatively, you can patch the generated script with the following patch:

diff -ur Mail-SpamAssassin-4.0.0.orig/spamc/configure Mail-SpamAssassin-4.0.0/spamc/configure
--- Mail-SpamAssassin-4.0.0.orig/spamc/configure	2022-12-14 07:03:27.000000000 +0100
+++ Mail-SpamAssassin-4.0.0/spamc/configure	2023-12-19 14:34:05.414644959 +0100
@@ -2119,7 +2119,7 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
-   '' \
+   '#include <stdlib.h>' \
    'extern "C" void std::exit (int) throw (); using std::exit;' \
    'extern "C" void std::exit (int); using std::exit;' \
    'extern "C" void exit (int) throw ();' \
@@ -2624,8 +2624,8 @@
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
 	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+      return 2;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext

There is no direct autoconf fix for this because the entire logic around declaring std::exit has been removed.
Comment 1 Giovanni Bechis 2023-12-19 15:21:54 UTC
Created attachment 5924 [details]
configure script rebuilt

configure script rebuilt with autoconf 2.71
Comment 2 Sidney Markowitz 2024-03-05 08:00:18 UTC
Is this ready to commit and close? It looks fine to me. Do we need to check that spamc still builds on ancient systems before we decide to accept this?
Comment 3 Giovanni Bechis 2024-03-05 09:31:27 UTC
Sending        spamc/config.h.in
Sending        spamc/configure
Transmitting file data ..done
Committing transaction...
Committed revision 1916121.

Apache SpamAssassin still builds on old systems.
Comment 4 Sidney Markowitz 2024-03-11 03:19:19 UTC
I'm adding a note here to document something I found even though it doesn't seem to require a fix.

A test build I made after this was committed failsd in t/spamc_H.t on some CPAN test machines that are running FreeBSD 10.1. The failure could be the result of spamc not properly getting round robin results to DNS queries of A records of multihomed.dnsbltest.spamassassi.org and that could be the result of the change in config.h.in and configure. However, I could not test this because I can't set up a VM with FreeBSD 10.1 as I could not find any complete archives of packages for this old long past end of support version. The test machines on CPAN must have been installed that long ago and are still running.

The commit for bug 8227 will now detect early if the system's DNS setup will not support the multihomed query used by t/spamc_H.t, or the large packet reply now used in t/askdns.t and t/spf.t. If that is the cause then we won't see anymore spamc_H.t failures and there will be nothing relevant to this issue that needs looking at.