new build problem with 1.3.92 (iconv)

Tim Mooney mooney at dogbert.cc.ndsu.NoDak.edu
Thu Oct 28 18:32:20 CEST 2004


With 1.3.92, I get a (new) link failure for gpgsplit and other tools:

cc  -std -O2 -g3 -tune host -arch host -portable -readonly_strings -msg_disable inlinestoclsmod,valuepres,trailcomma -I/local/include -msg_disable ptrmismatch  -L/local/lib -o gpgsplit  gpgsplit.o ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a   -lz -lbz2 -lrt 
ld:
Unresolved:
iconv_open
iconv
iconv_close
gmake[2]: *** [gpgsplit] Error 1
gmake[2]: Leaving directory `/local/src/RPM/BUILD/gnupg-1.3.92/tools'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/local/src/RPM/BUILD/gnupg-1.3.92'
gmake: *** [all] Error 2
Bad exit status from /var/tmp/rpm-tmp.30588 (%build)


Tru64 and a few other platforms have iconv in libiconv, not in libc.
gnupg is correctly detecting this, and the various Makefiles have

 	LIBICONV = -liconv

the problem is that $(LIBICONV) isn't included after libutil.a in
any of the LDADD lines.  The included patch fixed it for me.

Tim
-- 
Tim Mooney                              mooney at dogbert.cc.ndsu.NoDak.edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


--- gnupg-1.3.92.orig/tools/Makefile.am	2003-10-25 10:03:13.000000000 -0500
+++ gnupg-1.3.92/tools/Makefile.am	2004-10-28 11:01:28.000000000 -0500
@@ -25,9 +25,9 @@
  bin_PROGRAMS    = gpgsplit
  noinst_PROGRAMS = mpicalc bftest clean-sat mk-tdata shmtest

-gpgsplit_LDADD  = $(needed_libs) @LIBINTL@ @CAPLIBS@ @ZLIBS@
-mpicalc_LDADD   = $(needed_libs) @LIBINTL@ @CAPLIBS@ @W32LIBS@
-bftest_LDADD    = $(needed_libs) @LIBINTL@ @CAPLIBS@ @W32LIBS@ @DLLIBS@ @NETLIBS@
-shmtest_LDADD   = $(needed_libs) @LIBINTL@ @CAPLIBS@
+gpgsplit_LDADD  = $(needed_libs) $(LIBICONV) @LIBINTL@ @CAPLIBS@ @ZLIBS@
+mpicalc_LDADD   = $(needed_libs) $(LIBICONV) @LIBINTL@ @CAPLIBS@ @W32LIBS@
+bftest_LDADD    = $(needed_libs) $(LIBICONV) @LIBINTL@ @CAPLIBS@ @W32LIBS@ @DLLIBS@ @NETLIBS@
+shmtest_LDADD   = $(needed_libs) $(LIBICONV) @LIBINTL@ @CAPLIBS@

  gpgsplit mpicalc bftest shmtest: $(needed_libs)
--- gnupg-1.3.92.orig/g10/Makefile.am	2004-04-27 02:48:53.000000000 -0500
+++ gnupg-1.3.92/g10/Makefile.am	2004-10-28 11:13:08.000000000 -0500
@@ -131,7 +131,7 @@
  #	       ks-db.h \
  #	       $(common_source)

-LDADD =  $(needed_libs) @LIBINTL@ @CAPLIBS@ @ZLIBS@ @W32LIBS@
+LDADD =  $(needed_libs) $(LIBICONV) @LIBINTL@ @CAPLIBS@ @ZLIBS@ @W32LIBS@
  gpg_LDADD = $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB_LIBS@

  $(PROGRAMS): $(needed_libs)
--- gnupg-1.3.92.orig/keyserver/Makefile.am	2004-10-15 04:53:34.000000000 -0500
+++ gnupg-1.3.92/keyserver/Makefile.am	2004-10-28 11:15:30.000000000 -0500
@@ -32,10 +32,10 @@
  gpgkeys_http_SOURCES = gpgkeys_http.c ksutil.c ksutil.h
  gpgkeys_finger_SOURCES = gpgkeys_finger.c ksutil.c ksutil.h

-gpgkeys_ldap_LDADD = ../util/libutil.a @LDAPLIBS@ @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
-gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
-gpgkeys_http_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
-gpgkeys_finger_LDADD = ../util/libutil.a @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
+gpgkeys_ldap_LDADD = ../util/libutil.a $(LIBICONV) @LDAPLIBS@ @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
+gpgkeys_hkp_LDADD = ../util/libutil.a $(LIBICONV) @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
+gpgkeys_http_LDADD = ../util/libutil.a $(LIBICONV) @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@
+gpgkeys_finger_LDADD = ../util/libutil.a $(LIBICONV) @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@

  install-exec-hook:
  if GPGKEYS_LDAP



More information about the Gnupg-devel mailing list