SA Bugzilla – Bug 8204
Please use more recent autoconf for releases
Last modified: 2024-03-11 03:19:19 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.
Created attachment 5924 [details] configure script rebuilt configure script rebuilt with autoconf 2.71
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?
Sending spamc/config.h.in Sending spamc/configure Transmitting file data ..done Committing transaction... Committed revision 1916121. Apache SpamAssassin still builds on old systems.
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.