From gniibe at fsij.org Tue Mar 3 03:04:27 2026 From: gniibe at fsij.org (NIIBE Yutaka) Date: Tue, 03 Mar 2026 11:04:27 +0900 Subject: Building GnuPG packages and PKG_CHECK_MODULES Message-ID: <87h5qxllck.fsf@haruna.fsij.org> Hello, Sachin T, (also sent to GnuPG development mailing list) Thank you for your patches last year. While maintaining the GnuPG packages, I found an issue in libgpg-error. For GnuPG, we have kept the dependency smaller as possible. This is because GnuPG is an important package in an OS, in general, and smaller dependency allows easy adoption in earlier phase of OS bootstrapping. But now, (because of the change of z/OS support), for the maintainers, it requires PKG_CHECK_MODULES macro from pkg-config. I'm afraid it's a bit larger change. pkg-config is common these days, but not that essential. Last year, for z/OS support of libgpg-error, we added EXTRA_LIBS_FOR_BUILD in libgpg-error/configure.ac. IIUC, this is needed for z/OS to link zoslib to the executable (this case, it's mkheader command). For libgcrypt, you asked similar. I noticed that this would be problematic (might result patches for many packages as well), and suggested another approach of preparing a wrapper script for CC_FOR_BUILD and use the script to build packages. I wonder if the approach works well for your projects. If it works well, is it possible to consider removal of EXTRA_LIBS_FOR_BUILD in libgpg-error/configure.ac ? Thank you in advance for your time, -- From sachin.t at ibm.com Tue Mar 3 07:05:09 2026 From: sachin.t at ibm.com (Sachin T) Date: Tue, 3 Mar 2026 06:05:09 +0000 Subject: Building GnuPG packages and PKG_CHECK_MODULES In-Reply-To: <87h5qxllck.fsf@haruna.fsij.org> References: <87h5qxllck.fsf@haruna.fsij.org> Message-ID: Hello NIIBE, Yes, I?ve already tested the suggested approach and it works on my side. Based on that, I?ve shared the reverted patch below, Please review and let me know if anything?s needed. Appreciate the guidance. Thanks, Sachin --- * configure.ac: Revert pkgconfig requirement and EXTRA_LIBS_FOR_BUILD setting * src/Makefile.am: Remove EXTRA_LIBS_FOR_BUILD variable Signed-off-by: Sachin T --- configure.ac | 18 ------------------ src/Makefile.am | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 58bbf92..d83e7e5 100644 --- a/configure.ac +++ b/configure.ac @@ -142,24 +142,6 @@ case "${host}" in ;; esac -# Set some variables for build platform helpers. -case "$build_os" in - *openedition*) - PKG_CHECK_MODULES([ZOSLIB], [zoslib], - [EXTRA_LIBS_FOR_BUILD="$ZOSLIB_LIBS"], - [AC_MSG_WARN([[ -*** -*** zoslib not found. Please ensure zoslib.pc is in PKG_CONFIG_PATH. -*** (If you are not using zOS please ignore this warning) -***]])]) - ;; - *) - EXTRA_LIBS_FOR_BUILD="" -?????;; -esac -AC_SUBST(EXTRA_LIBS_FOR_BUILD) - - if test "$have_w32_system" != yes; then gl_THREADLIB_EARLY fi diff --git a/src/Makefile.am b/src/Makefile.am index 82b4193..7fd1d98 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -280,7 +280,7 @@ errnos-sym.h: Makefile mkstrtable.awk errnos.in mkheader$(EXEEXT_FOR_BUILD): mkheader.c Makefile ?????$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ?????$(CPPFLAGS_FOR_BUILD) -g -I. -I$(srcdir) \ - -o $@ $(srcdir)/mkheader.c $(EXTRA_LIBS_FOR_BUILD) + -o $@ $(srcdir)/mkheader.c parts_of_gpg_error_h = ?????? ?????\ ?????gpg-error.h.in ??\ -- 2.53.0 From: NIIBE Yutaka Date: Tuesday, 3 March 2026 at 7:34?AM To: Sachin T , GnuPG development Subject: [EXTERNAL] Building GnuPG packages and PKG_CHECK_MODULES Hello, Sachin T, (also sent to GnuPG development mailing list) Thank you for your patches last year. While maintaining the GnuPG packages, I found an issue in libgpg-error. For GnuPG, we have kept the dependency smaller as possible. This is because GnuPG is an important package in an OS, in general, and smaller dependency allows easy adoption in earlier phase of OS bootstrapping. But now, (because of the change of z/OS support), for the maintainers, it requires PKG_CHECK_MODULES macro from pkg-config. I'm afraid it's a bit larger change. pkg-config is common these days, but not that essential. Last year, for z/OS support of libgpg-error, we added EXTRA_LIBS_FOR_BUILD in libgpg-error/configure.ac. IIUC, this is needed for z/OS to link zoslib to the executable (this case, it's mkheader command). For libgcrypt, you asked similar. I noticed that this would be problematic (might result patches for many packages as well), and suggested another approach of preparing a wrapper script for CC_FOR_BUILD and use the script to build packages. I wonder if the approach works well for your projects. If it works well, is it possible to consider removal of EXTRA_LIBS_FOR_BUILD in libgpg-error/configure.ac ? Thank you in advance for your time, -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From gniibe at fsij.org Wed Mar 4 02:58:02 2026 From: gniibe at fsij.org (NIIBE Yutaka) Date: Wed, 04 Mar 2026 10:58:02 +0900 Subject: Building GnuPG packages and PKG_CHECK_MODULES In-Reply-To: References: <87h5qxllck.fsf@haruna.fsij.org> Message-ID: <87342gpd91.fsf@haruna.fsij.org> Hello, Sachin T wrote: > Yes, I?ve already tested the suggested approach and it works on my > side. Based on that, I?ve shared the reverted patch below, Please > review and let me know if anything?s needed. Thank you for your cooperation. Applied and pushed to master. --