NCurses

scott thomason scott at industrial-linux.org
Wed Jan 10 16:15:05 PST 2001


Here are my latest build scripts. The further I go, the more I diverge from the LFS book, so caveat compilor...
---scott

p.s. I didn't come up with the patches originally; I got them from Tom and Sergey...credit where credit is due. All I did was post them repeatedly.

0000:.:{
  option keepenv nopkg

  export PBLD=/bld
  export PSRC=ilbld

  export PATH=/usr/local/gcc-2.95.2/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  export CC=/usr/local/gcc-2.95.2/bin/gcc
  export CXX=/usr/local/gcc-2.95.2/bin/gcc
  export CFLAGS=`cat $PBLD/$PSRC/bldscripts/speccflags`
  export CXXFLAGS=$CFLAGS
}

0010:.:{
  option keepdir

  cd $PBLD

  rm -rf bin boot dev etc home lib mnt proc root sbin tmp usr var
  mkdir bin boot dev dev/pts etc home lib mnt mnt/cdrom mnt/floppy proc root sbin tmp usr usr/local usr/doc usr/doc/installed var

  env|sort > $PBLD/tmp/bldenv

  cd $PBLD/usr
  mkdir bin etc include lib sbin share src tmp var
  ln -fs share/man man
  ln -fs share/doc doc
  ln -fs share/info info

  cd $PBLD/usr/share
  mkdir dict doc info locale man nls misc terminfo zoneinfo

  cd $PBLD/usr/share/man
  mkdir man1 man2 man3 man4 man5 man6 man7 man8

  cd $PBLD/usr/local
  mkdir bin etc include lib sbin share src tmp var
  ln -fs share/man man
  ln -fs share/doc doc
  ln -fs share/info info

  cd $PBLD/usr/local/share
  mkdir dict doc info locale man nls misc terminfo zoneinfo

  cd $PBLD/usr/local/share/man
  mkdir man1 man2 man3 man4 man5 man6 man7 man8

  cd $PBLD/var
  mkdir lock log run spool tmp

  chmod 0750 $PBLD/root
  chmod 1777 $PBLD/tmp $PBLD/usr/tmp $PBLD/var/tmp

  echo "root:x:0:0:root:/root:/bin/bash" > $PBLD/etc/passwd

  echo "root:x:0:"   >	$PBLD/etc/group
  echo "bin:x:1:"    >> $PBLD/etc/group
  echo "sys:x:2:"    >> $PBLD/etc/group
  echo "kmem:x:3:"   >> $PBLD/etc/group
  echo "tty:x:4:"    >> $PBLD/etc/group
  echo "uucp:x:5:"   >> $PBLD/etc/group
  echo "daemon:x:6:" >> $PBLD/etc/group
  echo "floppy:x:7:" >> $PBLD/etc/group
  echo "disk:x:8:"   >> $PBLD/etc/group
}

0020:bash-2.04:{
  export CFLAGS=$CFLAGS -O2
  export CXXFLAGS=$CFLAGS

  ./configure --enable-static-link --prefix=$PBLD/usr --bindir=$PBLD/bin --disable-nls --with-ncurses
  make 
  make install 
  cd $PBLD/bin 
  ln -fs bash sh
}

0022:binutils-2.10.1:{
  ./configure --prefix=$PBLD/usr --disable-nls 
  make -e LDFLAGS=-all-static tooldir=$PBLD/usr
  make install
}

0024:bzip2-1.0.1:{
  patch -p0 < ../../../$PATCH/bzip2-1.0.1-makefile-patch
  make LDFLAGS=-static 
  make PREFIX=$PBLD/usr install 
  cd $PBLD/usr/bin 
  mv bzcat bunzip2 bzip2 bzip2recover $PBLD/bin
}

0026:diffutils-2.7:{
  export CPPFLAGS=-Dre_max_failures=re_max_failures2
  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make install
}

0028:fileutils-4.0:{
  ./configure --disable-nls --prefix=$PBLD/usr --bindir=$PBLD/bin
  make LDFLAGS=-static
  make install
  cd $PBLD/usr/bin
  ln -fs ../../bin/install install
}

