Wednesday, June 03, 2026

[llvm22] fix devel/autogen build

autogen fails to build because its {,sig}setjmp(3) detection is broken: checking whether setjmp() links okay... no checking whether sigsetjmp() links okay... no ... configure: error: AutoGen requires sigsetjmp(3) The problem is that both functions want a sigjmp_buf, not a sigjmp_buf *. Patch for ag_macros.m4 fixes this by passing bf instead of &bf twice. I regenerated the other patch and fiddled with CONFIGURE_STYLE and AUTOCONF_VERSION until it built. The completely incomprehensible error messages on the way there always confuse me, so I hope someone who understands this magic will be able to tell me how to do it right (or commit a fixed version of the diff below). With this fixed, devel/ti-msp430gcc packages. Index: Makefile =================================================================== RCS file: /cvs/ports/devel/autogen/Makefile,v diff -u -p -r1.28 Makefile --- Makefile 1 Nov 2025 11:16:41 -0000 1.28 +++ Makefile 3 Jun 2026 15:22:55 -0000 @@ -19,7 +19,9 @@ WANTLIB += c gmp guile iconv intl ltdl m LIB_DEPENDS= devel/gettext,-runtime \ lang/guile \ textproc/libxml -CONFIGURE_STYLE=gnu + +CONFIGURE_STYLE= autoconf +AUTOCONF_VERSION= 2.60 CONFIGURE_ARGS= --without-libregex \ --includedir=${PREFIX}/include/autogen Index: patches/patch-agen5_test_error_test =================================================================== RCS file: /cvs/ports/devel/autogen/patches/patch-agen5_test_error_test,v diff -u -p -r1.2 patch-agen5_test_error_test --- patches/patch-agen5_test_error_test 11 Mar 2022 18:49:41 -0000 1.2 +++ patches/patch-agen5_test_error_test 3 Jun 2026 15:07:15 -0000 @@ -1,9 +1,10 @@ # Cope with the additional abort message (don't panic -- this test # intentionally checks abort behaviour). ---- agen5/test/error.test.orig Sun Sep 24 04:11:15 2006 -+++ agen5/test/error.test Fri Nov 17 20:15:03 2006 -@@ -103,6 +103,7 @@ AutoGen aborting on signal <text-varies> +Index: agen5/test/error.test +--- agen5/test/error.test.orig ++++ agen5/test/error.test +@@ -103,6 +103,7 @@ AutoGen aborting on signal <text-varies> in state EMIT processing template error2.tpl on line 2 for function EXPR (11) Index: patches/patch-config_ag_macros_m4 =================================================================== RCS file: patches/patch-config_ag_macros_m4 diff -N patches/patch-config_ag_macros_m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-config_ag_macros_m4 3 Jun 2026 15:07:15 -0000 @@ -0,0 +1,21 @@ +Index: config/ag_macros.m4 +--- config/ag_macros.m4.orig ++++ config/ag_macros.m4 +@@ -78,7 +78,7 @@ AC_DEFUN([AG_LINK_SETJMP],[ + AC_CACHE_VAL([ag_cv_link_setjmp],[ + AC_TRY_LINK([@%:@include <setjmp.h>], + [jmp_buf bf; +-return setjmp(&bf);], ++return setjmp(bf);], + [ag_cv_link_setjmp=yes],[ag_cv_link_setjmp=no] + ) # end of TRY_LINK + ]) # end of AC_CACHE_VAL for ag_cv_link_setjmp +@@ -97,7 +97,7 @@ AC_DEFUN([AG_LINK_SIGSETJMP],[ + AC_CACHE_VAL([ag_cv_link_sigsetjmp],[ + AC_TRY_LINK([@%:@include <setjmp.h>], + [sigjmp_buf bf; +-return sigsetjmp(&bf,0);], ++return sigsetjmp(bf,0);], + [ag_cv_link_sigsetjmp=yes],[ag_cv_link_sigsetjmp=no] + ) # end of TRY_LINK + ]) # end of AC_CACHE_VAL for ag_cv_link_sigsetjmp

No comments:

Post a Comment