Glibc-2.3.2 Chapter 6 make error

Karl Wilbur karl at karlwilbur.net
Thu Jan 15 21:44:09 PST 2004


Glibc build is failing.

I have deleted source and build dirs and started over again three times. 
All with same result. Same error at same point in build.

Host system:
- LFS 4.1
- Linux kernel version 2.4.23
- Glibc & GCC:

    "GNU C Library stable release version 2.3.1, by Roland McGrath et al.
    Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE.
    Compiled by GNU CC version 3.2.1.
    Compiled on a Linux 2.4.21 system on 2003-07-15.
    Available extensions:
            GNU libio by Per Bothner
            crypt add-on version 2.1 by Michael Glad and others
            linuxthreads-0.10 by Xavier Leroy
            BIND-8.2.3-T5B
            libthread_db work sponsored by Alpha Processor Inc
            NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk"

- AMD Athlon XP 2100+

I built glibc just find in Chapter 5 no problems.

I have built LFS-5.0 from same packages on different system and it 
worked fine. With this previous build the packages were kept on a local 
server and were downloaded to the system on which I built LFS. 

This current problem is happening while trying to build from the same 
source packages but being build on the server in the /home/lfs/LFS dir.

I have been googling for hours trying to find the solution to this.  I 
have searched the LFS FAQ and mailing list archives but have not found 
this exact problem (or anything that seemed similar enough to have the 
same solution).

I don't know if I could have overlooked something this time or if I may 
have skipped a step or something.

I have included a copy of all commands that I have used since I began 
this build on my server as well as a screen dump of the error.

I would like to know where I could look to find out what I did wrong and 
learn how to avoid doing it again.

Any help will be appreciated.

COMMANDS=======================================

SETUP=====================

export LFS=/home/lfs/LFS
mkdir $LFS/tools
chown lfs $LFS/tools
ln -s $LFS/tools /
mkdir $LFS/sources
chown lfs $LFS/sources
chmod a+wt $LFS/sources
mkdir $LFS/builds
chown lfs $LFS/builds

su lfs

cat > ~/.bash_profile << "EOF"
set +h
alias ls='ls --color=auto'
alias ll='ls -l'
LFS=/home/lfs/LFS
BUILDDIR=$LFS/builds
SOURCEDIR=$LFS/sources
PATCHDIR=$SOURCEDIR/patches
alias lh='ls -sh'
umask 022
LC_ALL=POSIX
PATH=/tools/bin:$PATH
export LFS BUILDDIR SOURCEDIR PATCHDIR LC_ALL PATH
unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
EOF

source ~/.bash_profile

Chapter 5 - Temp System (Static Build)========

==================BinUtils===============
cd $BUILDDIR
tar xvfj $SOURCEDIR/binutils-2.14.tar.bz2
mkdir binutils-build
cd binutils-build
../binutils-2.14/configure --prefix=/tools --disable-nls
make configure-host
make LDFLAGS="-all-static"
make install
make -C ld clean
make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib

===============GCC=======================

cd $BUILDDIR
tar xvfj $SOURCEDIR/gcc-core-3.3.1.tar.bz2
mkdir gcc-build
cd gcc-build
../gcc-3.3.1/configure --prefix=/tools --with-local-prefix=/tools 
--disable-nls --enable-shared --enable-languages=c
make BOOT_LDFLAGS="-static" bootstrap
make install
ln -sf gcc /tools/bin/cc

==========Linux-headers===============

cd $BUILDDIR
tar xvfj $SOURCEDIR/linux-2.4.22.tar.bz2
cd linux-2.4.22
make mrproper
make include/linux/version.h
make symlinks
mkdir /tools/include/asm
cp include/asm/* /tools/include/asm
cp -R include/asm-generic /tools/include
cp -R include/linux /tools/include
touch /tools/include/linux/autoconf.h

===================Glibc==================

mkdir /tools/etc
touch /tools/etc/ld.so.conf

cd $BUILDDIR
tar xvfj $SOURCEDIR/glibc-2.3.2.tar.bz2
cd glibc-2.3.2
tar xvfj $SOURCEDIR/glibc-linuxthreads-2.3.2.tar.bz2
patch -Np1 -i $PATCHDIR/glibc-2.3.2-sscanf-1.patch
mkdir ../glibc-build
cd ../glibc-build
../glibc-2.3.2/configure --prefix=/tools --disable-profile 
--enable-add-ons --with-headers=/tools/include 
--with-binutils=/tools/bin --without-gd
make
make install
make localedata/install-locales

cd $BUILDDIR/binutils-build
make -C ld install
cd ..
rm -rf binutils-*

SPECFILE= /tools/lib/gcc-lib/*/*/specs &&
sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2 at g' \
    $SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE

rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}

======================TCL======================
cd $BUILDDIR
tar xvfz $SOURCEDIR/tcl8.4.4-src.tar.gz
cd tcl8.4.4/
cd unix
./configure --prefix=/tools
make
make install
ln -s tclsh8.4 /tools/bin/tclsh

=================Expect====================
cd $BUILDDIR/
tar xvfz $SOURCEDIR/expect.tar.gz
cd expect-5.39/
patch -Np1 -i $PATCHDIR/expect-5.39.0-spawn.patch
./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no
make
make SCRIPTS="" install

==============DejaGnu==============
cd $BUILDDIR
tar xvfz $SOURCEDIR/dejagnu-1.4.3.tar.gz
cd dejagnu-1.4.3/
./configure --prefix=/tools
make install

======================GCC==================
cd $BUILDDIR
rm -rf gcc-*
tar xvfj $SOURCEDIR/gcc-core-3.3.1.tar.bz2
tar xvfj $SOURCEDIR/gcc-g++-3.3.1.tar.bz2
tar xvfj $SOURCEDIR/gcc-testsuite-3.3.1.tar.bz2
cd gcc-3.3.1/
patch -Np1 -i $PATCHDIR/gcc-3.3.1-no_fixincludes-2.patch
patch -Np1 -i $PATCHDIR/gcc-3.3.1-specs-2.patch
mkdir ../gcc-build
cd ../gcc-build
../gcc-3.3.1/configure --prefix=/tools --with-local-prefix=/tools 
--enable-clocale=gnu --enable-shared --enable-threads=posix 
--enable-__cxa_atexit --enable-languages=c,c++
make
make install

===================BinUtils==========================
cd $BUILDDIR
tar xvfj $SOURCEDIR/binutils-2.14.tar.bz2
mkdir binutils-build
cd binutils-build
../binutils-2.14/configure --prefix=/tools --enable-shared 
--with-lib-path=/tools/lib
make
make install
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib

==================Gawk====================
cd $BUILDDIR
tar xvfj $SOURCEDIR/gawk-3.1.3.tar.bz2
cd gawk-3.1.3/
./configure --prefix=/tools
make
make install

====================CoreUtils=============

cd $BUILDDIR
tar xvfj $SOURCEDIR/coreutils-5.0.tar.bz2
cd coreutils-5.0/
./configure --prefix=/tools
make
make install

==================Bzip2=====================
cd $BUILDDIR
tar xvfz $SOURCEDIR/bzip2-1.0.2.tar.gz
cd bzip2-1.0.2
make PREFIX=/tools install

=================Gzip=======================
cd $BUILDDIR
tar xvfz $SOURCEDIR/gzip-1.3.5.tar.gz
cd gzip-1.3.5
./configure --prefix=/tools
make
make install

================Diffutils==================
cd $BUILDDIR
tar xvfz $SOURCEDIR/diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
./configure --prefix=/tools
make
make install

================Findutils==================
cd $BUILDDIR
tar xvfz $SOURCEDIR/findutils-4.1.20.tar.gz
cd findutils-4.1.20
./configure --prefix=/tools
make
make install 

===================Make===================
cd $BUILDDIR
tar xvfj  $SOURCEDIR/make-3.80.tar.bz2
cd make-3.80
./configure --prefix=/tools
make
make install

===================Grep====================
cd $BUILDDIR
tar xvfj  $SOURCEDIR/grep-2.5.1.tar.bz2
cd grep-2.5.1
./configure --prefix=/tools --disable-perl-regexp --with-included-regex
make
make install

==================Sed======================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/sed-4.0.7.tar.gz
cd sed-4.0.7
./configure --prefix=/tools
make
make install

=================Gettext====================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/gettext-0.12.1.tar.gz
cd gettext-0.12.1
./configure --prefix=/tools
make
make install

