# glibc64-241028/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. "glibc##-######" conventions. Each Laclin package tree, "/glibc64/pkg" being one example, contains one or more system-library packages. Presently, the packages have names similar to "glibc64-180826", where the 2-digits part represents an architecture (32 or 64) and the 6-dig- its part represents a release number. Note: Release number as in Laclin release of the package, not release of upstream "glibc". The release number usually represents a 6-digit date in "YYMMDD" for- mat. However, this isn't an absolute rule. There is also a symlink in $PRODTREE named "glibc" that points to the "glibc##-######" package that is presently in use. For example: glibc -> glibc32-180401 These remarks don't necessarily apply to transitional distros such as those constructed during initial cross-build steps. The "cfg" file for a "glibc##-######" package always sets "defer" to "glibc32 only" (for a 32-bit distro) or to "glibc64 only" (for a 64- bit distro). #--------------------------------------------------------------------- 2. Rebuilding "glibc##-######". A particular "glibc##-######" package is never rebuilt. Instead, it's replaced with a package that has a different name. The rebuild process may, or may not, involve updating the copy of up- stream "glibc" itself that's used. Usually, "glibc" itself will not be updated. The steps involved are as follows: * Go to the "/src" tree. Locate the package resource directory for the copy of "glibc##-######" that is to be replaced. * Rename the directory to use a higher, and unique, 6-digit release number. * Execute a command similar to the following. Modify the "##-180401" part appropriately. makelac glibc##-180401 If the build fails, stop here. * Execute commands similar to the following. Modify the "##-180401" part appropriately. cd /$LACARCH/pkg ls -l glibc # Make a note of the old "glibc" link /busybox32/bin/ln -nsf glibc##-180401 glibc ls # Check to see if "ls" works Disregard warnings, if any, about "locale" not being configured. If the "ls" command produces other errors, put the old symlink back: # Use the old "##-######" string /busybox32/bin/ln -nsf glibc##-180401 glibc Otherwise, execute this command: makelocale * Do more tests to confirm that the new copy of "glibc##-######" is working. If there are problems, put the old symlink back as discussed before. If something goes wrong and you can't put the old symlink back from within the distro, boot a rescue distro and use the rescue distro to make the change. #--------------------------------------------------------------------- 3. When you're certain that the new "glibc##-######" release is work- ing correctly, take these additional steps: * Replace "/$LACARCH/old-headers" (substitute the appropriate distro tree for "/$LACARCH"): cd /$LACARCH chattr -i . rm -fr old-headers cp -a /$LACARCH/pkg/glibc/include old-headers chattr +i . * Delete the old "glibc##-######" package tree (substitute the appro- priate directory path): rm -fr /$LACARCH/pkg/glibc##-180401 #--------------------------------------------------------------------- 4. In this package's "configure" block, "--libexecdir" shouldn't spe- cify the package's "bin" or "sbin" directories. If this is done, "getconf" and/or other programs won't be built correctly. #--------------------------------------------------------------------- 5. This package disables "nscd" support. This is necessary to avoid "build" problems. #--------------------------------------------------------------------- 6. This package assumes that "/usr/src/linux" contains the source code, including header files, for the Linux kernel that is being used. If this isn't the case, or if "rsync" hasn't been built yet, obsolete kernel header files may be stored in the "glibc##-######" directory tree. This isn't necessarily a significant problem, but it may lead to issues under some conditions. #--------------------------------------------------------------------- 7. Rebuilds done in Summer 2018: 180624 180628 180704 180720 180815 180826 #--------------------------------------------------------------------- [buildtimes] 00.11 hours (or 006.80 minutes) - 2023 dedi Xeon E3-1200 v3 4x2 32GB RAM 00.14 hours (or 008.55 minutes) - ThinkPad L390 24GB RAM i5 4x2 00.16 hours (or 009.42 minutes) - ThinkPad W530 i7 4x2 32GB RAM 00.17 hours (or 010.38 minutes) - ThinkPad X1 Carbon 6G i7 4x2 16GB RAM 00.34 hours (or 020.58 minutes) - HP EliteBook 8560w 32GB RAM 00.48 hours (or 029.03 minutes) - Dell Inspiron 6400 2.0 GHz Intel Duo 7200 2GB RAM 02.85 hours (or 170.78 minutes) - Compaq 1.7 GHz Intel Pentium 4 512MB RAM #--------------------------------------------------------------------- [settings] configure = none defer = glibc64 license = See "license*.txt" in installed tree licfile = LICENSES modsys = no multi = yes nosyslinks = yes # Disable automated integration nowerror = yes purge = yes tmpsize = 250M unpack = relaxed #--------------------------------------------------------------------- # Note: This package is a special case. Technically, it depends on # several other packages. For example, "gcc731" and "chrpath" or com- # parable packages must be present. # However, "bootstrap" versions of the packages (i.e., versions from # another distro) may be used. Presently, the following "depends" # block should list "none". [depends] none # rsync:forward #--------------------------------------------------------------------- [build] date echo Starting glibc configuration procedure SRCDIR=`pwd` #--------------------------------------------------------------------- # Fix "limits.h" (this is a bit of a GNU mess). pushd include ln -nsf limits.h limits_glibc.h ln -nsf limits.h limits_syslib.h LH=`find $PRODTREE/gcc/ -name limits.h | grep install-tools` if [ "@$LH" == "@" ]; then echo Error: gcc limits.h-1 exit 1 fi ln -nsf $LH limits_gcc.h sed -e 's/include_next.*/include /' \ -i limits.h popd #--------------------------------------------------------------------- export LANGUAGE=C # "locale"-related setting export LC_ALL=C # Ditto unset LANG # To be on the safe side unset LC_CTYPE # Ditto export LACFINDLDSO=no # Distro-dependent code mkdir -p $PKGDIR_PROD/{bin,doc,etc,include} mkdir -p $PKGDIR_PROD/{info,lib,sbin,share} if [ 1 == 1 ]; then sed -e "s|cross_compiling=maybe|cross_compiling=yes|g" \ -e "s|cross_compiling=no|cross_compiling=yes|g" \ -i ../glibc-2.*/configure mkdir -p nscd touch nscd/{nscd,nscd-client,nscd_proto}.h fi NSCDOPT="--disable-build-nscd --disable-nscd" #--------------------------------------------------------------------- cd .. rm -fr obj mkdir obj cd obj mkdir -p $PKGDIR_PROD/etc # LEXECDIR specifies the "--libexecdir" setting to be used. This # shouldn't be the "glibc" "bin" or "sbin" directory. If those direc- # tories are used for "--libexecdir", "getconf" and/or other programs # won't be built correctly. LEXECDIR=$PKGDIR_PROD/libexec mkdir -p $LEXECDIR #--------------------------------------------------------------------- # You may need to disable "mathvec" to get "glibc" bootstrapped on # some platforms. # Note: "gmic" requires "mathvec". As of mid-2018, we weren't aware of # other supported packages that did. DISABLE_MATHVEC=no if [ "x$DISABLE_MATHVEC" == "xyes"; then MVECOPT="--disable-mathvec" sed -e 's/\(build-mathvec\) *= *[$]build_mathvec/\1=no/' \ -i ../glibc-2.*/configure else MVECOPT= fi #--------------------------------------------------------------------- OLDHEADERS=$LACSYSTREE/old-headers bash ../glibc-2.*/configure \ --prefix=$PKGDIR_PROD \ --build=$LACARCHBUILD \ --host=$LACARCHHOST \ $NSCDOPT $MVECOPT \ \ --disable-profile \ --disable-werror \ --enable-add-ons \ --enable-kernel=3.2 \ --datadir=$PKGDIR_PROD/share \ --sysconfdir=$PKGDIR_PROD/etc \ --with-headers=$OLDHEADERS \ --without-gd \ --without-selinux \ --libexecdir=$LEXECDIR \ libc_cv_slibdir=$PKGDIR_PROD/lib sed -e "s|^others.*+= zic-host|others += |" \ -i $SRCDIR/timezone/Makefile #--------------------------------------------------------------------- date echo Starting glibc \"make\" step export LANGUAGE=C # "locale"-related setting export LC_ALL=C # Ditto unset LANG # To be on the safe side unset LC_CTYPE # Ditto cd ../obj smpmake || smpmake || make #--------------------------------------------------------------------- date echo Starting glibc \"make install\" step touch timezone/zic-host chmod 755 timezone/zic-host make install #--------------------------------------------------------------------- # Need to do at least some of this again. pushd $PKGDIR_PROD/include ln -nsf limits.h limits_glibc.h ln -nsf limits.h limits_syslib.h LH=`find $PRODTREE/gcc/ -name limits.h | grep install-tools` if [ "@$LH" == "@" ]; then echo Error: gcc limits.h-2 exit 1 fi ln -nsf $LH limits_gcc.h sed -e 's/include_next.*/include /' \ -i limits.h popd #--------------------------------------------------------------------- [postbuild] echo Postbuild stage XDIR=`pwd` pushd $PKGDIR_PROD/lib ln -nsf ld-2.*.so ld-linux.so.2 popd cd $PKGDIR_PROD rm -fr share/info strip -g *lib/*.{a,o,so} 2> /dev/null || true strip *bin/* 2> /dev/null || true echo "$PRODTREE/xorg/lib" >> $PKGDIR_PROD/etc/ld.so.conf echo "$PRODTREE/foreign/lib" >> $PKGDIR_PROD/etc/ld.so.conf $PKGDIR_PROD/sbin/ldconfig cp -p $PKGDIR_SPECIAL/nsswitch.conf $PKGDIR_PROD/etc/ #--------------------------------------------------------------------- INCDIR=$PKGDIR_PROD/include mkdir -p $INCDIR OK=true NN=`which rsync 2>&1 | wc -l` if [ "@$NN" == "@0" ]; then OK=false fi if [ \! -d /usr/src/linux ]; then OK=false fi if [ "@$OK" == "@true" ]; then pushd /usr/src/linux make headers_install ARCH=i386 INSTALL_HDR_PATH=$PKGDIR_PROD popd else echo Warning: Not able to install Linux header files from source echo Using possibly obsolete copies instead cp -a $PKGDIR_SPECIAL/kernel-headers/* $INCDIR/ fi #--------------------------------------------------------------------- # scsi/sg.h is needed by hdparm # scsi/scsi.h is needed by gccgo # scsi/scsi_ioctl.h is needed by vlc # xlocale.h is needed by perl pushd $INCDIR cp -a $PKGDIR_SPECIAL/moreinc/* . rm -f `find . -type f -name .install` rm -f `find . -type f -name ..install.cmd` popd #--------------------------------------------------------------------- mkdir -p $PKGDIR_PROD/lib cd $PKGDIR_PROD/lib ln -nsf ../share/locale . cd $XDIR P=$PKGDIR_PROD/share/i18n rm -fr $P mkdir -p $P cd localedata cp -rp charmaps locales $P/ export I18NPATH=$P #--------------------------------------------------------------------- cd $XDIR mkdir tmptz cd tmptz tar zxvf $PKGDIR_SPECIAL/tzdata2017b.tar.gz P=$PKGDIR_PROD/share/zoneinfo rm -fr $P mkdir -p $P/{posix,right} for tz in \ etcetera southamerica northamerica \ europe africa antarctica \ asia australasia backward pacificnew \ solar87 solar88 solar89 systemv do if [ -f $tz ]; then zic -L /dev/null -d $P -y "sh yearistype.sh" $tz zic -L /dev/null -d $P/posix -y "sh yearistype.sh" $tz zic -L leapseconds -d $P/right -y "sh yearistype.sh" $tz fi done cp -p *.tab $P zic -d $P -p America/Los_Angeles rm -fr $PKGDIR_PROD/etc/localtime cp -p $P/America/Los_Angeles $PKGDIR_PROD/etc/localtime ln -nsf $PKGDIR_PROD/bin/ldd $LACSYSTREE/bin/ ln -nsf $PKGDIR_PROD/bin/ldd $LACSYSTREE/xbin/ ln -nsf $PKGDIR_PROD/bin/sln $LACSYSTREE/bin/ ln -nsf $PKGDIR_PROD/bin/sln $LACSYSTREE/xbin/ ln -nsf $PKGDIR_PROD/bin/ldconfig $LACSYSTREE/bin/ ln -nsf $PKGDIR_PROD/bin/ldconfig $LACSYSTREE/xbin/ ln -nsf $PKGDIR_PROD/lib/*crt*.o $LACSYSTREE/lib/ #--------------------------------------------------------------------- cd $PKGDIR_PROD/include ln -nsf . glibc #--------------------------------------------------------------------- cd $PKGDIR_PROD/lib/ rm -f libgcc_s.so* cp -a $PRODTREE/gcc/lib/libgcc_s.so* . || true rm -f libstdc++.so* cp -a $PRODTREE/gcc/lib/libstdc++.so* . || true #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = http://www.gnu.org/software/libc/ url_lfs = http://www.linuxfromscratch.org/lfs/view/stable/\ chapter05/glibc.html url_tarball = http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz #--------------------------------------------------------------------- [history] 170501 Updated from 2.22 to 2.23 180311 Updated to 2.27 180826 Multiple rebuilds were done from 2018 to 2019 210126 Updated to 2.28 210612 Modified to fix a "lechromium" FTBFS