0030:gcc-2.95.2:{
  export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  export CC=/usr/bin/gcc
  export CXX=/usr/bin/gcc
  export CFLAGS=-O2 -march=pentium -ffast-math -fomit-frame-pointer
  export CXXFLAGS=$CFLAGS

  patch -p1 -E < ../../../$PATCH/gcc-2.95.2-pgcc-2.95.3.diff
  # ## Rejected patch hunks are trivial
  # ! patch -p1 -E < ../../../$PATCH/bounds-checking-gcc-2.95.2-1.03.patch
  patch -p1 -E < ../../../$PATCH/gcc-2.95.2-glibc-2.2.patch

  cd ..
  mkdir bld
  cd bld

  ../gcc-2.95.2/configure --prefix=/usr --with-gxx-include-dir=/usr/include/g++ --enable-languages=c,c++ --disable-nls

  make -e LDFLAGS=-static bootstrap

  make prefix=$PBLD/usr local_prefix=$PBLD/usr/local gxx_include_dir=$PBLD/usr/include/g++ install
  
  cd $PBLD/lib
  ln -fs ../usr/lib/gcc-lib/*/2.95.2/cpp cpp
  cd $PBLD/usr/lib
  ln -fs gcc-lib/*/2.95.2/cpp cpp
  cd $PBLD/usr/bin
  ln -fs gcc cc
}

0035:linux-2.4.0:{
  export TARDIR=linux
  
  bzip2 -d -c ../../../$PATCH/modutils-kernel-patch-2.4.0-persistent.bz2 | patch -p1
  bzip2 -d -c ../../../$PATCH/kernel-patch-2.4.0-ac4.bz2 | patch -p1
  ! patch -p1 < ../../../$PATCH/linux-2.4.0-reiserfs-3.6.25-patch
  patch -p1 < ../../../$PATCH/fix-ac2-reiserfs-patch

  yes '' | make config

  make dep
  cd include
  cp -a linux/	  $PBLD/usr/include/
  cp -a asm-i386/ $PBLD/usr/include/asm/
}

0040:glibc-2.2:{
  export LIBGD=no

  bzip2 -d -c ../../../$TAR/glibc-linuxthreads-2.2.tar.bz2 | tar xf -
  patch -p0 -d elf/ < ../../../$PATCH/glibc-2.2-ldconfig.patch

  cd ..
  mkdir bld
  
  cp ../../$PATCH/glibc-configparms bld/

  cd bld

  ../glibc-2.2/configure --prefix=/usr --enable-add-ons --with-headers=$PBLD/usr/include --enable-kernel=2.2.17 --disable-profile --without-gd --without-cvs 
  make LIBGD=no
  make LIBGD=no install_root=$PBLD install
  make install_root=$PBLD localedata/install-locales
}

0050:grep-2.4.2:{
  export CPPFLAGS=-Dre_max_failures=re_max_failures2

  ./configure --prefix=$PBLD/usr --disable-nls
  make LDFLAGS=-static
  make install
}

0052:gzip-1.2.4a:{
  patch -p1 < ../../../$PATCH/gzip-1.2.4a.patch

  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make install

  cd $PBLD/usr/bin
  cp gunzip gzip $PBLD/bin
  rm gunzip gzip
}

0038:make-3.79.1:{
  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make install
}

0056:sed-3.02:{
  export CPPFLAGS=-Dre_max_failures=re_max_failures2

  ./configure --prefix=$PBLD/usr --disable-nls --bindir=$PBLD/bin
  make LDFLAGS=-static 
  make prefix=$PBLD/usr 
  make install
}

0057:mawk-1.3.3:{
  export CFLAGS=$CFLAGS -fno-fast-math
  export CXXFLAGS=$CFLAGS

  ./configure --prefix=$PBLD/usr --disable-nls
  make LDFLAGS=-static
  make BINDIR=$PBLD/usr/bin MANDIR=$PBLD/usr/share/man/man1 install
  cd $PBLD/usr/bin
  ln -fs mawk awk
}

0058:sh-utils-2.0:{
  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make install

  cd $PBLD/usr/bin
  mv date echo false pwd stty $PBLD/bin
  mv su true uname hostname $PBLD/bin
}

0060:tar-1.13:{
  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make prefix=$PBLD/usr install

  mv $PBLD/usr/bin/tar $PBLD/bin
}

0062:textutils-2.0:{
  ./configure --prefix=$PBLD/usr --disable-nls 
  make LDFLAGS=-static 
  make install

  mv $PBLD/usr/bin/cat $PBLD/bin
}

