LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 05-09-2005, 08:33 AM   #1
mugwump84
Member
 
Registered: Mar 2005
Distribution: Arch Linux
Posts: 61

Rep: Reputation: 15
GCC pass 1 error


I am using VectorLinux as my host distro, I am on GCC pass 1.
I'm getting too many 'undefined reference' errors for My taste
Please Help.

Here goes, Nasty looking, isn't it :

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
 
Old 05-10-2005, 06:19 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
better break this up into sections and concentrate on one thing at a time ( there's alot here)

first, the *.o files that mv is complaining about toward the top come with gcc, look in /usr/lib/gcc-lib/xxxxxxx/<gcc version number> and see if they are there. if not, you will have to sort that out with your distro.

you undefined reference errors seem to be indicating you don't have a glibc installed, so check for that ( should be in /lib or /usr/lib ( or both, installed to one prefix and symlinked to the other).
 
Old 05-10-2005, 05:21 PM   #3
mugwump84
Member
 
Registered: Mar 2005
Distribution: Arch Linux
Posts: 61

Original Poster
Rep: Reputation: 15
Yeah, I think this distro's toolchain is messed up, the binutils were installed under i486-pc-slackware (Or something similar). I'll try to switch to mepis (I think it will build LFS.).
Thanks anyway.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC second pass Mystified Linux From Scratch 6 07-28-2005 09:21 PM
Error Compiling GCC (1st Pass) in LFS 6.0 TGWDNGHN Linux From Scratch 1 06-30-2005 08:57 PM
Error configuring GCC, First Pass lloyd_smart Linux From Scratch 8 10-29-2004 11:45 AM
LFS5.1.1 gcc-core-3.3.3 bootstrap (first pass) error. Cynric Linux From Scratch 3 08-18-2004 09:34 PM
binutils-2.14 first pass, gcc error Add1Sun Linux From Scratch 3 04-29-2004 04:27 PM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration