Build Problems Involving libgpg-error

Thomas Jakway tjakway at
Wed Dec 3 00:53:22 CET 2014

Sorry to bother you all with build problems, but I'm really stumped on 
this one.  Tried to cover as many possibilities as I could before coming 
here.  I'm getting a weird error message trying to build gnupg.

I'm on origin/HEAD (the development branch)

My system:
$ uname -a
Linux thomas-VirtualBox 3.16.0-25-generic #33-Ubuntu SMP Tue Nov 4 
12:05:25 UTC 2014 i686 i686 i686 GNU/Linux
(I'm not aware of any problems unique to building on VirtualBox? Host 
uname -a is Darwin Thomass-MacBook-Pro-5.local 13.4.0 Darwin Kernel 
Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; 
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 if it matters)

./ (gave normal output)
./configure --enable-maintainer-mode --sysconfdir=/etc 
configure gives this output:

         GnuPG v2.1.1-beta51 has been configured as follows:

         Revision:  e1f515b  (57845)
         Platform:  GNU/Linux (i686-pc-linux-gnu)

         OpenPGP:   yes
         S/MIME:    yes
         Agent:     yes
         Smartcard: yes
         G13:       yes
         Dirmngr:   yes
         Gpgtar:    yes

         Protect tool:      (default)
         LDAP wrapper:      (default)
         Default agent:     (default)
         Default pinentry:  (default)
         Default scdaemon:  (default)
         Default dirmngr:   (default)

         Dirmngr auto start:  yes
         Readline support:    yes
         LDAP support:        yes
         DNS SRV support:     yes
         TLS support:         gnutls

configure also says the libraries are OK:
configure: checking for libraries
checking for gpg-error-config... /usr/local/bin/gpg-error-config
checking for GPG Error - version >= 1.16... yes (1.18-beta8)
checking for libgcrypt-config... 
checking for LIBGCRYPT - version >= 1.6.0... yes (1.7.0-beta128)
checking LIBGCRYPT API version... okay
checking for libassuan-config... /usr/bin/libassuan-config
checking for LIBASSUAN - version >= 2.1.0... yes (2.1.2-unknown)
checking LIBASSUAN API version... okay
checking for ksba-config... /usr/bin/ksba-config
checking for KSBA - version >= 1.2.0... yes (1.3.0)
checking KSBA API version... okay
checking for usb_bulk_write in -lusb... yes
checking for usb_create_match... no
checking for library containing dlopen... -ldl
checking for encfs... /usr/bin/encfs
checking for fusermount... /bin/fusermount
checking for openpty in -lutil... yes
checking for shred... /usr/bin/shred
checking for npth-config... 
checking for NPTH - version >= 0.91... yes (1.2-beta4)
checking NPTH API version... okay
checking for ntbtls-config... no
checking for NTBTLS - version >= 0.1.0... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBGNUTLS... yes

make gives this error:

asshelp.c: In function ‘start_new_gpg_agent’:
asshelp.c:511:33: error: ‘GPG_ERR_FORBIDDEN’ undeclared (first use in 
this function)
        if (gpg_err_code (err) == GPG_ERR_FORBIDDEN
asshelp.c:511:33: note: each undeclared identifier is reported only once 
for each function it appears in
Makefile:1402: recipe for target 'libcommon_a-asshelp.o' failed
make[3]: *** [libcommon_a-asshelp.o] Error 1
make[3]: Leaving directory '/home/thomas/git/gnupg/common'

which makes me think libgpg-error probably didn't get included properly

libgpg-error is definitely installed (at least according to aptitude):
thomas at thomas-VirtualBox:~$ aptitude search libgpg-error
i   libgpg-error-dev               - library for common error values and 
i   libgpg-error0                  - library for common error values and 

so I built libgpg-error and tried passing it using 

./configure --enable-maintainer-mode --sysconfdir=/etc 

same error.

Then saw this bug ticket: (title: 
"configure: --with-libgpg-error-prefix doesn't impact includes")

Got the relevant paths with gpg-error-config:

thomas at thomas-VirtualBox:~/git/libgpg-error/t_install/bin$ 
./gpg-error-config --libs
-L/home/thomas/git/libgpg-error/t_install/lib -lgpg-error
thomas at thomas-VirtualBox:~/git/libgpg-error/t_install/bin$ 
./gpg-error-config --cflags

but trying CFLAGS="-I/home/thomas/git/libgpg-error/t_install/include" 
LIBS="-lgpg-error" ./configure --enable-maintainer-mode 
--sysconfdir=/etc --prefix=/home/thomas/git/OTHERGPG/t_install 
gives the same error
(nor does doing that last one with --with-libgpg-error-prefix)

I did notice that even when I passed --with-libgpg-error-prefix 
configure still used the system libgpg-error libraries:
checking for gpg-error-config... /usr/local/bin/gpg-error-config
checking for GPG Error - version >= 1.16... yes (1.18-beta8)
(I tried installing my build of libgpg-error after the debian package 
one wasn't working).

Any help is much appreciated!
Thomas Jakway

PS: Earlier I tried sending this to gpg-devel but there was an issue my 
mail settings.  Sorry if it went through and this is a duplicate, I 
think this is the better mailing list for this question anyways.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20141202/816eb044/attachment-0001.html>

More information about the Gnupg-users mailing list