0000:.:{
  option nopkg keepenv

  export PBLD=/bld
  export PSRC=ilbld

  export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/i586-pc-linux-gnu/bin:/usr/local/bin:/usr/local/sbin
  export CC=gcc
  export CXX=gcc
  export CFLAGS="`cat $PBLD/$PSRC/bldscripts/speccflags` "
  export CXXFLAGS=$CFLAGS

  ! $PBLD/$PSRC/tools/mtproc

  option chroot=/bld
}

0001:.:{
  localedef -i en_US -f ISO-8859-1 en_US
}

0002:MAKEDEV-2.5.2:{
  sed 's/# 9/ 9/' MAKEDEV >/dev/MAKEDEV
  chmod 750 /dev/MAKEDEV

  cp MAKEDEV.man /usr/man/man8/MAKEDEV.8
  chmod 644 /usr/man/man8/MAKEDEV.8
  
  cd /dev
  /dev/MAKEDEV -v generic
  /dev/MAKEDEV -v loop
}

0006:patch-2.5.4:{
  ./configure --prefix=/usr
  make
  make install
}

0008:findutils-4.1:{
  patch -p1 < ../../../$PATCH/findutils-4.1.patch

  ./configure --prefix=/usr
  make
  make install
}

0010:mawk-1.3.3:{
  export CFLAGS=$CFLAGS -fno-fast-math
  export CXXFLAGS=$CFLAGS

  ./configure 
  make
  make BINDIR=/usr/bin MANDIR=/usr/share/man/man1 install
  cd /usr/bin
  rm awk
  ln -fs mawk awk
}

0012:ncurses-5.2:{
  ./configure --prefix=/usr --libdir=/lib --with-shared --disable-termcap --without-ada --without-cxx-binding --enable-symlinks 
  make
  make install

  cd /lib
  ln -fs libncurses.a libcurses.a
}

0014:vim-5.7:{
  export TARBALL=../../$TAR/vim-5.7-src.tar.bz2
 
  ##
  ## Screwy combo of tarball not matching package name and 
  ## extra tarball unpacked at same level call for some
  ## shenanigans.
  ##
  echo 'Triggering the untar with this very echo!'
  
  cd ..
  bzip2 -d -c ../../$TAR/vim-5.7-rt.tar.bz2 | tar xf -
  cd vim-5.7

  ./configure --prefix=/usr
  make
  make install

  cd /usr/bin
  ln -fs vim vi
}

0016:gcc-2.95.2:{
  patch -p1 -E < ../../../$PATCH/gcc-2.95.2-pgcc-2.95.3.diff
  # ## Rejected patch hunks are trivial
  # ! patch -p1 -E < ../../../$PATCH/bounds-checking-gcc-2.95.2-1.03.patch
  patch -p1 -E < ../../../$PATCH/gcc-2.95.2-glibc-2.2.patch

  cd ..
  mkdir bld
  cd bld

  ../gcc-2.95.2/configure --prefix=/usr --with-gxx-include-dir=/usr/include/g++ --enable-shared --enable-languages=c,c++
  make bootstrap
  make install

  cd -
  ! patch -Np0 -E -d /usr/include/g++ < ../../../$PATCH/gccinclude-glibc-2.2-compat.diff
}

0018:bison-1.28:{
  ./configure --prefix=/usr --datadir=/usr/share/bison
  make
  make install
}

0020:less-358:{
  ./configure --prefix=/usr --bindir=/bin
  make
  make install
}

0022:groff-1.16.1:{
  ./configure --prefix=/usr
  make
  make install
}

0024:man-1.5h1:{
  ./configure -default
  make
  make install

  sed s/AWK=/"AWK=\/usr\/bin\/mawk"/ /usr/sbin/makewhatis > makewhatis-new
  mv makewhatis-new /usr/sbin/makewhatis
  chmod 755 /usr/sbin/makewhatis
}

0026:perl-5.6.0:{
  sh Configure -des -Dprefix=/usr/perl -Doptimize="$CFLAGS" -Dusedl -Uusemymalloc -Uusethreads -Uuseshrplib -Ubincompat5005
 
  make
  yes | make install 

  cd /usr/bin
  rm -f perl
  ln -fs /usr/perl/bin/perl perl
}

0027:File-Slurp-98.071901:{
  perl Makefile.PL
  make
  make install
}

0028:m4-1.4:{
  ./configure --prefix=/usr
  make
  make install
}

