Page MenuHome GnuPG

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


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/ (t_common_ldadd) - unable to find iconv, which is probably due to missing $(LIBICONV). There was a similar fix for g13 (
  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. (added t_common_ldadd target)
  2. (added isascii, isprint, iscntrl but didn't include the ctype header)