GCC pass 1 error

Phillip Fynan pfynan at gmail.com
Mon May 9 05:11:56 PDT 2005


I am using VectorLinux as my host distribution. On compiling GCC pass
1 it spews out undefined reference errors like a fire hose. Is it that
I need to upgrade a library?

Binutils built fine.

Does Glibc need upgrading?
Those mv errors don't look too good either.

Here are the start and tail of the errors, (there were 80K of errors,
so I'm snipping them):

make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
echo timestamp > stage1_build
echo stage1_build > stage_last
make stage1
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
make -f libgcc.mk libgcc-stage-start stage=stage1
make[3]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
for dir in libgcc; do \
  if [ -d stage1/$dir ]; then true; else /bin/sh
../../gcc-3.4.1/gcc/mkinstalldirs stage1/$dir; fi; \
done
mkdir -p -- stage1/libgcc
for dir in libgcc; do \
  mv $dir/*.o stage1/$dir; \
  test ! -f $dir/stacknote.s || mv $dir/stacknote.s stage1/$dir; \
  test ! -f $dir/libgcc.a || mv $dir/lib* stage1/$dir; \
done
make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
subdirs=""; for dir in $subdirs; \
 do \
   if [ -d stage1/$dir ] ; then true ; else mkdir stage1/$dir ; fi ; \
 done
mv specs stage1/specs
mv *.o insn-flags.h insn-config.h insn-codes.h insn-output.c
insn-recog.c insn-emit.c insn-extract.c insn-peep.c insn-attr.h
insn-attrtab.c insn-opinit.c insn-constants.h tm-preds.h tree-check.h
insn-conditions.c min-insn-modes.c insn-modes.c insn-modes.h s-flags
s-config s-codes s-mlib s-genrtl s-modes s-gtype gtyp-gen.h s-output
s-recog s-emit s-extract s-peep s-check s-conditions s-attr s-attrtab
s-opinit s-preds s-constants s-crt0 genemit genoutput genrecog
genextract genflags gencodes genconfig genpeep genattrtab genattr
genopinit gengenrtl gencheck genpreds genconstants gengtype
genconditions genmodes genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c
xgcc cpp cc1  crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o 
gcc-cross protoize unprotoize specs collect2 collect2 gcov-iov gcov
gcov-dump *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk 
stage1
mv: cannot stat `s-crt0': No such file or directory
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
mv: cannot stat `protoize': No such file or directory
mv: cannot stat `unprotoize': No such file or directory
mv: cannot stat `specs': No such file or directory
mv: cannot stat `collect2': No such file or directory
mv: cannot stat `gcov': No such file or directory
mv: cannot stat `gcov-dump': No such file or directory
mv: cannot stat `*.[0-9][0-9].*': No such file or directory
mv: cannot stat `*.[si]': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)
if [ -f as ] ; then (cd stage1 && ln -s ../as .) ; else true ; fi
if [ -f ld ] ; then (cd stage1 && ln -s ../ld .) ; else true ; fi
if [ -f collect-ld ] ; then (cd stage1 && ln -s ../collect-ld .) ;
else true ; fi
rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a
rm -f stage1/libgcc_s*.so
cp libgcc.a stage1
` if [ -f /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ] ; then
echo /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ; else if [
"i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo ranlib; else
t='s,y,y,'; echo ranlib | sed -e $t ; fi; fi` stage1/libgcc.a
cp libgcov.a stage1
` if [ -f /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ] ; then
echo /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ; else if [
"i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo ranlib; else
t='s,y,y,'; echo ranlib | sed -e $t ; fi; fi` stage1/libgcov.a
if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
   ` if [ -f /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ] ;
then echo /mnt/lfs/sources/gcc-build/gcc/../binutils/ranlib ; else if
[ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo ranlib; else
t='s,y,y,'; echo ranlib | sed -e $t ; fi; fi` stage1/libgcc_eh.a; \
fi
cp libgcc_s*.so stage1
for f in .. ; do if [ x${f} != x.. ]; then \
  cp stage1/${f} . ; \
else true; \
fi; done
for dir in .  ; \
do \
  rm -f $dir/*.{gcda,gcno} ; \
done
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
echo timestamp > stage1_copy
echo stage2_build > stage_last
make CC=" stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/"
CC_FOR_BUILD=" stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/"
\
	 STAGE_PREFIX=stage1/ \
	 ADAFLAGS="" CFLAGS="-g -O2" LDFLAGS="-static"
WARN_CFLAGS="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-pedantic
-Wno-long-long -Wold-style-definition " libdir=/tools/lib LANGUAGES="c
gcov gcov-dump " MAKEINFO="makeinfo --split-size=5000000"
MAKEINFOFLAGS="--no-split" MAKEOVERRIDES= OUTPUT_OPTION="-o \$@" \
	 CFLAGS="-g -O2" WERROR="" 
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
stage1/xgcc -Bstage1/ -B/tools/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 -DGENERATOR_FILE    -I. -I. -I../../gcc-3.4.1/gcc
-I../../gcc-3.4.1/gcc/. -I../../gcc-3.4.1/gcc/../include 
../../gcc-3.4.1/gcc/genmodes.c -o genmodes.o
stage1/xgcc -Bstage1/ -B/tools/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 -DGENERATOR_FILE    -I. -I. -I../../gcc-3.4.1/gcc
-I../../gcc-3.4.1/gcc/. -I../../gcc-3.4.1/gcc/../include 
../../gcc-3.4.1/gcc/errors.c -o errors.o
stage1/xgcc -Bstage1/ -B/tools/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 -DGENERATOR_FILE -static -o genmodes \
 genmodes.o errors.o ../libiberty/libiberty.a
genmodes.o(.text+0x19a): In function `eq_mode':
../../gcc-3.4.1/gcc/genmodes.c:188: undefined reference to `strcmp'
genmodes.o(.text+0x661): In function `make_complex_modes':
../../gcc-3.4.1/gcc/genmodes.c:419: undefined reference to `strlen'
genmodes.o(.text+0x6f7):../../gcc-3.4.1/gcc/genmodes.c:432: undefined
reference to `strncpy'
genmodes.o(.text+0x708):../../gcc-3.4.1/gcc/genmodes.c:433: undefined
reference to `strchr'
../libiberty/libiberty.a(hashtab.o)(.text+0x317): In function `htab_empty':
../../gcc-3.4.1/libiberty/hashtab.c:319: undefined reference to `memset'
../libiberty/libiberty.a(xmalloc.o)(.text+0xbb): In function `xmalloc_failed':
../../gcc-3.4.1/libiberty/xmalloc.c:121: undefined reference to `environ'
../libiberty/libiberty.a(xstrdup.o)(.text+0xe): In function `xstrdup':
../../gcc-3.4.1/libiberty/xstrdup.c:30: undefined reference to `strlen'
../libiberty/libiberty.a(xstrdup.o)(.text+0x26):../../gcc-3.4.1/libiberty/xstrdup.c:32:
undefined reference to `memcpy'
/usr/lib/libc.a(libc-start.o)(.text+0x3d): In function `__libc_start_main':
: undefined reference to `__environ'
/usr/lib/libc.a(libc-start.o)(.text+0x42): In function `__libc_start_main':
: undefined reference to `__libc_stack_end'
/usr/lib/libc.a(libc-start.o)(.text+0x9a): In function `__libc_start_main':
: undefined reference to `__environ'
/usr/lib/libc.a(libc-start.o)(.text+0xdb): In function `__libc_start_main':
: undefined reference to `__environ'
/usr/lib/libc.a(errno-loc.o)(.text+0x7): In function `__errno_location':
: undefined reference to `__libc_multiple_threads'
/usr/lib/libc.a(errno-loc.o)(.text+0x10): In function `__errno_location':
: undefined reference to `errno'
/usr/lib/libc.a(abort.o)(.text+0x10f): In function `abort':
: undefined reference to `memset'
/usr/lib/libc.a(abort.o)(.text+0x1df): In function `abort':
: undefined reference to `_exit'
/usr/lib/libc.a(msort.o)(.text+0xe9): undefined reference to `memcpy'
/usr/lib/libc.a(msort.o)(.text+0x116): undefined reference to `__mempcpy'
/usr/lib/libc.a(msort.o)(.text+0x146): undefined reference to `__mempcpy'
/usr/lib/libc.a(msort.o)(.text+0xd0): undefined reference to `memcpy'
/usr/lib/libc.a(exit.o)(.text+0xc5): In function `exit':
: undefined reference to `_exit'
/usr/lib/libc.a(vfprintf.o)(.text+0x30): undefined reference to `__mempcpy'
/usr/lib/libc.a(vfprintf.o)(.text+0x7e): undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0xba9): In function `vfprintf':
: undefined reference to `memset'
/usr/lib/libc.a(vfprintf.o)(.text+0x1f05): In function `vfprintf':
: undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x202e): In function `vfprintf':
: undefined reference to `__strnlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x2047): In function `vfprintf':
: undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x31cb): In function `vfprintf':
: undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x32f3): In function `vfprintf':
: undefined reference to `__strnlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x330c): In function `vfprintf':
: undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x3d37): In function `vfprintf':
: undefined reference to `strlen'
/usr/lib/libc.a(vfprintf.o)(.text+0x3d6c): In function `vfprintf':
: undefined reference to `__mempcpy'
/usr/lib/libc.a(vfprintf.o)(.text+0x3feb): In function `vfprintf':
: undefined reference to `_itoa_upper_digits'
/usr/lib/libc.a(vfprintf.o)(.text+0x4081): In function `vfprintf':
: undefined reference to `_itoa_lower_digits'
/usr/lib/libc.a(printf_fp.o)(.text+0x4d): undefined reference to `__mpn_mul_1'
/usr/lib/libc.a(printf_fp.o)(.text+0x128): undefined reference to `__mpn_mul_1'
/usr/lib/libc.a(printf_fp.o)(.text+0x2ef): In function `__printf_fp':
: undefined reference to `__isnanl'
/usr/lib/libc.a(printf_fp.o)(.text+0x708): In function `__printf_fp':
: undefined reference to `_fpioconst_pow10'
/usr/lib/libc.a(printf_fp.o)(.text+0x7d5): In function `__printf_fp':
: undefined reference to `__tens'
/usr/lib/libc.a(printf_fp.o)(.text+0x7e5): In function `__printf_fp':
: undefined reference to `__tens'
/usr/lib/libc.a(printf_fp.o)(.text+0x81e): In function `__printf_fp':
: undefined reference to `_fpioconst_pow10'
/usr/lib/libc.a(printf_fp.o)(.text+0xdb1): In function `__printf_fp':
: undefined reference to `strlen'
/usr/lib/libc.a(printf_fp.o)(.text+0xdcd): In function `__printf_fp':
: undefined reference to `strlen'
/usr/lib/libc.a(printf_fp.o)(.text+0x10ce): In function `__printf_fp':
: undefined reference to `__mempcpy'
/usr/lib/libc.a(printf_fp.o)(.text+0x1823): In function `__printf_fp':
<SNIP>
/usr/lib/libc.a(dl-version.o)(.text+0x1d): undefined reference to
`_dl_debug_mask'
/usr/lib/libc.a(dl-version.o)(.text+0xbe): undefined reference to `strlen'
/usr/lib/libc.a(dl-version.o)(.text+0xe6): undefined reference to `__stpcpy'
/usr/lib/libc.a(dl-version.o)(.text+0x172): undefined reference to `strlen'
/usr/lib/libc.a(dl-version.o)(.text+0x19d): undefined reference to `__stpcpy'
/usr/lib/libc.a(dl-version.o)(.text+0x1db): undefined reference to `strcmp'
/usr/lib/libc.a(dl-version.o)(.text+0x24b): undefined reference to `strlen'
/usr/lib/libc.a(dl-version.o)(.text+0x273): undefined reference to `__stpcpy'
/usr/lib/libc.a(dl-version.o)(.text+0x2b5): undefined reference to `strlen'
/usr/lib/libc.a(dl-version.o)(.text+0x2dd): undefined reference to `__stpcpy'
/usr/lib/libc.a(dl-version.o)(.text+0x67d): In function
`_dl_check_map_versions':
: undefined reference to `strlen'
/usr/lib/libc.a(dl-version.o)(.text+0x6a5): In function
`_dl_check_map_versions':
: undefined reference to `__stpcpy'
/usr/lib/libc.a(dl-version.o)(.text+0x74b): In function
`_dl_check_all_versions':
: undefined reference to `_dl_loaded'
/usr/lib/libc.a(dl-version.o)(.text+0x7da): In function
`_dl_check_all_versions':
: undefined reference to `strcmp'
/usr/lib/libc.a(dl-version.o)(.text+0x80a): In function
`_dl_check_all_versions':
: undefined reference to `strcmp'
collect2: ld returned 1 exit status
make[2]: *** [genmodes] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2

-- 
Phillip Fynan



More information about the lfs-support mailing list