Problem compiling GnuPG 2.1.0 on OS X 10.10

Patrick Brunschwig patrick at enigmail.net
Sat Nov 8 19:04:19 CET 2014


On 07.11.14 06:41, Ramsey Dow wrote:
> Hello, I am having a build failure with GnuPG 2.1.0 on OS X 10.10 using Xcode 6.1's compiler tools.
> 
> I have successfully compiled and installed all of the prerequisite libraries (npth 1.1, libgpg-error 1.17, libksba 1.3.1, and libassuan 2.1.2). My build sequence is as follows:
> 
> gpg --verify $MRT/cache/gnupg-2.1.0.tar.bz2.sig
> tar xjf $MRT/cache/gnupg-2.1.0.tar.bz2
> pushd gnupg-2.1.0
> ./configure --prefix=$MRTRT
> make
> 
> The compilation fails while linking t-sexputil in common. Here are the last few lines of the build process:
> 
> gcc -DHAVE_CONFIG_H -I. -I..  -I../gl -I../intl -DLOCALEDIR=\"/Users/ramsey/Developer/MRT/runtime/share/locale\" -DGNUPG_BINDIR="\"/Users/ramsey/Developer/MRT/runtime/bin\"" -DGNUPG_LIBEXECDIR="\"/Users/ramsey/Developer/MRT/runtime/libexec\"" -DGNUPG_LIBDIR="\"/Users/ramsey/Developer/MRT/runtime/lib/gnupg\"" -DGNUPG_DATADIR="\"/Users/ramsey/Developer/MRT/runtime/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/Users/ramsey/Developer/MRT/runtime/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/Users/ramsey/Developer/MRT/runtime/var\""        -I/Users/ramsey/Developer/MRT/runtime/include -I/Users/ramsey/Developer/MRT/runtime/include -I/Users/ramsey/Developer/MRT/runtime/include -g -O2 -Wall -Wno-pointer-sign -Wpointer-arith -MT t-sexputil.o -MD -MP -MF .deps/t-sexputil.Tpo -c -o t-sexputil.o t-sexputil.c
> mv -f .deps/t-sexputil.Tpo .deps/t-sexputil.Po
> gcc -I/Users/ramsey/Developer/MRT/runtime/include -I/Users/ramsey/Developer/MRT/runtime/include -I/Users/ramsey/Developer/MRT/runtime/include -g -O2 -Wall -Wno-pointer-sign -Wpointer-arith   -o t-sexputil t-sexputil.o libcommon.a ../gl/libgnu.a -L/Users/ramsey/Developer/MRT/runtime/lib -lgcrypt -lgpg-error -lassuan -L/Users/ramsey/Developer/MRT/runtime/lib -lgpg-error -L/Users/ramsey/Developer/MRT/runtime/lib -lgpg-error  -liconv 
> Undefined symbols for architecture x86_64:
>   "_default_errsource", referenced from:
>       _parse_ber_header in libcommon.a(libcommon_a-tlv.o)
>       _parse_sexp in libcommon.a(libcommon_a-tlv.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[3]: *** [t-sexputil] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> 
> I'm not sure why this error is occurring, which is why I am reporting it here, per instructions in the README. Am I forgetting to specify an option to configure? Is the configuration subsystem missing something about my system's setup? Please advise. I'm happy to provide any other details if necessary.

You'll need to apply the following patch for compiling GnuPG (the patch
is made to be applied before ./configure is executed):

<https://sourceforge.net/p/gpgosx/source/ci/master/tree/patches/makefile.patch>

And most likely, you'll run into another build error in dirmgr. This can
be fixed by editing dirmgr/Makefile and deleting "-R/path/to/somewhere"
from LDFLAGS

-Patrick






More information about the Gnupg-users mailing list