0030:texinfo-4.0:{
  ./configure --prefix=/usr
  make
  make install
}

0032:autoconf-2.13:{
  ./configure --prefix=/usr
  make
  make install
}

0034:automake-1.4:{
  ./configure --prefix=/usr
  make install
}

0036:bash-2.04:{
  ./configure --prefix=/usr --with-ncurses
  make
  make install
}

0038:flex-2.5.4a:{
  export TARDIR=flex-2.5.4

  ./configure --prefix=/usr
  make
  make install
}

0040:file-3.33:{
  ./configure --prefix=/usr --datadir=/usr/share/misc
  make
  make install
}

0042:libtool-1.3.5:{
  ./configure --prefix=/usr
  make
  make install
}

0044:bin86-0.15.4:{
  export TARDIR=bin86

  make
  make PREFIX=/usr install
}

0046:binutils-2.10.1:{
  ./configure --prefix=/usr --enable-shared
  make -e tooldir=/usr
  make -e tooldir=/usr install
}

0048:bzip2-1.0.1:{
  make -f Makefile-libbz2_so
  make bzip2recover libbz2.a
  
  cp bzip2-shared /bin/bzip2
  cp bzip2recover /bin
  cp bzip2.1 /usr/share/man/man1
  cp bzlib.h /usr/include
  cp -af libbz2.so* libbz2.a /lib
  rm -f /usr/lib/libbz2.a

  cd /bin
  rm bunzip2 
  ln -fs bzip2 bunzip2
  rm bzcat 
  ln -fs bzip2 bzcat

  cd /usr/share/man/man1
  ln -fs bzip2.1 bunzip2.1
  ln -fs bzip2.1 bzcat.1
  ln -fs bzip2.1 bzip2recover.1
}

0050:gettext-0.10.35:{
  ./configure --prefix=/usr
  make
  make install
  mv /po-mode.el /usr/share/gettext
}

0052:console-tools-0.2.3:{
  patch -p1 < ../../../$PATCH/console-tools-0.2.3.patch
  
  ./configure --prefix=/usr
  make
  make install
}

0054:console-data-1999.08.29:{
  ./configure --prefix=/usr
  make
  make install
  
  cd /usr/share/keymaps
  ln -fs i386/qwerty/us.kmap.gz defkeymap.kmap.gz
}

0056:diffutils-2.7:{
  ./configure --prefix=/usr
  make
  make install
}

0058:e2fsprogs-1.19:{
  ./configure --prefix=/usr --with-root-prefix= --enable-elf-shlibs
  make
  make install
  make install-libs
}

0060:fileutils-4.0:{
  patch -p0 -d src/ < ../../../$PATCH/fileutils-4.0-glibc-2.2.patch

  ./configure --prefix=/usr --bindir=/bin
  make
  make install

  cd /usr/bin
  rm install
  ln -fs /bin/install install
}

0062:grep-2.4.2:{
  ./configure --prefix=/usr
  make
  make install
}

0064:gzip-1.2.4a:{
  ./configure --prefix=/usr
  make
  make install

  cd /usr/bin
  mv gzip /bin
  rm gunzip /bin/gunzip
  cd /bin
  ln -fs gzip gunzip
}

0068:lilo-21.6:{
  patch -p3 -E < ../../../$PATCH/lilo-21.6-glibc-2.2-reiserfs.patch

  make
  make install
}

0070:make-3.79.1:{
  ./configure --prefix=/usr
  make
  make install
}

0072:modutils-2.4.0:{
  ./configure
  make
  make install
}

0074:procinfo-17:{
  sed "s/-ltermcap/-lncurses/" Makefile >Makefile2
  
  make -f Makefile2
  make -f Makefile2 install
}

0076:procps-2.0.7:{
  make OPT="$CFLAGS" INCDIRS='-I/usr/include -I.' XSCPT='' install

  mv /usr/bin/kill /bin
}

0078:psmisc-19:{
  export TARDIR=psmisc

  sed "s/-ltermcap/-lncurses/" Makefile >Makefile2
  
  make -f Makefile2
  make -f Makefile2 install
}

0080:sed-3.02:{
  ./configure --prefix=/usr --bindir=/bin
  make
  make install
}

0082:sh-utils-2.0:{
  ./configure --prefix=/usr
  make
  make install

  cd /usr/bin
  mv date echo false pwd stty /bin
  mv su true uname hostname /bin
}

