GnuPG 2.0.3 build error: gpg2keys_ldap requires -lgpg-error

Simon Leinen simon at limmat.switch.ch
Fri Mar 9 15:02:56 CET 2007


Trying to compile GnuPG 2.0.3 on a SPARC/Solaris 9 system, I ran into
the following error:

    Making all in keyserver
    make[2]: Entering directory `/local/src/packages/gnupg/gnupg-2.0.3/keyserver'
    /opt/SUNWspro/bin/cc -I/usr/local/include  -I/usr/local/include -I/usr/local/include -fast -xtarget=ultra  -g -xs   -o gpg2keys_ldap  gpg2keys_ldap-gpgkeys_ldap.o gpg2keys_ldap-ksutil.o gpg2keys_ldap-no-libgcrypt.o ../jnlib/libjnlib.a -lldap -lsocket -lnsl  /usr/local/lib/libiconv.so -R/usr/local/lib /usr/local/lib/libintl.so -lc -R/usr/local/lib  
    Undefined			first referenced
     symbol  			    in file
    gpg_err_code_from_errno             gpg2keys_ldap-gpgkeys_ldap.o
    gpg_err_code_from_syserror          gpg2keys_ldap-gpgkeys_ldap.o
    ld: fatal: Symbol referencing errors. No output written to gpg2keys_ldap
    make[2]: *** [gpg2keys_ldap] Error 1
    make[2]: Leaving directory `/local/src/packages/gnupg/gnupg-2.0.3/keyserver'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/local/src/packages/gnupg/gnupg-2.0.3'
    make: *** [all] Error 2

I think this can be fixed by adding libgpg-error to
keyserver/Makefile.am, and regenerating keyserver/Makefile.in.
Here's a patch for the former.

Best regards,
-- 
Simon.

*** /tmp/T0Wdaaq2	Fri Mar  9 15:00:14 2007
--- Makefile.am	Fri Mar  9 14:57:02 2007
***************
*** 41,47 ****
  
  gpg2keys_ldap_SOURCES = gpgkeys_ldap.c ksutil.c ksutil.h no-libgcrypt.c
  gpg2keys_ldap_CPPFLAGS = $(LDAP_CPPFLAGS) $(AM_CPPFLAGS)
! gpg2keys_ldap_LDADD = ../jnlib/libjnlib.a $(LDAPLIBS) $(NETLIBS) $(other_libs)
  
  gpg2keys_finger_SOURCES = gpgkeys_finger.c ksutil.c ksutil.h no-libgcrypt.c
  gpg2keys_finger_CPPFLAGS = $(AM_CPPFLAGS)
--- 41,47 ----
  
  gpg2keys_ldap_SOURCES = gpgkeys_ldap.c ksutil.c ksutil.h no-libgcrypt.c
  gpg2keys_ldap_CPPFLAGS = $(LDAP_CPPFLAGS) $(AM_CPPFLAGS)
! gpg2keys_ldap_LDADD = ../jnlib/libjnlib.a $(LDAPLIBS) $(GPG_ERROR_LIBS) $(NETLIBS) $(other_libs)
  
  gpg2keys_finger_SOURCES = gpgkeys_finger.c ksutil.c ksutil.h no-libgcrypt.c
  gpg2keys_finger_CPPFLAGS = $(AM_CPPFLAGS)



More information about the Gnupg-devel mailing list