==================Ncurses===================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/ncurses-5.3.tar.gz
cd ncurses-5.3
patch -Np1 -i $PATCHDIR/ncurses-5.3-etip-2.patch
patch -Np1 -i $PATCHDIR/ncurses-5.3-vsscanf.patch
./configure --prefix=/tools --with-shared --without-debug --without-ada 
--enable-overwrite
make
make install

================Patch=====================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/patch-2.5.4.tar.gz
cd patch-2.5.4
CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools
make
make install

==================Tar=====================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/tar-1.13.25.tar.gz
cd tar-1.13.25
./configure --prefix=/tools
make
make install

=================Texinfo==================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/texinfo-4.6.tar.gz
cd texinfo-4.6
./configure --prefix=/tools
make
make install

=================Bash=====================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/bash-2.05b.tar.gz
cd bash-2.05b
patch -Np1 -i $PATCHDIR/bash-2.05b-2.patch
./configure --prefix=/tools
make
make install
ln -s bash /tools/bin/sh

===============Util-linux==================
cd $BUILDDIR
tar xvfz $SOURCEDIR/util-linux-2.12.tar.gz
cd util-linux-2.12
cp configure configure.backup
sed "s@/usr/include@/tools/include at g" configure.backup > configure
./configure
make -C lib
make -C mount  mount umount
make -C text-utils  more
cp mount/{,u}mount text-utils/more /tools/bin

