Page MenuHome GnuPG

2.3.0 build issue on macOS - missing LIBICONV in sm/Makefile.am and ctype.h in tools/gpg-card.c
Closed, ResolvedPublic

Description

For macOS Homebrew, we have been trying to build gnupg 2.3.0 based on working 2.2.27 options (see external link).
The builds are tried on macOS versions 10.14, 10.15, and 11.0.

Right now, the build fails at two locations:

  1. sm/Makefile.am (t_common_ldadd) - unable to find iconv, which is probably due to missing $(LIBICONV). There was a similar fix for g13 (https://dev.gnupg.org/rGf8ce31a7bf1ee85e5010b628a66e6f69486e5213)
  2. tools/gpg-card.c - failing on implicit-function-declaration due to isascii/etc. This can be fixed by #include <ctype.h>.

The exact build options are shown in Homebrew link, but a similar local build is:

$ ./configure \
--disable-dependency-tracking \
--disable-silent-rules \
--enable-all-tests \
--with-pinentry-pgm=$(brew --prefix)/opt/pinentry/bin/pinentry
$ make

The build issues were introduced with two new features:

  1. https://dev.gnupg.org/rG5da6925a334c68d736804d8f19a684a678409d99 (added t_common_ldadd target)
  2. https://dev.gnupg.org/rGed0759f39be04dd6108237f5ed03c7cfd1cb4642 (added isascii, isprint, iscntrl but didn't include the ctype header)

Details