From efcb3933433838b71f3a4a53ec1ac6d899aaec0b Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 3 May 2020 21:02:51 +0000 Subject: Make the new book git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/tcl.xml | 66 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 19 deletions(-) (limited to 'chapter05/tcl.xml') diff --git a/chapter05/tcl.xml b/chapter05/tcl.xml index f2265fd8d..bd17a91a8 100644 --- a/chapter05/tcl.xml +++ b/chapter05/tcl.xml @@ -3,6 +3,8 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ %general-entities; + + ]> @@ -46,8 +48,7 @@ installed to support running the test suites for GCC and Binutils and other packages. Installing three packages for testing purposes may seem excessive, but it is very reassuring, if not essential, to know that the - most important tools are working properly. Even if the test suites are not - run in this chapter (they are not mandatory), these packages are required + most important tools are working properly. These packages are required to run the test suites in . Note that the Tcl package used here is a minimal version needed @@ -56,27 +57,54 @@ Prepare Tcl for compilation: -cd unix -./configure --prefix=/tools +SRCDIR=$(pwd) +cd unix +./configure --prefix=/usr \ + --mandir=/usr/share/man \ + $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit) + + + The meaning of the configure options: + + + $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit) + + The construct $(<shell command>) + is replaced by the output of the chell command. Here this output is + empty if running on a 32 bit machine, and is + --enable-64bit if running on a 64 bit machine. + + + + + Build the package: -make +make + +sed -e "s|$SRCDIR/unix|/usr/lib|" \ + -e "s|$SRCDIR|/usr/include|" \ + -i tclConfig.sh + +sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \ + -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh - Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Tcl test suite anyway, issue the following command: +sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \ + -i pkgs/itcl&itcl-ver;/itclConfig.sh -TZ=UTC make test +unset SRCDIR - The Tcl test suite may experience failures under certain host - conditions that are not fully understood. Therefore, test suite failures - here are not surprising, and are not considered critical. The - TZ=UTC parameter sets the time zone to Coordinated - Universal Time (UTC), but only - for the duration of the test suite run. This ensures that the clock tests - are exercised correctly. Details on the TZ environment - variable are provided in . + The various sed after the make command + remove references to the build directory from various configuration files, + and replaces them with the install directory. This is not mandatory + for the remaining of LFS, but may be needed in case a package built later + uses Tcl. Install the package: @@ -85,7 +113,7 @@ Make the installed library writable so debugging symbols can be removed later: -chmod -v u+w /tools/lib/libtcl&tcl-major-version;.so +chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so Install Tcl's headers. The next package, Expect, requires them to build. @@ -94,7 +122,7 @@ Now make a necessary symbolic link: -ln -sv tclsh&tcl-major-version; /tools/bin/tclsh +ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh -- cgit v1.2.3-54-g00ecf