Compiling GnuPG 2.0.1 on MacOS X

Benjamin Donnachie benjamin at
Tue Feb 13 20:03:24 CET 2007

Benjamin Donnachie wrote:
> How embarrassing... my mistake - I was still using the old patched version!

Ah-ha!  That's better!  As a quick test I threw together the following
helper application:

** Mac OS fails to process bundle information correctly
** for pinentry-mac.
** This quick hack attempts to address that.

#include <stdio.h>

int main()
        return system

Compile this using "gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch
i386 -arch ppc pinentry-helper.c -o pinentry-helper" (Or download from and
copy it to "/Applications/".

Then add the following to ~/.gnupg/gpg-agent.conf:


Unpatched gpg-agent (admittedly v1.9.21) correctly invokes pinentry-mac,
reading the GUI bundle information correctly.

It needs more work to achieve a tidy solution - especially since the
location of pinentry-mac is fixed and it fails to pass any command line
arguments.  Plus I might still use NSTask instead.


More information about the Gnupg-devel mailing list