0084:shadow-20001016:{
  patch -p0 -d src < ../../../$PATCH/shadow-20001016-useradd.c.patch

  ./configure --prefix=/usr
  make
  make install

  cd etc
  cp limits login.access login.defs.linux /etc
  mv /etc/login.defs.linux /etc/login.defs
}

0086:sysklogd-1.4:{
  make
  make install
}

0088:sysvinit-2.78:{
  cd src
  make
  make install
}

0090:tar-1.13:{
  patch -p0 -E -d src/ < ../../../$PATCH/tar-bzip2.patch

  ./configure --prefix=/usr
  make
  make install

  mv /usr/bin/tar /bin
}

0092:textutils-2.0:{
  ./configure --prefix=/usr
  make
  make install

  mv /usr/bin/cat /bin
}

0094:util-linux-2.10r:{
  patch -p0 < ../../../$PATCH/util-linux-2.10o-MCONFIG.patch

  make defines.h
  cp defines.h defines.h.orig
  grep -v NEED_tqueue defines.h.orig > defines.h

  make
  make install
}

0096:man-pages-1.34:{
  yes "n" | cp -avi man* /usr/share/man
}

0100:netkit-base-0.17:{
  ./configure --prefix=/usr
  make -e SUB=ping WARNINGS= 
  make -e SUB=ping WARNINGS= install
  cd etc.sample
  cp services protocols /etc
}

0110:net-tools-1.57:{
  cp ../../../$PATCH/net-tools-1.57-config.in ./config.in
  
  yes '' | make 
  make install

  cd /bin
  rm ypdomainname nisdomainname domainname
}

0150:glibc-2.2:{
  bzip2 -d -c ../../../$TAR/glibc-linuxthreads-2.2.tar.bz2 | tar xf -
  patch -p0 -d elf/ < ../../../$PATCH/glibc-2.2-ldconfig.patch

  cd ..
  mkdir bld
  
  cp ../../$PATCH/glibc-configparms bld/

  cd bld

  ../glibc-2.2/configure --prefix=/usr --enable-add-ons --with-headers=$PBLD/usr/include --enable-kernel=2.2.17 --disable-profile --without-gd --without-cvs 
  make 
  make install
  make localedata/install-locales
}

0220:snarf-7.0:{
  ./configure --with-guess-winsize --prefix=/usr
  make
  make install
}

0500:.:{
  option addpkg

  cp -a ../../config-files/ .
  ! find config-files -type d -name CVS -exec rm -rf {} \;
  cp -af config-files/* /

  ! rm /etc/localtime
  ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime
}

9999:.:{
  option nopkg

  umount /proc
}

0000:.:{
  option keepenv nopkg

  export PBLD=/bld
  export PSRC=ilbld

  ! umount /bld/proc 
}

0010:.:{
  mv $PBLD/usr/bin/bash $PBLD/usr/bin/bashbug $PBLD/bin
}

On Wed, 10 Jan 2001 18:28:42 -0500, Perrin Aybara said:

> The order I was following was the order put forth by the guy who posted
>  the patches originally (scott thomason)--I used his instructions before
>  with no problems.  According to said instructions, Glibc is patched in
>  the static compile but NOT GCC.  GCC is patched with both patches in the
>  post-chroot install.  Also, in LFS 2.4.3 Ncurses comes before GCC.  
>  I've checked three different messages scott thomason posted with the
>  instructions, and they're all the same: glibc is under the "---static
>  build---" section and GCC is under the "---dynamic build---" section. 
>  Is this wrong?  I specifically remember succesfully building an LFS
>  system with these instructions before, but then again that system might
>  have been from a version of Gerard's book where the dynamic install of
>  GCC fell before Ncurses.
>  
>  
>  "Thomas T. Veldhouse" wrote:
>  > 
>  > Apparently you don't know how to use them.  This is fixed by the patch to
>  > gcc-2.95.2.
>  > 
>  > Build in this order:
>  > 
>  > glibc-2.2 (patched for ldconfig)
>  > gcc-2.95.2 (patched for glibc-2.2 changes)
>  > ncurses-5.2
>  > 
>  > Tom Veldhouse
>  > veldy at veldy.net
>  > --
>  > Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
>  > and put unsubscribe in the subject header of the message
>  
>  -- 
>  Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
>  and put unsubscribe in the subject header of the message
>  
>  


-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list