r1078 - trunk
robert at linuxfromscratch.org
robert at linuxfromscratch.org
Thu Aug 9 02:34:56 PDT 2007
Date: 2007-08-09 03:34:56 -0600 (Thu, 09 Aug 2007)
New Revision: 1078
Updated all_of_gcc_during_lfs hint
--- trunk/all_of_gcc_during_lfs.txt 2007-08-09 09:34:27 UTC (rev 1077)
+++ trunk/all_of_gcc_during_lfs.txt 2007-08-09 09:34:56 UTC (rev 1078)
@@ -1,6 +1,6 @@
AUTHOR: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
LICENSE: Creative Commons Attribution-NonCommercial-ShareAlike License
@@ -9,7 +9,7 @@
DESCRIPTION: This hint will guide you through the installation of any or all
the GCC compilers while building an LFS system. These instructions target
-the 4.0.x series of GCC as there have been significant changes since the
+the 4.x.x series of GCC as there have been significant changes since the
3.x.x series. Prior to the 4.x.x series, only the Ada compiler could not be
installed during Chapter 6 of an LFS build. See my
@@ -21,17 +21,22 @@
1. The GCC tarball for whatever version of GCC called for in LFS. This will
-be a file named something similar to gcc-4.0.3.tar.bz2
+be a file named something similar to gcc-4.1.2.tar.bz2
+2. The 2005 version of the GNAT compiler found on the AdaCore site. The
+download location (https://libre.adacore.com/dynamic/download_page) requires
+that you create an account on the AdaCore site before you can download the
+package. Nothing is required other than a valid email address. Ensure you
+download the 2005 version of the GNAT compiler. The 2006 version will not work.
+The file name you need is: gnat-gpl-2005-i686-gnu-linux-gnu-libc2.3-bin.tar.gz.
(not required if your host system has an existing Ada compiler, or you don't
plan on installing the GCC Ada compiler)
-3. A GMP tarball if you plan on installing the Fortran 95 compiler. See
+3. A GMP tarball if you plan on installing the Fortran compiler. See
http://www.linuxfromscratch.org/blfs/view/svn/general/gmp.html for download
-4. An MPFR tarball if you plan on installing the Fortran 95 compiler. See
+4. An MPFR tarball if you plan on installing the Fortran compiler. See
http://www.mpfr.org/mpfr-current/ for download locations.
@@ -46,7 +51,7 @@
2. The Treelang compiler
- 3. The Fortran 95 compiler
+ 3. The Fortran compiler
@@ -71,15 +76,15 @@
easier to just build the additional compilers during LFS. So, you say to
yourself, when I get to the GCC installation in Chapter 6 of LFS, I'll just
add additional compilers to the configure script command and I'll build them
-then. This won't work for the Ada, Fortran 95 or Treelang compilers. For
+then. This won't work for the Ada, Fortran or Treelang compilers. For
these three compilers, you cannot wait until the GCC installation in Chapter
-6 to decide you want/need to install them (Fortran 95 is a slight exception
+6 to decide you want/need to install them (Fortran is a slight exception
to this). At this point of Chapter 6, you are in a chroot environment
working with whatever is installed in the /tools directory you created in
Chapter 5 and there are not adequate tools, nor any real way to add them,
to compile Ada and Treelang.
-In summary, if you need to install the Ada, Fortran 95 or Treelang compilers
+In summary, if you need to install the Ada, Fortran or Treelang compilers
during Chapter 6 of an LFS build, you'll need to do some extra work. The
Java and Objective C compilers can be installed by simply adding them to the
list of compilers in the configure script parameter, --enable-languages=...
@@ -94,32 +99,15 @@
2. THE TREELANG COMPILER:
-Note that this information about the Treelang compiler has not been tested,
-but I feel it should work. In my most recent build of GCC during LFS,
-Treelang failed to build, and I just didn't have it in me to start over. The
-fix seems so trivial, and I don't need the Treelang compiler, so I just
You probably don't need the Treelang compiler. It is only good for
developers who are developing a new compiler for GCC. However, if you wish
-to build it during a build of LFS, simply install the Flex package at the
-end of Chapter 5 of LFS. Best I could tell, Treelang failed to build for me
-because Flex wasn't available at the point where you install GCC in Chapter
+to build it during a build of LFS, you'll need to install the Bison and Flex
+packages before starting the Chapter 6 build of GCC.
-I might have been able to build Flex before GCC in Chapter 6, but it simply
-wasn't worth trying. Before GCC is installed in Chapter 6, you're still
-using the GCC built in Chapter 5, and things are somewhat wierd at this
-point. More on this in the Fortran 95 section.
+3. THE FORTRAN COMPILER:
-Anyway, install Flex at the end of Chapter 5 while building LFS and Treelang
-will probably build okay in Chapter 6. Instructions for installing Flex can
-be found in Chapter 6 of the LFS book.
-3. THE FORTRAN 95 COMPILER
Starting with version 4.x.x of GCC, there is no longer support for the
Fortran 77 series of compilers. Fortran 95 is now included with GCC. In
order to build the Fortran 95 compiler, the system must have the GMP and
@@ -140,17 +128,19 @@
-The BLFS book shows to use these two parameters passed to the configure
-script: --enable-cxx and --enable-mpbsd. This will not work at this point of
-Chapter 6. I didn't test using just the --enable-mpbsd alone, so it may or
-may not work here. For certain, you cannot use the --enable-cxx parameter as
-configure will bitch loudly about a C++ compiler not being available. Even
-though C++ was installed in Chapter 5, at this point of Chapter 6 the
-toolchain has already been readjusted. Apparently, this makes the Autotools
-look for dependencies in /usr instead of /tools. So, don't use --enable-cxx
-when building GMP (as mentioned, I also left off --enable-mpbsd) and things
-should be fine.
+In order to build the GMP C++ extension library (by passing --enable-cxx
+parameter to configure), you'll need to fake an installation of the libstdc++
+library in /usr/lib of the new LFS partition. Issue the two commands below
+before building the GMP package to provide temporary symlinks to the library
+in the /tools/lib directory:
+ln -v -s /tools/lib/libstdc++.so.6 /usr/lib
+ln -v -s /tools/lib/libstdc++.so /usr/lib
+Additionally, you'll need to install the M4 package at the end of Chapter 5
+or before the GMP installation in Chapter 6. You can use the existing LFS
+Chapter 6 instructions for installing the M4 package.
@@ -173,7 +163,7 @@
-At this point (GMP and MPFR installations complete), you can add the f95
+At this point (GMP and MPFR installations complete), you can add the fortran
language to the --enable-languages switch on GCC's configure and expect it
to successfully build Fortran 95. However, you also need to add a couple
more parameters to the configure script so that configure can find the two
@@ -195,7 +185,7 @@
4. THE ADA COMPILER:
@@ -228,22 +218,16 @@
Here's the simple installation procedure for the GNAT Ada compiler:
-1. Download the tarball:
+1. Download the tarball from the Adacore site.
+2. Unpack the tarball and change directories into the root of the source tree.
-2. Issue the following commands to unpack the tarball and change directories
-into the root of the source tree:
-tar xf gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz
3. Issue the following command to install the GNAT compiler:
make ins-all prefix=/tools/gnat
You should check and ensure that the /tools/gnat directory was created and
-populated with files. The GNAT source tree can be removed.
+populated with files. The GNAT source tree can then be removed.
7. CONFIGURING THE PATH VARIABLE:
@@ -355,7 +339,8 @@
3. After the "make install" step, issue the following command:
-chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/adainclude
+chown -v -R root:root /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/adainclude
+(modify the GCC version number in the path shown above)
Except for the changes shown above, follow the commands as outlined in the
Chapter 6 GCC instructions in LFS.
@@ -380,30 +365,37 @@
perhaps risky process of reinstalling C and C++ later on during your BLFS
* Jim Gifford for the tip about using the existing Makefile to install GNAT.
* The LFS community for creating and maintaining such a cool project.
- * Original draft
+ * Updated the Gnat download instructions
+ * Updated the requirements to install the 'treelang' language
+ * Updated the GMP installation instructions
- * Added instructions to change the ownership of the Ada interface header
- include files to root
+ * Changed the GNAT installation to use the existing Makefile, which
+ eliminates the need to install Tcsh.
- * Fixed typo
- * Modified the Chapter 5 instructions to not use forced static build
* Updated for the LFS-6.2 version, including installing the 4.0.3
compiler. Added instructions to install all the compilers, not just
the Ada compiler.
- * Changed the GNAT installation to use the existing Makefile, which
- eliminates the need to install Tcsh.
+ * Fixed typo
+ * Modified the Chapter 5 instructions to not use forced static build
+ * Added instructions to change the ownership of the Ada interface header
+ include files to root
+ * Original draft
More information about the hints