Subject: rpm build errors with libiconv/libintl
To: None <tech-pkg@netbsd.org>
From: Ruibiao Qiu <ruibiao@arl.wustl.edu>
List: tech-pkg
Date: 12/19/2002 14:56:00
Hi all

I have been having problem building misc/rpm.  It keeps saying that
libiconv_open, libiconv_close, and libiconv can not be found.  But, I can see
them in the symbol list of the libraries.  The error messages are listed
below:

===> Building for rpm-2.5.4
for d in popt misc lib build tools po; do \
        (cd $d; /usr/pkg/bin/gmake) \
          || case "" in *k*) fail=yes;; *) exit 1;; esac;\
done && test -z "$fail"
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/popt'
gmake[1]: Nothing to be done for `allprogs'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/popt'
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/misc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/misc'
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/lib'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/lib'
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/build'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/build'
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/tools'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/tools'
gmake[1]: Entering directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/po'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/po'
gcc -o rpm -static rpm.o query.o install.o verify.o checksig.o ftp.o url.o build.o  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/lib -L/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/build -L/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/misc -L/usr/p
kgsrc/misc/rpm/work/rpm-2.5.4/popt -lrpmbuild -lpopt -lrpm -lmisc -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lintl -lz   \
        
/usr/pkgsrc/misc/rpm/work/rpm-2.5.4/lib/librpm.a(signature.o): In function `verifyPGPSignature':
signature.o(.text+0x8e9): warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
/usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a(loadmsgcat.o): In function `_nl_init_domain_conv':
loadmsgcat.o(.text+0x652): undefined reference to `libiconv_open'
/usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a(loadmsgcat.o): In function `_nl_free_domain_conv':
loadmsgcat.o(.text+0x692): undefined reference to `libiconv_close'
/usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a(dcigettext.o): In function `_nl_find_msg':
dcigettext.o(.text+0xb47): undefined reference to `libiconv'
collect2: ld returned 1 exit status
gmake: *** [rpm] Error 1
*** Error code 2

Stop.
*** Error code 1

Stop.

miami# nm /usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a | grep libiconv_open                                                     U libiconv_open
miami# nm /usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a | grep libiconv_close
         U libiconv_close
miami# nm /usr/pkgsrc/misc/rpm/work/.buildlink/lib/libintl.a | grep libiconv
         U libiconv_close
         U libiconv_open
         U libiconv

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
   Ruibiao Qiu                      ruibiao@arl.wustl.edu
   Research Assistant               ruibiao@cs.wustl.edu
   Applied Research Laboratory      rq1@cec.wustl.edu
   Department of Computer Science   ruibiao@acm.org
   Washington University            http://www.arl.wustl.edu/~ruibiao
   Campus Box 1045                  http://www.cs.wustl.edu/~ruibiao
   One Brookings Drive              Tel. (314)935-4163
   St. Louis, MO 63130-4899 USA     Fax  (314)935-7302
\____________________________________________________________________/