Error building gnupg-1.9.23 (undefined references)

Robby Workman rw at rlworkman.net
Tue Sep 19 06:46:56 CEST 2006


First of all, thanks for looking at the earlier thread about my 
problems with gpgme, even if it did turn out to be a PEBKAC - 
that needed to be in the archives anyway...

Just when I get everything up and running, you guys go and 
release new versions of stuff  :)

In this order, I've built:
   libgpg-error-1.4
   libksba-1.0.0
   libassuan-0.9.0
   libgcrypt-1.2.3
   pth-2.0.7
   pinentry-0.7.2
   dirmngr-0.9.6

I'm now attempting to build gnupg-1.9.23, but this happens:

make[2]: Leaving directory `/tmp/gnupg-1.9.23/g10'
Making all in keyserver
make[2]: Entering directory `/tmp/gnupg-1.9.23/keyserver'
if i486-slackware-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. 
-I../gl -I../common -I../intl -DLOCALEDIR=\"/usr/share/locale\" 
-DGNUPG_BINDIR="\"/usr/bin\"" 
-DGNUPG_LIBEXECDIR="\"/usr/libexec\"" 
-DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" 
-DGNUPG_DATADIR="\"/usr/share/gnupg\"" 
-DGNUPG_SYSCONFDIR="\"/usr/etc/gnupg\""         -O2 -march=i486 
-mtune=i686 -Wall -MT gpg2keys_ldap-gpgkeys_ldap.o -MD -MP -MF 
".deps/gpg2keys_ldap-gpgkeys_ldap.Tpo" -c -o 
gpg2keys_ldap-gpgkeys_ldap.o `test -f 'gpgkeys_ldap.c' || echo 
'./'`gpgkeys_ldap.c; \
         then mv -f ".deps/gpg2keys_ldap-gpgkeys_ldap.Tpo" 
".deps/gpg2keys_ldap-gpgkeys_ldap.Po"; else rm -f 
".deps/gpg2keys_ldap-gpgkeys_ldap.Tpo"; exit 1; fi
if i486-slackware-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. 
-I../gl -I../common -I../intl -DLOCALEDIR=\"/usr/share/locale\" 
-DGNUPG_BINDIR="\"/usr/bin\"" 
-DGNUPG_LIBEXECDIR="\"/usr/libexec\"" 
-DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" 
-DGNUPG_DATADIR="\"/usr/share/gnupg\"" 
-DGNUPG_SYSCONFDIR="\"/usr/etc/gnupg\""         -O2 -march=i486 
-mtune=i686 -Wall -MT gpg2keys_ldap-ksutil.o -MD -MP -MF 
".deps/gpg2keys_ldap-ksutil.Tpo" -c -o gpg2keys_ldap-ksutil.o 
`test -f 'ksutil.c' || echo './'`ksutil.c; \
         then mv -f ".deps/gpg2keys_ldap-ksutil.Tpo" 
".deps/gpg2keys_ldap-ksutil.Po"; else rm -f 
".deps/gpg2keys_ldap-ksutil.Tpo"; exit 1; fi
i486-slackware-linux-gcc   -O2 -march=i486 -mtune=i686 -Wall   -o 
gpg2keys_ldap  gpg2keys_ldap-gpgkeys_ldap.o 
gpg2keys_ldap-ksutil.o ../gl/libgnu.a ../common/libcommon.a 
../jnlib/libjnlib.a -lldap      -ldl
../jnlib/libjnlib.a(stringhelp.o)(.text+0x1d0): In function 
`mem2str':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x4c2): In function 
`make_dirname':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x552): In function 
`make_filename':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x898): In function 
`print_sanitized_utf8_buffer':
: undefined reference to `gcry_free'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x9cc): In function 
`sanitize_buffer':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x489): In function 
`make_basename':
: undefined reference to `gcry_xstrdup'
../jnlib/libjnlib.a(stringhelp.o)(.text+0x504): In function 
`make_dirname':
: undefined reference to `gcry_xstrdup'
../jnlib/libjnlib.a(utf8conv.o)(.text+0x1e6): In function 
`native_to_utf8':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(utf8conv.o)(.text+0x278): In function 
`native_to_utf8':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(utf8conv.o)(.text+0x2c4): In function 
`native_to_utf8':
: undefined reference to `gcry_xstrdup'
../jnlib/libjnlib.a(utf8conv.o)(.text+0x39f): In function 
`utf8_to_native':
: undefined reference to `gcry_xmalloc'
../jnlib/libjnlib.a(logging.o)(.text+0x382): In function 
`fun_closer':
: undefined reference to `gcry_free'
../jnlib/libjnlib.a(logging.o)(.text+0x408): In function 
`set_file_fd':
: undefined reference to `gcry_xmalloc'
collect2: ld returned 1 exit status
make[2]: *** [gpg2keys_ldap] Error 1
make[2]: Leaving directory `/tmp/gnupg-1.9.23/keyserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gnupg-1.9.23'
make: *** [all] Error 2


This is using make -j1 (well, just 'make' really), as attempting 
to build with -j(>1) occasionally fails to create libcommon.a 
before it's needed, and the build errors out.  I know that's not 
relevant to the error above, but it's something you probably want 
to know about, as many people tend to build with more than one 
make thread.

Anyway, any ideas about how to fix the undefined references 
above?  I don't think this is a problem on my end (though I've 
been wrong before) :)  as this is in a clean chroot build 
environment (Slackware 11.0 RC5).


Also, I thought you might want to know about these compiler 
warnings issued while building pinentry-0.7.2:

if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I/usr/include/glib-1.2 
-I/usr/lib/glib/include -I/usr/include/gtk-1.2 
-I/usr/include/glib-1.2 -I/usr/lib/glib/include 
-I/usr/X11R6/include -I/usr/include/ncurses -I../secmem 
-I../pinentry -Wall  -O2 -march=i486 -mtune=i686 -Wall 
-Wcast-align -Wshadow -Wstrict-prototypes -MT gtksecentry.o -MD 
-MP -MF ".deps/gtksecentry.Tpo" -c -o gtksecentry.o gtksecentry.c; \
         then mv -f ".deps/gtksecentry.Tpo" 
".deps/gtksecentry.Po"; else rm -f ".deps/gtksecentry.Tpo"; exit 
1; fi
In file included from /usr/include/gtk-1.2/gdk/gdki18n.h:32,
                  from gtksecentry.c:42:
/usr/include/glib-1.2/glib.h:1697: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1703: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1705: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1719: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1721: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1745: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1747: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:2319: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
In file included from /usr/include/gtk-1.2/gtk/gtkmain.h:31,
                  from gtksecentry.c:43:
/usr/include/gtk-1.2/gdk/gdk.h:821: warning: declaration of 
'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
In file included from /usr/include/gtk-1.2/gtk/gtkarg.h:31,
                  from /usr/include/gtk-1.2/gtk/gtkobject.h:31,
                  from /usr/include/gtk-1.2/gtk/gtkaccelgroup.h:35,
                  from /usr/include/gtk-1.2/gtk/gtkwidget.h:31,
                  from /usr/include/gtk-1.2/gtk/gtkmain.h:32,
                  from gtksecentry.c:43:
/usr/include/gtk-1.2/gtk/gtktypeutils.h:163: warning: function 
declaration isn't a prototype



-- 

http://rlworkman.net



More information about the Gnupg-devel mailing list