]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update from 2.2 branch.
authorUlrich Drepper <drepper@redhat.com>
Wed, 12 Jan 2000 11:48:23 +0000 (11:48 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 12 Jan 2000 11:48:23 +0000 (11:48 +0000)
manual/install.texi

index 940ac5eeb2e57cab8b435a0c1fcee72a0f27f5f8..03abd696bdca4b60fec6b61af34de53107bf4584 100644 (file)
@@ -49,10 +49,12 @@ GNU Make, and possibly others.  @xref{Tools for Compilation}, below.
 @cindex configuring
 @cindex compiling
 
-GNU Libc can be compiled in the source directory but we'd advise to
-build in a separate build directory.  For example, if you have unpacked
+GNU libc can be compiled in the source directory, but we strongly advise to
+build it in a separate build directory.  For example, if you have unpacked
 the glibc sources in @file{/src/gnu/glibc-2.1.0}, create a directory
-@file{/src/gnu/glibc-build} to put the object files in.
+@file{/src/gnu/glibc-build} to put the object files in.  This allows to
+remove the whole build directory in case an error occurs which is the
+safest way to get a clean way and should always be done.
 
 From your object directory, run the shell script @file{configure} found
 at the top level of the source tree.  In the scenario above, you'd type
@@ -62,7 +64,7 @@ $ ../glibc-2.1.0/configure @var{args...}
 @end smallexample
 
 Please note that even if you're building in a separate build directory,
-the compiliation needs to modify a few files in the source
+the compilation needs to modify a few files in the source
 directory, especially some files in the manual subdirectory.
 
 @noindent
@@ -72,14 +74,14 @@ only two: @samp{--prefix} and @samp{--enable-add-ons}.  The
 This defaults to @file{/usr/local}.  The @samp{--enable-add-ons} option
 tells configure to use all the add-on bundles it finds in the source
 directory.  Since important functionality is provided in add-ons, you
-should always give this option.
+should always specify this option.
 
 It may also be useful to set the @var{CC} and @var{CFLAGS} variables in
 the environment when running @code{configure}.  @var{CC} selects the C
 compiler that will be used, and @var{CFLAGS} sets optimization options
 for the compiler.
 
-Here are all the useful options known by @code{configure}:
+The following list describes all of the available options for @code{configure}:
 
 @table @samp
 @item --prefix=@var{directory}
@@ -89,13 +91,13 @@ Install machine-independent data files in subdirectories of
 @item --exec-prefix=@var{directory}
 Install the library and other machine-dependent files in subdirectories
 of @file{@var{directory}}.  The default is to the @samp{--prefix}
-directory if that option is given, or @file{/usr/local} otherwise.
+directory if that option is specified, or @file{/usr/local} otherwise.
 
 @item --with-headers=@var{directory}
 Look for kernel header files in @var{directory}, not
 @file{/usr/include}.  Glibc needs information from the kernel's private
 header files.  It will normally look in @file{/usr/include} for them,
-but if you give this option, it will look in @var{DIRECTORY} instead.
+but if you specify this option, it will look in @var{DIRECTORY} instead.
 
 This option is primarily of use on a system where the headers in
 @file{/usr/include} come from an older version of glibc.  Conflicts can
@@ -105,7 +107,7 @@ compile glibc with a newer set of kernel headers than the ones found in
 @file{/usr/include}.
 
 @item --enable-add-ons[=@var{list}]
-Enable add-on packages in your source tree.  If this option is given
+Enable add-on packages in your source tree.  If this option is specified
 with no list, it enables all the add-on packages it finds.  If you do
 not wish to use some add-on package that you have present in your source
 tree, give this option a list of the add-ons that you @emph{do} want
@@ -115,10 +117,10 @@ used, like this: @samp{--enable-add-ons=crypt,linuxthreads}
 Use the binutils (assembler and linker) in @file{@var{directory}}, not
 the ones the C compiler would default to.  You could use this option if
 the default binutils on your system cannot deal with all the constructs
-in the GNU C library.  (@code{configure} will detect the problem and
-suppress these constructs, so the library will still be usable, but
-functionality may be lost---for example, you can not build a shared libc
-with old binutils.)
+in the GNU C library.  In that case, @code{configure} will detect the problem and
+suppress these constructs, so that the library will still be usable, but
+functionality may be lost---for example, you can't build a shared libc
+with old binutils.
 
 @item --without-fp
 Use this option if your computer lacks hardware floating-point support
@@ -130,7 +132,7 @@ and your operating system does not emulate an FPU.
 @c days, but we recommend you build them in case you need them.
 
 @item --disable-shared
-Don't build shared libraries even if we could.  Not all systems support
+Don't build shared libraries even if it is possible.  Not all systems support
 shared libraries; you need ELF support and (currently) the GNU linker.
 
 @item --disable-profile
@@ -146,7 +148,7 @@ you won't be able to trace bugs through the C library.
 
 @item --disable-versioning
 Don't compile the shared libraries with symbol version information.
-Doing this will make the library that's built incompatible with old
+Doing this will make the resulting library incompatible with old
 binaries, so it's not recommended.
 
 @item --enable-static-nss
@@ -157,22 +159,22 @@ reconfigured to use a different name database.
 
 @item --build=@var{build-system}
 @itemx --host=@var{host-system}
-These options are for cross-compiling.  If you give them both and
+These options are for cross-compiling.  If you specify both options and
 @var{build-system} is different from @var{host-system}, @code{configure}
 will prepare to cross-compile glibc from @var{build-system} to be used
 on @var{host-system}.  You'll probably need the @samp{--with-headers}
 option too, and you may have to override @var{configure}'s selection of
 the compiler and/or binutils.
 
-If you give just @samp{--host}, configure will prepare for a native
-compile but use what you say instead of guessing what your system is.
+If you only specify @samp{--host}, configure will prepare for a native
+compile but use what you specify instead of guessing what your system is.
 This is most useful to change the CPU submodel.  For example, if
 configure guesses your machine as @code{i586-pc-linux-gnu} but you want
 to compile a library for 386es, give @samp{--host=i386-pc-linux-gnu} or
 just @samp{--host=i386-linux} and add the appropriate compiler flags
 (@samp{-mcpu=i386} will do the trick) to @var{CFLAGS}.
 
-If you give just @samp{--build}, configure will get confused.
+If you specify just @samp{--build}, configure will get confused.
 @end table
 
 To build the library and related programs, type @code{make}.  This will
@@ -199,17 +201,18 @@ Instead, edit the generated @file{Makefile} and uncomment the line
 @noindent
 You can change the @samp{4} to some other number as appropriate for
 your system.  Instead of changing the @file{Makefile}, you could give
-this option directly to @code{make} and call it as, e.g.
+this option directly to @code{make} and call it as, for example,
 @code{make PARALLELMFLAGS=-j4}.  If you're building in the source
-directory, you've got to use the latter approach since in this case no
-new @file{Makefile} is generated which you can change.
+directory, you must use the latter approach since in this case no
+new @file{Makefile} is generated for you to change.
 
-To build and run some test programs which exercise some of the library
-facilities, type @code{make check}.  This should complete successfully;
-if it doesn't, do not use the built library, and report a bug.
-@xref{Reporting Bugs}, for how to do that.  Note that some of the tests
-assume they are not being run by @code{root}.  We recommend you compile
-and test glibc as an unprivileged user.
+To build and run test programs which exercise some of the library
+facilities, type @code{make check}.  If it does not complete
+successfully, do not use the built library, and report a bug after
+verifying that the problem is not already known.  @xref{Reporting Bugs},
+for instructions on reporting bugs.  Note that some of the tests assume
+they are not being run by @code{root}.  We recommend you compile and
+test glibc as an unprivileged user.
 
 To format the @cite{GNU C Library Reference Manual} for printing, type
 @w{@code{make dvi}}.  You need a working @TeX{} installation to do this.
@@ -217,30 +220,60 @@ The distribution already includes the on-line formatted version of the
 manual, as Info files.  You can regenerate those with @w{@code{make
 info}}, but it shouldn't be necessary.
 
+The library has a number of special-purpose configuration parameters
+which you can find in @file{Makeconfig}.  These can be overwritten with
+the file @file{configparms}.  To change them, create a
+@file{configparms} in your build directory and add values as appropriate
+for your system.  The file is included and parsed by @code{make} and has
+to follow the conventions for makefiles.
+
+It is easy to configure the GNU C library for cross-compilation by
+setting a few variables in @file{configparms}.  Set @code{CC} to the
+cross-compiler for the target you configured the library for; it is
+important to use this same @code{CC} value when running
+@code{configure}, like this: @samp{CC=@var{target}-gcc configure
+@var{target}}.  Set @code{BUILD_CC} to the compiler to use for for
+programs run on the build system as part of compiling the library.  You
+may need to set @code{AR} and @code{RANLIB} to cross-compiling versions
+of @code{ar} and @code{ranlib} if the native tools are not configured to
+work with object files for the target you configured for.
+
+
 @node Running make install
 @appendixsec Installing the C Library
 @cindex installing
 
 To install the library and its header files, and the Info files of the
 manual, type @code{make install}.  This will build things if necessary,
-before installing them.  Don't rely on that; compile everything first.
-If you are installing glibc as your primary C library, we recommend you
+before installing them.  However, you should still compile everything first.
+If you are installing glibc as your primary C library, we recommend that you
 shut the system down to single-user mode first, and reboot afterward.
 This minimizes the risk of breaking things when the library changes out
 from underneath.
 
+If you're upgrading from Linux libc5 or some other C library, you need to
+replace the @file{/usr/include} with a fresh directory before installing it.
+The new @file{/usr/include} should contain the Linux headers, but nothing else.  
+
+You must first build the library (@samp{make}), optionally check it
+(@samp{make check}), switch the include directories and then install
+(@samp{make install}).  The steps must be done in this order.  Not moving
+the directory before install will result in an unusable mixture of header
+files from both libraries, but configuring, building, and checking the
+library requires the ability to compile and run programs against the old
+library. 
+
 If you are upgrading from a previous installation of glibc 2.0 or 2.1,
-@samp{make install} will do the entire job.  If you're upgrading from
-Linux libc5 or some other C library, you need to rename the old
-@file{/usr/include} directory out of the way before running @samp{make
-install}, or you will end up with a mixture of header files from both
-libraries, and you won't be able to compile anything.  You may also need
-to reconfigure GCC to work with the new library.  The easiest way to do
-that is to figure out the compiler switches to make it work again
-(@samp{-Wl,--dynamic-linker=/lib/ld-linux.so.2} should work on Linux
-systems) and use them to recompile gcc.  You can also edit the specs
-file (@file{/usr/lib/gcc-lib/@var{TARGET}/@var{VERSION}/specs}), but
-that is a bit of a black art.
+@samp{make install} will do the entire job.  You do not need to remove 
+the old includes -- if you want to do so anyway you must then follow the 
+order given above.
+
+You may also need to reconfigure GCC to work with the new library.  The
+easiest way to do that is to figure out the compiler switches to make it
+work again (@samp{-Wl,--dynamic-linker=/lib/ld-linux.so.2} should work on
+Linux systems) and use them to recompile gcc.  You can also edit the specs
+file (@file{/usr/lib/gcc-lib/@var{TARGET}/@var{VERSION}/specs}), but that
+is a bit of a black art. 
 
 You can install glibc somewhere other than where you configured it to go
 by setting the @code{install_root} variable on the command line for
@@ -296,7 +329,7 @@ build the GNU C library:
 GNU @code{make} 3.75
 
 You need the latest version of GNU @code{make}.  Modifying the GNU C
-Library to work with other @code{make} programs would be so hard that we
+Library to work with other @code{make} programs would be so difficult that we
 recommend you port GNU @code{make} instead.  @strong{Really.}  We
 recommend version GNU @code{make} version 3.75 or 3.77.  All earlier
 versions have severe bugs or lack features. Version 3.76 is known to
@@ -304,12 +337,12 @@ have bugs which only show up in big projects like GNU @code{libc}.
 Version 3.76.1 seems OK but some people have reported problems.
 
 @item
-EGCS 1.1.1, 1.1 or 1.0.3, or GCC 2.8.1, 2.95, 2.95.1
+EGCS 1.1.1, 1.1 or 1.0.3, or GCC 2.8.1, 2.95 or newer
 
 The GNU C library can only be compiled with the GNU C compiler family.
 As of the 2.1 release, EGCS 1.0.3 or higher is required.  GCC 2.8.1 can
 also be used (but see the FAQ for reasons why you might not want to).
-Earlier versions simply are too buggy.  As of this writing, GCC 2.95.1
+Earlier versions simply are too buggy.  As of this writing, GCC 2.95.2
 is the compiler we advise to use.
 
 You can use whatever compiler you like to compile programs that use GNU
@@ -436,8 +469,8 @@ they definitely don't work anymore.  Porting the library is not hard.
 If you are interested in doing a port, please contact the glibc
 maintainers by sending electronic mail to @email{bug-glibc@@gnu.org}.
 
-Each case of @samp{i@var{x}86} can be @samp{i386}, @samp{i486},
-@samp{i586}, or @samp{i686}.  All of those configurations produce a
+Valid cases of @samp{i@var{x}86} include @samp{i386}, @samp{i486},
+@samp{i586}, and @samp{i686}.  All of those configurations produce a
 library that can run on this processor and newer processors.  The GCC
 compiler by default generates code that's optimized for the machine it's
 configured for and will use the instructions available on that machine.
@@ -454,7 +487,7 @@ switches via @var{CFLAGS}.
 
 If you are installing GNU libc on a Linux system, you need to have
 the header files from a 2.2 kernel around for reference.  You do not
-need to use the 2.2 kernel, just have its headers where glibc can get
+need to use the 2.2 kernel, just have its headers where glibc can access
 at them.  The easiest way to do this is to unpack it in a directory
 such as @file{/usr/src/linux-2.2.1}.  In that directory, run
 @samp{make config} and accept all the defaults.  Then run @samp{make
@@ -501,8 +534,8 @@ errors and omissions in this manual.  If you report them, they will get
 fixed.  If you don't, no one will ever know about them and they will
 remain unfixed for all eternity, if not longer.
 
-It is a good idea to check first that the problem was not reported
-before.  Bugs are documented in two places: The file @file{BUGS}
+It is a good idea to verify that the problem has not already been
+reported.  Bugs are documented in two places: The file @file{BUGS}
 describes a number of well known bugs and the bug tracking system has a
 WWW interface at
 @url{http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl}.  The WWW
@@ -543,5 +576,5 @@ function's behavior disagrees with the manual, then either the library
 or the manual has a bug, so report the disagreement.  If you find any
 errors or omissions in this manual, please report them to the Internet
 address @email{bug-glibc-manual@@gnu.org}.  If you refer to specific
-sections when reporting on the manual, please include the section names
-for easier identification.
+sections of the manual, please include the section names for easier
+identification.