Problem building 2.0.1

David Shaw dshaw at jabberwocky.com
Thu Dec 7 23:48:13 CET 2006


On Thu, Dec 07, 2006 at 10:21:18AM +0100, Werner Koch wrote:
> On Wed,  6 Dec 2006 08:23, shavital at mac.com said:
> 
> > -----
> > /usr/bin/ld: Undefined symbols:
> > _libiconv
> 
> Well, you need a proper iconv installation too.  We need too do have
> an extra test for it in case NLS has been disabled.  NLS requires
> iconv anyway but there is some otehr code in gpg which needs it too.

OSX has iconv already.  I see a problem in the Makefiles that we're
not linking to it though.  I've fixed this in svn, and 2.0 now builds
more or less (still some doc/ issues) on my OSX box.

Here's a patch for the various people who have had a problem.

David
-------------- next part --------------
Index: tools/Makefile.am
===================================================================
--- tools/Makefile.am	(revision 4373)
+++ tools/Makefile.am	(working copy)
@@ -54,13 +54,14 @@
 common_libs = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a
 pwquery_libs = ../common/libsimple-pwquery.a
 
-gpgsplit_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(ZLIBS)
+gpgsplit_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
+		 $(ZLIBS) $(LIBICONV)
 
 gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
 
 # jnlib/common sucks in gpg-error, will they, nil they (some compilers
 # do not eliminate the supposed-to-be-unused-inline-functions).
-gpgconf_LDADD = $(common_libs) $(LIBINTL) $(GPG_ERROR_LIBS)
+gpgconf_LDADD = $(common_libs) $(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV)
 
 gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
 gpgparsemail_LDADD = 
@@ -74,7 +75,7 @@
 
 gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c
 gpg_connect_agent_LDADD = $(common_libs) $(LIBASSUAN_LIBS) \
-	                  $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS)
+	                  $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
 
 gpgkey2ssh_SOURCES = gpgkey2ssh.c
 gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
Index: g10/Makefile.am
===================================================================
--- g10/Makefile.am	(revision 4373)
+++ g10/Makefile.am	(working copy)
@@ -118,8 +118,10 @@
 LDADD =  $(needed_libs) ../common/libgpgrl.a \
          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
-gpg2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS)
-gpgv2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS)
+gpg2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
+	     $(LIBICONV)
+gpgv2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
+	      $(LIBICONV)
 
 $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
 
Index: agent/Makefile.am
===================================================================
--- agent/Makefile.am	(revision 4373)
+++ agent/Makefile.am	(working copy)
@@ -53,7 +53,7 @@
 gpg_agent_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(PTH_CFLAGS)
 gpg_agent_LDADD = $(commonpth_libs) \
                 $(LIBGCRYPT_LIBS) $(LIBASSUAN_PTH_LIBS) $(PTH_LIBS) \
-	        $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS)
+	        $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
 
 gpg_protect_tool_SOURCES = \
 	protect-tool.c \
@@ -62,14 +62,14 @@
 
 # Needs $(NETLIBS) for libsimple-pwquery.la.
 gpg_protect_tool_LDADD =  $(pwquery_libs) $(common_libs) \
-         $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS)
+         $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
 
 gpg_preset_passphrase_SOURCES = \
 	preset-passphrase.c
 
 # Needs $(NETLIBS) for libsimple-pwquery.la.
 gpg_preset_passphrase_LDADD =  $(pwquery_libs) $(common_libs) \
-	 $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS)
+	 $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV)
 
 
 # Make sure that all libs are build before we use them.  This is



More information about the Gnupg-users mailing list