Regenerated.

This commit is contained in:
Ulrich Drepper 2000-01-12 11:49:54 +00:00
parent 6671a6b699
commit 51a3dab930

189
INSTALL
View File

@ -32,10 +32,12 @@ below.
Configuring and compiling GNU Libc
==================================
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
the glibc sources in `/src/gnu/glibc-2.1.0', create a directory
`/src/gnu/glibc-build' to put the object files in.
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 `/src/gnu/glibc-2.1.0', create a
directory `/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 `configure' found
at the top level of the source tree. In the scenario above, you'd type
@ -43,7 +45,7 @@ at the top level of the source tree. In the scenario above, you'd type
$ ../glibc-2.1.0/configure ARGS...
Please note that even if you're building in a separate build
directory, the compiliation needs to modify a few files in the source
directory, the compilation needs to modify a few files in the source
directory, especially some files in the manual subdirectory.
`configure' takes many options, but you can get away with knowing only
@ -51,14 +53,15 @@ two: `--prefix' and `--enable-add-ons'. The `--prefix' option tells
configure where you want glibc installed. This defaults to
`/usr/local'. The `--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
functionality is provided in add-ons, you should always specify this
option.
It may also be useful to set the CC and CFLAGS variables in the
environment when running `configure'. CC selects the C compiler that
will be used, and CFLAGS sets optimization options for the compiler.
Here are all the useful options known by `configure':
The following list describes all of the available options for
`configure':
`--prefix=DIRECTORY'
Install machine-independent data files in subdirectories of
@ -67,13 +70,13 @@ will be used, and CFLAGS sets optimization options for the compiler.
`--exec-prefix=DIRECTORY'
Install the library and other machine-dependent files in
subdirectories of `DIRECTORY'. The default is to the `--prefix'
directory if that option is given, or `/usr/local' otherwise.
directory if that option is specified, or `/usr/local' otherwise.
`--with-headers=DIRECTORY'
Look for kernel header files in DIRECTORY, not `/usr/include'.
Glibc needs information from the kernel's private header files.
It will normally look in `/usr/include' for them, but if you give
this option, it will look in DIRECTORY instead.
It will normally look in `/usr/include' for them, but if you
specify this option, it will look in DIRECTORY instead.
This option is primarily of use on a system where the headers in
`/usr/include' come from an older version of glibc. Conflicts can
@ -84,29 +87,29 @@ will be used, and CFLAGS sets optimization options for the compiler.
`--enable-add-ons[=LIST]'
Enable add-on packages in your source tree. If this option is
given 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 _do_ want used, like this:
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 *do* want used, like this:
`--enable-add-ons=crypt,linuxthreads'
`--with-binutils=DIRECTORY'
Use the binutils (assembler and linker) in `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. (`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.)
constructs in the GNU C library. In that case, `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.
`--without-fp'
Use this option if your computer lacks hardware floating-point
support and your operating system does not emulate an FPU.
`--disable-shared'
Don't build shared libraries even if we could. Not all systems
support shared libraries; you need ELF support and (currently) the
GNU linker.
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.
`--disable-profile'
Don't build libraries with profiling information. You may want to
@ -121,7 +124,7 @@ will be used, and CFLAGS sets optimization options for the compiler.
`--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.
`--enable-static-nss'
@ -132,23 +135,23 @@ will be used, and CFLAGS sets optimization options for the compiler.
`--build=BUILD-SYSTEM'
`--host=HOST-SYSTEM'
These options are for cross-compiling. If you give them both and
BUILD-SYSTEM is different from HOST-SYSTEM, `configure' will
prepare to cross-compile glibc from BUILD-SYSTEM to be used on
HOST-SYSTEM. You'll probably need the `--with-headers' option
These options are for cross-compiling. If you specify both
options and BUILD-SYSTEM is different from HOST-SYSTEM, `configure'
will prepare to cross-compile glibc from BUILD-SYSTEM to be used
on HOST-SYSTEM. You'll probably need the `--with-headers' option
too, and you may have to override CONFIGURE's selection of the
compiler and/or binutils.
If you give just `--host', configure will prepare for a native
compile but use what you say instead of guessing what your system
is. This is most useful to change the CPU submodel. For example,
if configure guesses your machine as `i586-pc-linux-gnu' but you
want to compile a library for 386es, give
If you only specify `--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 `i586-pc-linux-gnu'
but you want to compile a library for 386es, give
`--host=i386-pc-linux-gnu' or just `--host=i386-linux' and add the
appropriate compiler flags (`-mcpu=i386' will do the trick) to
CFLAGS.
If you give just `--build', configure will get confused.
If you specify just `--build', configure will get confused.
To build the library and related programs, type `make'. This will
produce a lot of output, some of which may look like errors from `make'
@ -171,17 +174,18 @@ Instead, edit the generated `Makefile' and uncomment the line
You can change the `4' to some other number as appropriate for your
system. Instead of changing the `Makefile', you could give this option
directly to `make' and call it as, e.g. `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 `Makefile' is generated which you
can change.
directly to `make' and call it as, for example, `make
PARALLELMFLAGS=-j4'. If you're building in the source directory, you
must use the latter approach since in this case no new `Makefile' is
generated for you to change.
To build and run some test programs which exercise some of the
library facilities, type `make check'. This should complete
successfully; if it doesn't, do not use the built library, and report a
bug. *Note Reporting Bugs::, for how to do that. Note that some of
the tests assume they are not being run by `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 `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. *Note Reporting Bugs::, for instructions
on reporting bugs. Note that some of the tests assume they are not
being run by `root'. We recommend you compile and test glibc as an
unprivileged user.
To format the `GNU C Library Reference Manual' for printing, type
`make dvi'. You need a working TeX installation to do this. The
@ -189,35 +193,65 @@ distribution already includes the on-line formatted version of the
manual, as Info files. You can regenerate those with `make info', but
it shouldn't be necessary.
The library has a number of special-purpose configuration parameters
which you can find in `Makeconfig'. These can be overwritten with the
file `configparms'. To change them, create a `configparms' in your
build directory and add values as appropriate for your system. The
file is included and parsed by `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 `configparms'. Set `CC' to the
cross-compiler for the target you configured the library for; it is
important to use this same `CC' value when running `configure', like
this: `CC=TARGET-gcc configure TARGET'. Set `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 `AR' and `RANLIB' to cross-compiling
versions of `ar' and `ranlib' if the native tools are not configured to
work with object files for the target you configured for.
Installing the C Library
========================
To install the library and its header files, and the Info files of
the manual, type `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
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.
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 `/usr/include' with a fresh directory before
installing it. The new `/usr/include' should contain the Linux
headers, but nothing else.
You must first build the library (`make'), optionally check it
(`make check'), switch the include directories and then install (`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, `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
`/usr/include' directory out of the way before running `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
(`-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 (`/usr/lib/gcc-lib/TARGET/VERSION/specs'), but that is a bit of a
black art.
2.1, `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 (`-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 (`/usr/lib/gcc-lib/TARGET/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 `install_root' variable on the command line for
`make install'. The value of this variable is prepended to all the
paths for installation. This is useful when setting up a chroot
environment or preparing a binary distribution.
environment or preparing a binary distribution. The directory should be
specified with an absolute file name.
Glibc 2.1 includes two daemons, `nscd' and `utmpd', which you may or
may not want to run. `nscd' caches name service lookups; it can
@ -262,20 +296,20 @@ build the GNU C library:
* GNU `make' 3.75
You need the latest version of GNU `make'. Modifying the GNU C
Library to work with other `make' programs would be so hard that we
recommend you port GNU `make' instead. *Really.* We recommend
version GNU `make' version 3.75 or 3.77. All earlier versions
have severe bugs or lack features. Version 3.76 is known to have
bugs which only show up in big projects like GNU `libc'. Version
3.76.1 seems OK but some people have reported problems.
Library to work with other `make' programs would be so difficult
that we recommend you port GNU `make' instead. *Really.* We
recommend version GNU `make' version 3.75 or 3.77. All earlier
versions have severe bugs or lack features. Version 3.76 is known
to have bugs which only show up in big projects like GNU `libc'.
Version 3.76.1 seems OK but some people have reported problems.
* 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 is the compiler we advise to use.
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 libc, but be aware that both GCC 2.7 and 2.8 have bugs in
@ -323,7 +357,6 @@ build the GNU C library:
Perl is not required, but it is used if present to test the
installation. We may decide to use it elsewhere in the future.
If you change any of the `configure.in' files you will also need
* GNU `autoconf' 2.12 or higher
@ -385,8 +418,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 <bug-glibc@gnu.org>.
Each case of `iX86' can be `i386', `i486', `i586', or `i686'. All
of those configurations produce a library that can run on this
Valid cases of `iX86' include `i386', `i486', `i586', and `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. For example if your GCC is
@ -400,7 +433,7 @@ Specific advice for Linux systems
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 `/usr/src/linux-2.2.1'. In that directory, run `make config'
and accept all the defaults. Then run `make include/linux/version.h'.
@ -430,7 +463,7 @@ installed there.
library on your system against the new library for the sake of new code,
but keep the old libraries around for old binaries to use. This is
complicated and difficult. Consult the Glibc2 HOWTO at
<http://www.imaxx.net/~thrytis/glibc> for details.
`http://www.imaxx.net/~thrytis/glibc' for details.
You cannot use `nscd' with 2.0 kernels, due to bugs in the
kernel-side thread support. `nscd' happens to hit these bugs
@ -445,10 +478,10 @@ 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 `BUGS' describes a
number of well known bugs and the bug tracking system has a WWW
interface at <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>. The
It is a good idea to verify that the problem has not already been
reported. Bugs are documented in two places: The file `BUGS' describes
a number of well known bugs and the bug tracking system has a WWW
interface at `http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl'. The
WWW interface gives you access to open and closed reports. The closed
reports normally include a patch or a hint on solving the problem.
@ -486,6 +519,6 @@ 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 <bug-glibc-manual@gnu.org>. If you refer to specific sections
when reporting on the manual, please include the section names for
easier identification.
of the manual, please include the section names for easier
identification.