Estimated build time: 14.71 SBU Estimated required disk space: 369 MB |
Install Glibc by running the following commands:
patch -Np1 -i ../glibc-2.2.5-2.patch && touch /etc/ld.so.conf && mkdir ../glibc-build && cd ../glibc-build && ../glibc-2.2.5/configure --prefix=/usr --disable-profile \ ����--enable-add-ons --libexecdir=/usr/bin && echo "cross-compiling = no" > configparms && make && make install && make localedata/install-locales && exec /static/bin/bash --login |
During the configure stage you will see the following warning:
configure: warning: *** These auxiliary programs are missing or too old: msgfmt *** some features will be disabled. *** Check the INSTALL file for required versions.
The missing msgfmt (from the gettext package which we will install later in this chapter) won't cause any problems. msgfmt is used to generate the binary translation files that are used to make your system talk in a different language. Because these translation files have already been generated for you, there is no need for msgfmt. You'd only need msgfmt if you change the translation source files (the *.po files in the po subdirectory) which would require you to re-generate the binary files.
The patch also contains a few bug fixes and security fixes. In particular it contains the "errlist", "dns resolver", "xdr_array", "calloc", "thread exit", "udivdi3", "math test", "restrict_arr" and "divbyzero" fixes which are documented at http://www.zipworld.com.au/~gschafer/lfs-tweaks.html.
touch /etc/ld.so.conf: One of the final steps of the Glibc installation is running ldconfig to update the dynamic loader cache. If this file doesn't exist, the installation will abort with an error that it can't read the file, so we simply create an empty file (the empty file will have Glibc default to using /lib and /usr/lib which is fine).
--disable-profile: This disables the building of libraries with profiling information. This command may be omitted if you plan to do profiling.
--enable-add-ons: This enables the add-on that we install with Glibc, linuxthreads
--libexecdir=/usr/bin: This will cause the pt_chown program to be installed in the /usr/bin directory.
echo "cross-compiling = no" > configparms: We do this because we are only building for our own system. Cross-compiling is used, for instance, to build a package for an Apple Power PC on an Intel system. The reason Glibc thinks we're cross-compiling is that it can't compile a test program to determine this, so it automatically defaults to a cross-compiler. Compiling the test program fails because Glibc hasn't been installed yet.
exec /static/bin/bash --login: This command will start a new bash shell which will replace the current shell. This is done to get rid of the "I have no name!" message in the command prompt, which was caused by bash's inability to resolve a user ID to a user name (which in turn was caused by the absence of Glibc).
Last checked against version 2.2.5.
catchsegv can be used to create a stack trace when a program terminates with a segmentation fault.
getconf displays the system configuration values for filesystem specific variables.
glibcbug creates a bug report about glibc and and mails it to the bug email address.
mtrace prints the multicast path from a source to a receiver (an IP trace query).
nscd_nischeck checks whether or not secure mode is necessary for NIS+ lookup.
libSegFault is a segmentation fault signal handler. It tries to catch segfaults.
libbsd-compat provides the portability needed in order to run certain programs in Linux.
libmemusage is used by memusage to help collect information about the memory usage of a program.
Code used by the kernel to track CPU time spent in functions, source code lines, and instructions.