gcc-3.4.1 cannot find libiconv for static linking.

Anthony de Almeida Lopes guerrilla_thought at gmx.de
Tue Sep 14 09:51:02 PDT 2004


i'm having a problem building gcc-3.4.1 (pass 1) when using "make
BOOT_LDFLAGS="-static" bootstrap"  to build it; however it works with
just BOOT_LDFLAGS="-static" . as you can see below i have libiconv
installed (the latest version from gnu.org 1.9.1 )

 i have a suspicion that i built libiconv imporperly. you can see where
gcc fails below. i gave some extra output to give you an idea where i am
in the process. actually, i just installed libiconv with the "--enable-
static" configure option. by default it's turned off, but this changes
nothing, i'm stuck with the same error belo

also, directly below this you can see that i have libiconv. so  -liconv
should work with a file named libiconv.so, correct? 

i'm following the LFS 6.0 guide. 

---------------------------
$ ls /usr/lib/*iconv* -lh
-rw-r--r--  1 root root  774 Sep 13 20:56 /usr/lib/libiconv.la
-rw-r--r--  1 root root 931K Sep 13 21:47 /usr/lib/libiconv.so
lrwxr-xr-x  1 root root   17 Sep 13 20:56 /usr/lib/libiconv.so.2 ->
libiconv.so.2.2.0
-rw-r--r--  1 root root 931K Sep 13 20:56 /usr/lib/libiconv.so.2.2.0
-rw-r--r--  1 root root 931K Sep 13 20:56 /usr/lib/libiconv_plug.so
-----------------------------

stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/ -c   -g -O2 -
DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wold-style-definition     -
DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../
include  ../../gcc/host-default.c -o host-default.o
stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/ -c   -g -O2 -
DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wold-style-definition     -
DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../
include  ../../gcc/tree-inline.c -o tree-inline.o
stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/ -c   -g -O2 -
DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wold-style-definition     -
DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../
include  ../../gcc/tree-optimize.c -o tree-optimize.o
stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/ -c   -g -O2 -
DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wold-style-definition     -
DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../
include  ../../gcc/cgraph.c -o cgraph.o
stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/ -c   -g -O2 -
DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -pedantic -Wno-long-long -Wold-style-definition     -
DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../
include  ../../gcc/cgraphunit.c -o cgraphunit.o
rm -rf libbackend.a
ar rc libbackend.a alias.o bb-reorder.o bitmap.o builtins.o caller-save.
o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o
cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o
dbxout.o debug.o df.o diagnostic.o dojump.o doloop.o dominance.o
dwarf2asm.o dwarf2out.o emit-rtl.o except.o explow.o expmed.o expr.o
final.o flow.o fold-const.o function.o gcse.o genrtl.o ggc-common.o
global.o graph.o gtype-desc.o haifa-sched.o hooks.o ifcvt.o insn-
attrtab.o insn-emit.o insn-modes.o insn-extract.o insn-opinit.o insn-
output.o insn-peep.o insn-recog.o integrate.o intl.o jump.o  langhooks.o
lcm.o lists.o local-alloc.o loop.o optabs.o options.o opts.o params.o
postreload.o predict.o print-rtl.o print-tree.o value-prof.o profile.o
ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o real.o recog.o
reg-stack.o regclass.o regmove.o regrename.o reload.o reload1.o reorg.o
resource.o rtl.o rtlanal.o rtl-error.o sbitmap.o sched-deps.o sched-ebb.
o sched-rgn.o sched-vis.o sdbout.o sibcall.o simplify-rtx.o sreal.o
stmt.o stor-layout.o stringpool.o targhooks.o timevar.o toplev.o tracer.
o tree.o tree-dump.o unroll.o varasm.o varray.o version.o vmsdbgout.o
xcoffout.o alloc-pool.o et-forest.o cfghooks.o bt-load.o pretty-print.o
ggc-page.o web.o protector.o i386.o  host-default.o hashtable.o tree-
inline.o tree-optimize.o cgraph.o cgraphunit.o
ranlib libbackend.a
stage1/xgcc -Bstage1/ -B/build/i686-pc-linux-gnu/bin/   -g -O2 -DIN_GCC
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -
pedantic -Wno-long-long -Wold-style-definition     -DHAVE_CONFIG_H -
static -o cc1 \
        c-parse.o c-lang.o c-pretty-print.o stub-objc.o attribs.o c-
errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o
c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-
ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o
libcpp.a  main.o libbackend.a ../libiberty/libiberty.a  -liconv
/build/i686-pc-linux-gnu/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/mnt/crux/usr/src/gcc-3.4.1/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/mnt/crux/usr/src/gcc-3.4.1/gcc-build/gcc'
make: *** [bootstrap] Error 2





More information about the lfs-support mailing list