Subject: libiconv build failure with new Makefile
To: None <tech-pkg@netbsd.org>
From: J. Alexander Jacocks <jjacocks@mac.com>
List: tech-pkg
Date: 06/30/2003 12:30:53
Using the Makefile v1.7 being discussed here recentely results in a
failure to link for libiconv.
Solaris 9 04/03
pkgsrc from CVS (current)
gcc-3.3 from pkgsrc
bmake from precompiled binary (not locally compiled due to error being
discussed)
Make output:
oot@hephaestos[/usr/pkgsrc/converters/libiconv]# bmake
===> Checking for vulnerabilities in libiconv-1.8nb1
=> Checksum OK for libiconv-1.8.tar.gz.
===> Extracting for libiconv-1.8nb1
===> Required installed package libtool-base>=1.4.20010614nb11:
libtool-base-1.4.20010614nb14 found
===> Patching for libiconv-1.8nb1
===> Applying pkgsrc patches for libiconv-1.8nb1
===> Buildlinking for libiconv-1.8nb1
===> Configuring for libiconv-1.8nb1
configure: WARNING: If you wanted to set the --build type, don't use
--host.
If a cross compiler is detected then cross compile mode will be
used.
checking whether bmake sets ${MAKE}... yes
checking for sparc-sun-solaris-gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/ucb/install -c -o root -g
root
checking how to copy files... cp -p
checking how to make hard links... ln
checking whether ln -s works... yes
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2
checking for AIX... no
checking for minix/config.h... no
checking for strerror in -lcposix... no
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... no
checking for ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking how to recognise dependant libraries... pass_all
checking command to parse nm output... failed
checking for dlfcn.h... yes
checking for sparc-sun-solaris-ranlib... (cached) ranlib
checking for sparc-sun-solaris-strip... no
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... solaris2 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf, size_t
*inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for msgfmt... /usr/pkg/bin/msgfmt
checking for gmsgfmt... /usr/pkg/bin/msgfmt
checking for xgettext... /usr/pkg/bin/xgettext
checking for msgmerge... /usr/pkg/bin/msgmerge
checking whether NLS is requested... yes
checking for GNU gettext in libc... no
checking for iconv... (cached) yes
checking for GNU gettext in libintl... yes
checking how to link with libintl... /usr/pkg/lib/libintl.so
/usr/pkg/lib/libiconv.so -lc -R/usr/pkg/lib
checking for locale.h... yes
checking for stdlib.h... yes
checking for mbstate_t... yes
checking for mbrtowc... yes
checking for wcrtomb... yes
checking for mbsinit... yes
checking for setlocale... yes
checking for wchar.h... yes
checking for EILSEQ... yes
checking byte ordering... big endian
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating src/Makefile
config.status: creating po/Makefile.in
config.status: creating man/Makefile
config.status: creating tests/Makefile
config.status: creating include/iconv.h
config.status: creating lib/config.h
config.status: creating src/config.h
config.status: creating po/POTFILES
config.status: creating po/Makefile
configure: configuring in libcharset
configure: running /bin/ksh './configure' --host=sparc-sun-solaris
--prefix=/usr/pkg CC=gcc 'CFLAGS=-O -I/usr/pkg/include' 'CPPFLAGS=
-I/usr/pkg/include' 'LDFLAGS= -Wl,-R/usr/pkg/lib -L/usr/pkg/lib'
host_alias=sparc-sun-solaris --cache-file=/dev/null --srcdir=.
configure: WARNING: If you wanted to set the --build type, don't use
--host.
If a cross compiler is detected then cross compile mode will be
used.
checking whether bmake sets ${MAKE}... yes
checking for sparc-sun-solaris-gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for a BSD compatible install... /usr/ucb/install -c -o root -g
root
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2
checking for AIX... no
checking for minix/config.h... no
checking for POSIXized ISC... no
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... no
checking for ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognise dependant libraries... pass_all
checking command to parse nm output... failed
checking for dlfcn.h... yes
checking for sparc-sun-solaris-ranlib... no
checking for ranlib... ranlib
checking for sparc-sun-solaris-strip... no
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... solaris2 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
checking for langinfo.h... yes
checking for nl_langinfo... yes
checking for nl_langinfo and CODESET... yes
checking whether we are using the GNU C Library 2.1 or newer... no
checking for stddef.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for setlocale... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating config.h
===> Building for libiconv-1.8nb1
builddir="`pwd`"; cd libcharset && bmake all && cp -R lib/libcharset.la
lib/.libs "$builddir/lib" && cp -R include/*.h "$builddir/include"
if [ ! -d include ] ; then mkdir include ; fi
cp ./include/libcharset.h.in include/libcharset.h
cd lib && bmake all
/bin/sh ../libtool --mode=compile gcc -I. -I. -I.. -I./.. -O
-I/usr/pkg/include -I/usr/pkg/include -DHAVE_CONFIG_H
-DLIBDIR=\"/usr/pkg/lib\" -c ./localcharset.c
mkdir .libs
gcc -I. -I. -I.. -I./.. -O
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
-DHAVE_CONFIG_H -DLIBDIR=\"/usr/pkg/lib\" -c ./localcharset.c -fPIC
-DPIC -o .libs/localcharset.o
gcc -I. -I. -I.. -I./.. -O
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
-DHAVE_CONFIG_H -DLIBDIR=\"/usr/pkg/lib\" -c ./localcharset.c -o
localcharset.o >/dev/null 2>&1
/bin/sh ../libtool --mode=link gcc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o
libcharset.la -rpath /usr/pkg/lib -version-info 1:0:0 -no-undefined
localcharset.lo
ld -G -z defs -h libcharset.so.1 -o .libs/libcharset.so.1.0
.libs/localcharset.o
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib -lc
-R/usr/pkg/lib
(cd .libs && rm -f libcharset.so.1 && ln -s libcharset.so.1.0
libcharset.so.1)
(cd .libs && rm -f libcharset.so && ln -s libcharset.so.1.0
libcharset.so)
ar cru .libs/libcharset.a localcharset.o
ranlib .libs/libcharset.a
creating libcharset.la
(cd .libs && rm -f libcharset.la && ln -s ../libcharset.la
libcharset.la)
/bin/sh ./config.charset 'sparc-sun-solaris2' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@//g' ./ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@//g' ./ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
cd lib && bmake all
if test -n "yes"; then /bin/sh ../libtool --mode=link gcc
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -I. -I. -I../include -I./../include -O
-I/usr/pkg/include -I/usr/pkg/include -fPIC -DPIC -DLIBICONV_PLUG
./iconv.c -x none ../libcharset/lib/localcharset.lo -G -o
libiconv_plug_solaris.so; else /bin/sh ../libtool --mode=link gcc
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -I. -I. -I../include -I./../include -O
-I/usr/pkg/include -I/usr/pkg/include -KPIC -DPIC -DLIBICONV_PLUG
./iconv.c ../libcharset/lib/localcharset.lo -G -o
libiconv_plug_solaris.so; fi
gcc -Wl,-R/usr/pkg/lib -I. -I. -I../include -I./../include -O
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -fPIC -DPIC
-DLIBICONV_PLUG ./iconv.c -x none ../libcharset/lib/.libs/localcharset.o
-G -o libiconv_plug_solaris.so
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib
rm -f libiconv_plug.so
ln -s libiconv_plug_solaris.so libiconv_plug.so
/bin/sh ../libtool --mode=compile gcc -I. -I. -I../include
-I./../include -I/usr/pkg/include -O -I/usr/pkg/include -c ./iconv.c
gcc -I. -I. -I../include -I./../include
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -O
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -c ./iconv.c
-fPIC -DPIC -o .libs/iconv.o
gcc -I. -I. -I../include -I./../include
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -O
-I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -c ./iconv.c
-o iconv.o >/dev/null 2>&1
/bin/sh ../libtool --mode=link gcc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o
libiconv.la -rpath /usr/pkg/lib -version-info 3:0:1 -no-undefined
iconv.lo ../libcharset/lib/localcharset.lo
ld -G -z defs -h libiconv.so.3 -o .libs/libiconv.so.3.0 .libs/iconv.o
../libcharset/lib/.libs/localcharset.o
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib -lc
-R/usr/pkg/lib
(cd .libs && rm -f libiconv.so.3 && ln -s libiconv.so.3.0 libiconv.so.3)
(cd .libs && rm -f libiconv.so && ln -s libiconv.so.3.0 libiconv.so)
ar cru .libs/libiconv.a iconv.o ../libcharset/lib/localcharset.o
ranlib .libs/libiconv.a
creating libiconv.la
(cd .libs && rm -f libiconv.la && ln -s ../libiconv.la libiconv.la)
cd src && bmake all
gcc -c -I. -I. -I../include -I./../include -I../lib -O
-I/usr/pkg/include -I/usr/pkg/include
-DLOCALEDIR=\"/usr/pkg/share/locale\" ./iconv_no_i18n.c
/bin/sh ../libtool --mode=link gcc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
iconv_no_i18n.o ../lib/libiconv.la -o iconv_no_i18n
mkdir .libs
gcc -Wl,-R/usr/pkg/lib iconv_no_i18n.o -o .libs/iconv_no_i18n
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib
../lib/.libs/libiconv.so -R/usr/pkg/lib
creating iconv_no_i18n
gcc -c -I. -I. -I../include -I./../include -I../lib -O
-I/usr/pkg/include -I/usr/pkg/include
-DLOCALEDIR=\"/usr/pkg/share/locale\" ./iconv.c
chmod 777 .
cd po && bmake all
cd man && bmake all
if test -d tests; then cd tests && bmake all; fi
root@hephaestos[/usr/pkgsrc/converters/libiconv]# bmake install
===> Checking for vulnerabilities in libiconv-1.8nb1
===> Installing for libiconv-1.8nb1
/usr/bin/rm -f /usr/pkg/lib/charset.alias
cd libcharset && bmake install prefix='/usr/pkg' exec_prefix='/usr/pkg'
libdir='/usr/pkg/lib'
cd lib && bmake install prefix='/usr/pkg' exec_prefix='/usr/pkg'
libdir='/usr/pkg/lib'
/bin/sh ./../autoconf/mkinstalldirs /usr/pkg/lib
/bin/sh ../libtool --mode=install /usr/ucb/install -c -o root -g root -m
444 libcharset.la /usr/pkg/lib/libcharset.la
/usr/ucb/install -c -o root -g root -m 444 .libs/libcharset.so.1.0
/usr/pkg/lib/libcharset.so.1.0
(cd /usr/pkg/lib && rm -f libcharset.so.1 && ln -s libcharset.so.1.0
libcharset.so.1)
(cd /usr/pkg/lib && rm -f libcharset.so && ln -s libcharset.so.1.0
libcharset.so)
chmod +x /usr/pkg/lib/libcharset.so.1.0
/usr/ucb/install -c -o root -g root -m 444 .libs/libcharset.lai
/usr/pkg/lib/libcharset.la
/usr/ucb/install -c -o root -g root -m 444 .libs/libcharset.a
/usr/pkg/lib/libcharset.a
ranlib /usr/pkg/lib/libcharset.a
chmod 644 /usr/pkg/lib/libcharset.a
----------------------------------------------------------------------
Libraries have been installed in:
/usr/pkg/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- use the `-RLIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
if test -f /usr/pkg/lib/charset.alias; then sed -f ref-add.sed
/usr/pkg/lib/charset.alias > /usr/pkg/lib/t-charset.alias;
/usr/ucb/install -c -o root -g root -m 444 /usr/pkg/lib/t-charset.alias
/usr/pkg/lib/charset.alias; rm -f /usr/pkg/lib/t-charset.alias; else
if test no = no; then sed -f ref-add.sed charset.alias >
/usr/pkg/lib/t-charset.alias; /usr/ucb/install -c -o root -g root -m
444 /usr/pkg/lib/t-charset.alias /usr/pkg/lib/charset.alias; rm -f
/usr/pkg/lib/t-charset.alias; fi ; fi
/bin/sh ./autoconf/mkinstalldirs /usr/pkg/include
/usr/ucb/install -c -o root -g root -m 444 include/libcharset.h
/usr/pkg/include/libcharset.h
cd lib && bmake install prefix='/usr/pkg' exec_prefix='/usr/pkg'
libdir='/usr/pkg/lib'
if [ ! -d /usr/pkg ] ; then mkdir /usr/pkg ; fi
if [ ! -d /usr/pkg ] ; then mkdir /usr/pkg ; fi
if [ ! -d /usr/pkg/lib ] ; then mkdir /usr/pkg/lib ; fi
/bin/sh ../libtool --mode=install /usr/ucb/install -c -o root -g root -m
444 libiconv.la /usr/pkg/lib/libiconv.la
/usr/ucb/install -c -o root -g root -m 444 .libs/libiconv.so.3.0
/usr/pkg/lib/libiconv.so.3.0
(cd /usr/pkg/lib && rm -f libiconv.so.3 && ln -s libiconv.so.3.0
libiconv.so.3)
(cd /usr/pkg/lib && rm -f libiconv.so && ln -s libiconv.so.3.0
libiconv.so)
chmod +x /usr/pkg/lib/libiconv.so.3.0
/usr/ucb/install -c -o root -g root -m 444 .libs/libiconv.lai
/usr/pkg/lib/libiconv.la
/usr/ucb/install -c -o root -g root -m 444 .libs/libiconv.a
/usr/pkg/lib/libiconv.a
ranlib /usr/pkg/lib/libiconv.a
chmod 644 /usr/pkg/lib/libiconv.a
----------------------------------------------------------------------
Libraries have been installed in:
/usr/pkg/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- use the `-RLIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
if test -n "libiconv_plug.so"; then /usr/ucb/install -c -o root -g root
-m 444 libiconv_plug.so /usr/pkg/lib/libiconv_plug.so.new && mv
/usr/pkg/lib/libiconv_plug.so.new /usr/pkg/lib/libiconv_plug.so ; fi
cd src && bmake install prefix='/usr/pkg' exec_prefix='/usr/pkg'
libdir='/usr/pkg/lib'
chmod 777 .
if [ ! -d /usr/pkg ] ; then mkdir /usr/pkg ; fi
if [ ! -d /usr/pkg ] ; then mkdir /usr/pkg ; fi
if [ ! -d /usr/pkg/bin ] ; then mkdir /usr/pkg/bin ; fi
case "solaris2" in hpux*) gcc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib iconv.o
-L/usr/pkg/lib -liconv /usr/pkg/lib/libintl.so /usr/pkg/lib/libiconv.so
-lc -R/usr/pkg/lib -o iconv;; *) /bin/sh ../libtool --mode=link gcc
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib iconv.o ../lib/libiconv.la
-L/usr/pkg/lib -lintl -L/usr/pkg/lib -liconv -lc -R/usr/pkg/lib -o
iconv;; esac
gcc -Wl,-R/usr/pkg/lib iconv.o -o .libs/iconv
-L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib
/usr/pkg/lib/libintl.so -L/usr/pkg/lib /usr/pkg/lib/libiconv.so
../lib/.libs/libiconv.so -lc -R/usr/pkg/lib
ld: fatal: recording name conflict: file `/usr/pkg/lib/libiconv.so' and
file `../lib/.libs/libiconv.so' provide identical dependency names:
libiconv.so.3 (possible multiple inclusion of the same file)
ld: fatal: File processing errors. No output written to .libs/iconv
collect2: ld returned 1 exit status
*** Error code 1
<snip>