From janneke at gnu.org Fri May 16 14:58:21 2025 From: janneke at gnu.org (Janneke Nieuwenhuizen) Date: Fri, 16 May 2025 14:58:21 +0200 Subject: [gnutls-help] [PATCH guile-gnutls] maint: Fix MinGW cross-build by using alloca from gnulib. Message-ID: <87jz6gyaoi.fsf@gnu.org> [resend b/o reject; removed CC: guile-user at gnu.org] Hi, Attached is a patch to include the gnulib's alloca-opt module to support cross-building to MinGW. As guile-websocket-0.2 added a dependency on guile-gnutls, it's nice to have guile-gnutls. For gnutls I'm using a gnutls-minimal, attached as tls.scm. Greetings, Janneke -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-maint-Fix-MinGW-cross-build-by-using-alloca-from-gnu.patch Type: text/x-patch Size: 3824 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tls.scm Type: application/octet-stream Size: 1367 bytes Desc: not available URL: -------------- next part -------------- -- Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar? https://AvatarAcademy.com From simon at josefsson.org Fri May 16 18:31:58 2025 From: simon at josefsson.org (Simon Josefsson) Date: Fri, 16 May 2025 18:31:58 +0200 Subject: [gnutls-help] [PATCH guile-gnutls] maint: Fix MinGW cross-build by using alloca from gnulib. In-Reply-To: <87jz6gyaoi.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Fri, 16 May 2025 14:58:21 +0200") References: <87jz6gyaoi.fsf@gnu.org> Message-ID: <87tt5kqzy9.fsf@josefsson.org> Thanks! Is there any simple way to test your usage mode in CI? I looked into getting a MinGW build environment suitable for guile-gnutls up but didn't have the required amount of patience to get all dependencies in a usable form... are there any supported container images with a MinGW environment available? I think there were some resistance to increase gnulib usage before, but maybe this increase is possible to justify... /Simon Janneke Nieuwenhuizen writes: > [resend b/o reject; removed CC: guile-user at gnu.org] > Hi, > > Attached is a patch to include the gnulib's alloca-opt module to support > cross-building to MinGW. As guile-websocket-0.2 added a dependency on > guile-gnutls, it's nice to have guile-gnutls. > > For gnutls I'm using a gnutls-minimal, attached as tls.scm. > > Greetings, > Janneke > >>From 5541ba021e31e418a7b345996ada481505074f1c Mon Sep 17 00:00:00 2001 > From: Janneke Nieuwenhuizen > Date: Fri, 16 May 2025 10:47:18 +0200 > Subject: [PATCH] maint: Fix MinGW cross-build by using alloca from gnulib. > > --- > .gitignore | 9 +++++++++ > Makefile.am | 6 +++--- > bootstrap | 3 +-- > configure.ac | 5 ++++- > guile/src/Makefile.am | 3 ++- > 5 files changed, 19 insertions(+), 7 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 7a068b4..716b07b 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -51,9 +51,18 @@ > /guile/tests/*.trs > /lib > /libtool > +/m4/00gnulib.m4 > +/m4/alloca.m4 > +/m4/gnulib-cache.m4 > +/m4/gnulib-common.m4 > +/m4/gnulib-comp.m4 > +/m4/gnulib-tool.m4 > +/m4/init-package-version.m4 > /m4/libtool.m4 > /m4/ltoptions.m4 > /m4/ltsugar.m4 > /m4/ltversion.m4 > /m4/lt~obsolete.m4 > +/m4/zzgnulib.m4 > +/gl > /stamp-h1 > diff --git a/Makefile.am b/Makefile.am > index 43c5de7..6a39f24 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1,5 +1,5 @@ > ## Process this file with automake to produce Makefile.in > -# Copyright (C) 2007-2023 Free Software Foundation, Inc. > +# Copyright (C) 2007-2025 Free Software Foundation, Inc. > # > # Author: Ludovic Court?s > # > @@ -23,9 +23,9 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ > --with-guile-site-ccache-dir='$$(libdir)/guile/$$(GUILE_EFFECTIVE_VERSION)/site-ccache' \ > --with-guile-extension-dir='$$(libdir)/guile/$$(GUILE_EFFECTIVE_VERSION)/extensions' > > -SUBDIRS = guile doc > +SUBDIRS = gl guile doc > > -EXTRA_DIST = cfg.mk CONTRIBUTING.md > +EXTRA_DIST = cfg.mk CONTRIBUTING.md m4/gnulib-cache.m4 > > # git-version-gen > EXTRA_DIST += $(top_srcdir)/.version > diff --git a/bootstrap b/bootstrap > index 99d5d29..0adf250 100755 > --- a/bootstrap > +++ b/bootstrap > @@ -1,8 +1,7 @@ > #! /bin/sh > > if test -x gnulib/gnulib-tool; then > - gnulib/gnulib-tool --no-changelog --aux-dir=build-aux --doc-base=doc --lib=libgl --m4-base=m4/ --source-base=gl/ --tests-base=tests --local-dir=gl --no-vc-files --libtool --import git-version-gen havelib gitlog-to-changelog readme-release update-copyright version-stamp > - rm -fv gl/* m4/00gnulib.m4 m4/gnulib-common.m4 m4/zzgnulib.m4 m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/gnulib-tool.m4 m4/init-package-version.m4 > + gnulib/gnulib-tool --no-changelog --aux-dir=build-aux --doc-base=doc --lib=libgl --m4-base=m4/ --source-base=gl/ --tests-base=tests --local-dir=gl --no-vc-files --libtool --import git-version-gen havelib gitlog-to-changelog readme-release update-copyright version-stamp alloca-opt > fi > > autoreconf -vif > diff --git a/configure.ac b/configure.ac > index 16e793c..8f7d3db 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1,5 +1,5 @@ > dnl Process this file with autoconf to produce a configure script. > -# Copyright (C) 2000-2023 Free Software Foundation, Inc. > +# Copyright (C) 2000-2025 Free Software Foundation, Inc. > # > # Author: Ludovic Court?s, Simon Josefsson, Nikos Mavrogiannopoulos > # > @@ -35,6 +35,8 @@ AC_CONFIG_HEADERS([config.h]) > > dnl Checks for programs. > AC_PROG_CC > +gl_EARLY > +gl_INIT > AC_PROG_CPP > AM_PROG_AR > LT_INIT([disable-static]) > @@ -522,6 +524,7 @@ AC_CONFIG_FILES([ > Makefile > doc/Makefile > doc/abs-top-srcdir.texi > + gl/Makefile > guile/Makefile > guile/src/Makefile > ]) > diff --git a/guile/src/Makefile.am b/guile/src/Makefile.am > index e54d896..65e04b0 100644 > --- a/guile/src/Makefile.am > +++ b/guile/src/Makefile.am > @@ -1,5 +1,5 @@ > # Guile-GnuTLS --- Guile bindings for GnuTLS. > -# Copyright (C) 2007-2023 Free Software Foundation, Inc. > +# Copyright (C) 2007-2025 Free Software Foundation, Inc. > # > # This file is part of Guile-GnuTLS. > # > @@ -50,6 +50,7 @@ guile_gnutls_v_2_la_LIBADD = \ > $(GUILE_LDFLAGS) > > AM_CPPFLAGS = \ > + -I$(top_srcdir)/gl \ > -I$(top_srcdir)/lib/includes \ > -I$(top_builddir)/lib/includes \ > -I$(top_srcdir)/extra/includes \ > -- > 2.49.0 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1251 bytes Desc: not available URL: From janneke at gnu.org Sat May 17 10:25:20 2025 From: janneke at gnu.org (Janneke Nieuwenhuizen) Date: Sat, 17 May 2025 10:25:20 +0200 Subject: [gnutls-help] [PATCH guile-gnutls] maint: Fix MinGW cross-build by using alloca from gnulib. In-Reply-To: <87tt5kqzy9.fsf@josefsson.org> (Simon Josefsson's message of "Fri, 16 May 2025 18:31:58 +0200") References: <87jz6gyaoi.fsf@gnu.org> <87tt5kqzy9.fsf@josefsson.org> Message-ID: <878qmvy77z.fsf@gnu.org> Simon Josefsson writes: Hello Simon, > Thanks! Is there any simple way to test your usage mode in CI? I > looked into getting a MinGW build environment suitable for guile-gnutls > up but didn't have the required amount of patience to get all > dependencies in a usable form... are there any supported container > images with a MinGW environment available? If you pull the latest guix (I resurrected the MinGW build for Guile) you can use something like the attached patch to build Guile-GnuTLS for MinGW. For cross-build CI you might get inspirationn from Guile , if so needed. > I think there were some resistance to increase gnulib usage before, but > maybe this increase is possible to justify... Well, guile-websocket is using it now and I believe it was rumoured that might even be included Guile proper some time so you never know :) Greetings, Janneke -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-maint-Add-guile-gnutls-mingw-recipe.patch Type: text/x-patch Size: 6052 bytes Desc: not available URL: -------------- next part -------------- -- Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar? https://AvatarAcademy.com