=================Perl=====================
cd $BUILDDIR
tar xvfz  $SOURCEDIR/perl-5.8.0.tar.gz
cd perl-5.8.0
patch -Np1 -i $PATCHDIR/perl-5.8.0-libc-3.patch
chmod u+w hints/linux.sh
echo 'static_ext="IO re Fcntl"' >> hints/linux.sh
./configure.gnu --prefix=/tools
make perl utilities
cp perl pod/pod2man /tools/bin
mkdir -p /tools/lib/perl5/5.8.0
cp -R lib/* /tools/lib/perl5/5.8.0

===============STRIPPING DEBUG============
cd $BUILDDIR
strip --strip-unneeded /tools/{,s}bin/*
strip --strip-debug /tools/lib/*
rm -rf /tools/{,share/}{doc,info,man}

=============CLEAN BUILDDIR================

rm -rf bash-2.05b/ bzip2-1.0.2/ coreutils-5.0/ dejagnu-1.4.3/ 
diffutils-2.8.1/ expect-5.39/ findutils-4.1.20/ gawk-3.1.3/ gcc-* 
gettext-0.12.1/ glibc-* gzip-1.3.5/ linux-2.4.22/ make-3.80/ 
ncurses-5.3/ patch-2.5.4/ tcl8.4.4/ texinfo-4.6/ util-linux-2.12/ 
grep-2.5.1/ perl-5.8.0/ sed-4.0.7/ tar-1.13.25/

===============================
Begin Chapter 6 - The LFS Build


==============CHROOT=====================
chroot $LFS /tools/bin/env -i HOME=/root BUILDDIR=/root/builds 
SOURCEDIR=/usr/src/pkgs PATCHDIR=$SOURCEDIR/patches TERM=$TERM 
PS1='[\u at newbuild] \w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin 
/tools/bin/bash --login

=========SETUP NEW ENVIRONMENT===========
chown -R 0:0 /tools
mkdir -p /{bin,boot,dev/{pts,shm},etc/opt,home,lib,mnt,proc}
mkdir -p /{root,sbin,tmp,usr/{share,local}/games,var,opt}
for dirname in /usr /usr/local
    do
    mkdir $dirname/{bin,etc,include,lib,sbin,share,src/pkgs}
    ln -s share/{man,doc,info} $dirname
    mkdir $dirname/share/{dict,doc,info,locale,man}
    mkdir $dirname/share/{nls,misc,terminfo,zoneinfo}
    mkdir $dirname/share/man/man{1,2,3,4,5,6,7,8}
done
mkdir /var/{lock,log,mail,run,spool}
mkdir -p /var/{tmp,opt,cache,lib/misc,local}
mkdir /opt/{bin,doc,include,info}
mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}
chmod 0750 /root
chmod 1777 /tmp /var/tmp
ln -s /tools/bin/{bash,cat,pwd,stty} /bin
ln -s /tools/bin/perl /usr/bin
ln -s /tools/lib/libgcc_s.so.1 /usr/lib
ln -s bash /bin/sh
mv /builds /root/builds
mv /sources/* /usr/src/pkgs
rmdir /sources
mount proc /proc -t proc
mount devpts /dev/pts -t devpts
mount -t devfs devfs /dev

cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
EOF

cat > /etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
EOF

exec /tools/bin/bash --login +h


================Kernel Headers=============
cd $BUILDDIR
tar $SOURCEDIR/linux-2.4.22.tar.bz2
cd linux-2.4.22
make mrproper
make include/linux/version.h
cp -HR include/asm-i386 /usr/include
cp -R include/asm-generic /usr/include
cp -R include/linux /usr/include
touch /usr/include/linux/autoconf.h

==========Man-pages=======================
cd $BUILDDIR
tar xvfj $SOURCEDIR/man-pages-1.60.tar.bz2
cd man-pages-1.60
make install

=========Glibc============================
cd $BUILDDIR
tar xvfj $SOURCEDIR/glibc-2.3.2.tar.bz2
cd glibc-2.3.2
tar xvfj $SOURCEDIR/glibc-linuxthreads-2.3.2.tar.bz2
touch /etc/ld.so.conf
patch -Np1 -i $PATCHDIR/glibc-2.3.2-sscanf-1.patch
mkdir ../glibc-build
cd ../glibc-build
../glibc-2.3.2/configure --prefix=/usr --disable-profile 
--enable-add-ons --libexecdir=/usr/bin --with-headers=/usr/include
make
!!!!!!!!!!!!!!!!!!!!!!!!!!!ERROR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

START SCREEN DUMP ********************************
In file included from ../sysdeps/unix/sysdep.h:21,
                 from ../sysdeps/unix/i386/sysdep.h:19,
                 from ../sysdeps/unix/sysv/linux/i386/sysdep.h:24,
                 from ../sysdeps/unix/sysv/linux/init-first.c:24:
../sysdeps/unix/sysv/linux/sys/syscall.h:25:24: asm/unistd.h: No such 
file or directory
In file included from ../sysdeps/unix/sysv/linux/sys/param.h:24,
                 from ../sysdeps/unix/sysv/linux/init-first.c:26:
/usr/include/linux/param.h:4:23: asm/param.h: No such file or directory
In file included from ../signal/signal.h:313,
                 from ../include/signal.h:5,
                 from ../linuxthreads/internals.h:23,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/generic/ldsodefs.h:38,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../sysdeps/unix/sysv/linux/bits/sigcontext.h:28:29: asm/sigcontext.h: No 
such file or directory
In file included from ../include/signal.h:5,
                 from ../linuxthreads/internals.h:23,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/generic/ldsodefs.h:38,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../signal/signal.h:316: warning: `struct sigcontext' declared inside 
parameter list
../signal/signal.h:316: warning: its scope is only this definition or 
declaration, which is probably not what you want
In file included from ../linuxthreads/internals.h:23,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/generic/ldsodefs.h:38,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../include/signal.h:38: warning: `struct sigcontext' declared inside 
parameter list
In file included from ../inet/netinet/in.h:212,
                 from ../include/netinet/in.h:3,
                 from ../resolv/resolv.h:57,
                 from ../include/resolv.h:11,
                 from ../linuxthreads/descr.h:19,
                 from ../linuxthreads/internals.h:29,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/generic/ldsodefs.h:38,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../sysdeps/unix/sysv/linux/bits/socket.h:305:24: asm/socket.h: No such 
file or directory
In file included from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/generic/ldsodefs.h:38,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../linuxthreads/internals.h:108: warning: `struct sigcontext' declared 
inside parameter list
../linuxthreads/internals.h:108: warning: parameter has incomplete type
../linuxthreads/internals.h:449: warning: `struct sigcontext' declared 
inside parameter list
../linuxthreads/internals.h:449: warning: parameter has incomplete type
../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word'
../stdio-common/_itoa.h:76: warning: called from here
make[2]: *** [/root/builds/glibc-build/csu/init-first.o] Error 1
make[2]: Leaving directory `/root/builds/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/root/builds/glibc-2.3.2'
make: *** [all] Error 2
[root at newbuild] ~/builds/glibc-build#

END SCREEN DUMP ****************************



More information about the lfs-support mailing list