Linking against iconv in a non-standard dir



Hi gtk-list,

I am trying to build glib-2.14.6 against libiconv in an odd directory. (Solaris10, sparc). configure runs fine, but the build fails with

ld: fatal: library -liconv: not found

I've tried all kinds of combinations of LDFLAGS and CPPFLAGS, but can't get ld to find iconv. (It does exist where I've told ld to look.) I'm kinda flailing around looking for the right flags now.

config.log is at http://deanandadie.net/config.log.txt

script I use to run ./configure:

#!/usr/bin/sh

SOFTDIST_DIR="/usr/dist/share"
OS=`uname -r`
ARCH="sun4"

PACKAGE="glib"
VERSION="2.14.6"

PREFIX="${SOFTDIST_DIR}/${PACKAGE},v${VERSION}"

LIBICONV_DIR="${SOFTDIST_DIR}/libiconv,v1.9.2"
GETTEXT_DIR="${SOFTDIST_DIR}/gettext,v0.17"

LD_LIBRARY_PATH="${LIBICONV_DIR}/${OS}-lib.${ARCH}:${GETTEXT_DIR}/${OS}-lib.${ARCH}"; export LD_LIBRARY_PATH

LDFLAGS="-L ${LIBICONV_DIR}/${OS}-lib.${ARCH} -L ${GETTEXT_DIR}/${OS}-lib.${ARCH} -R ${LD_LIBRARY_PATH}"; export LDFLAGS

CPPFLAGS="-I ${LIBICONV_DIR}/${OS}-include.${ARCH} -I ${GETTEXT_DIR}/${OS}-include.${ARCH}"; export CPPFLAGS

PKG_CONFIG="${SOFTDIST_DIR}/pkg-config,v0.23/${OS}-bin.${ARCH}/pkg-config"; export PKG_CONFIG

#PKG_CONFIG_PATH=

#CC=cc; export CC
#CXX=CC; export CXX

CFLAGS="-mcpu=v9"; export CFLAGS

./configure --prefix=${PREFIX} \
            --bindir=${PREFIX}/${OS}-bin.${ARCH} \
            --libdir=${PREFIX}/${OS}-lib.${ARCH} \
            --includedir=${PREFIX}/${OS}-include.${ARCH} \
            --mandir=${PREFIX}/doc/man \
            --with-libiconv=gnu

And the failure:

gcc -shared -Wl,-M -Wl,.libs/libglib-2.0.so.0.1400.6.exp -Wl,-h -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.1400.6 .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbookmarkfile.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gregex.o .libs/gscanner.o .libs/gsequence.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o -Wl,-z -Wl,allextract libcharset/.libs/libcharset.a pcre/.libs/libpcre.a -Wl,-z -Wl,defaultextract -R/usr/dist/share/libiconv,v1.9.2/5.10-lib.sun4:/usr/dist/share/gettext,v0.17/5.10-lib.sun4 -L/home/brundage/work/csc_sun_work/SR195558/artifacts/build/glib-2.14.6/glib -L/home/brundage/work/csc_sun_work/SR195558/artifacts/build/glib-2.14.6/glib/libcharset -liconv -L/home/brundage/work/csc_sun_work/SR195558/artifacts/build/glib-2.14.6/glib/pcre -lintl -lc -mcpu=v9

ld: fatal: library -liconv: not found


0 ccs-v440-01:2.0 build/glib-2.14.6 % ls /usr/dist/share/libiconv,v1.9.2/5.10-lib.sun4
charset.alias        libcharset.so.1      libiconv.so.2
libcharset.a         libcharset.so.1.0.0  libiconv.so.2.2.0
libcharset.la        libiconv.la          libiconv_plug.so
libcharset.so        libiconv.so


--Dean - Unscrambler of eggs
--
Take your time, take your chances
[2045.2, 273.7] Apparent Rennerian
-----------------------------------------------------------------------------
It matters not how strait the gate / How charged with punishment the scroll
I am the master of my fate / I am the captain of my soul.  -- Invictus --
                                                       -- William E Henley --


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]