]>
Commit | Line | Data |
---|---|---|
3c20b9b6 UD |
1 | @c This is for making the `INSTALL' file for the distribution. |
2 | @c Makeinfo ignores it when processing the file from the include. | |
3 | @setfilename INSTALL | |
4 | ||
5 | @node Installation, Maintenance, Library Summary, Top | |
7a68c94a | 6 | @c %MENU% How to install the GNU C library |
3c20b9b6 UD |
7 | @appendix Installing the GNU C Library |
8 | ||
a4d62195 | 9 | Before you do anything else, you should read the file @file{FAQ} located |
3c20b9b6 UD |
10 | at the top level of the source tree. This file answers common questions |
11 | and describes problems you may experience with compilation and | |
12 | installation. It is updated more frequently than this manual. | |
13 | ||
1792d4db | 14 | Features can be added to GNU Libc via @dfn{add-on} bundles. These are |
a4d62195 | 15 | separate tar files, which you unpack into the top level of the source |
1792d4db | 16 | tree. Then you give @code{configure} the @samp{--enable-add-ons} option |
b3af1a24 | 17 | to activate them, and they will be compiled into the library. |
00c1176b UD |
18 | |
19 | You will need recent versions of several GNU tools: definitely GCC and | |
fe959e1e | 20 | GNU Make, and possibly others. @xref{Tools for Compilation}, below. |
00c1176b UD |
21 | |
22 | @menu | |
23 | * Configuring and compiling:: How to compile and test GNU libc. | |
a4d62195 UD |
24 | * Running make install:: How to install it once you've got it |
25 | compiled. | |
00c1176b | 26 | * Tools for Compilation:: You'll need these first. |
90d1d40b | 27 | * Linux:: Specific advice for GNU/Linux systems. |
00c1176b UD |
28 | * Reporting Bugs:: So they'll get fixed. |
29 | @end menu | |
30 | ||
31 | @node Configuring and compiling | |
32 | @appendixsec Configuring and compiling GNU Libc | |
1792d4db UD |
33 | @cindex configuring |
34 | @cindex compiling | |
00c1176b | 35 | |
3858bf28 RM |
36 | GNU libc cannot be compiled in the source directory. You must build |
37 | it in a separate build directory. For example, if you have unpacked | |
38 | the glibc sources in @file{/src/gnu/glibc-2.4}, create a directory | |
e8b1163e | 39 | @file{/src/gnu/glibc-build} to put the object files in. This allows |
3858bf28 RM |
40 | removing the whole build directory in case an error occurs, which is |
41 | the safest way to get a fresh start and should always be done. | |
00c1176b | 42 | |
a4d62195 | 43 | From your object directory, run the shell script @file{configure} located |
00c1176b UD |
44 | at the top level of the source tree. In the scenario above, you'd type |
45 | ||
46 | @smallexample | |
3858bf28 | 47 | $ ../glibc-2.4/configure @var{args@dots{}} |
00c1176b UD |
48 | @end smallexample |
49 | ||
3858bf28 RM |
50 | Please note that even though you're building in a separate build |
51 | directory, the compilation needs to modify a few files in the source | |
f76d7052 UD |
52 | directory, especially some files in the manual subdirectory. |
53 | ||
00c1176b | 54 | @noindent |
3858bf28 RM |
55 | @code{configure} takes many options, but the only one that is usually |
56 | mandatory is @samp{--prefix}. This option tells @code{configure} | |
57 | where you want glibc installed. This defaults to @file{/usr/local}, | |
58 | but the normal setting to install as the standard system library is | |
59 | @samp{--prefix=/usr} for GNU/Linux systems and @samp{--prefix=} (an | |
60 | empty prefix) for GNU/Hurd systems. | |
00c1176b UD |
61 | |
62 | It may also be useful to set the @var{CC} and @var{CFLAGS} variables in | |
63 | the environment when running @code{configure}. @var{CC} selects the C | |
64 | compiler that will be used, and @var{CFLAGS} sets optimization options | |
65 | for the compiler. | |
66 | ||
a4d62195 UD |
67 | The following list describes all of the available options for |
68 | @code{configure}: | |
3c20b9b6 UD |
69 | |
70 | @table @samp | |
00c1176b UD |
71 | @item --prefix=@var{directory} |
72 | Install machine-independent data files in subdirectories of | |
73 | @file{@var{directory}}. The default is to install in @file{/usr/local}. | |
74 | ||
75 | @item --exec-prefix=@var{directory} | |
76 | Install the library and other machine-dependent files in subdirectories | |
77 | of @file{@var{directory}}. The default is to the @samp{--prefix} | |
04b9968b | 78 | directory if that option is specified, or @file{/usr/local} otherwise. |
00c1176b UD |
79 | |
80 | @item --with-headers=@var{directory} | |
81 | Look for kernel header files in @var{directory}, not | |
82 | @file{/usr/include}. Glibc needs information from the kernel's private | |
a4d62195 | 83 | header files. Glibc will normally look in @file{/usr/include} for them, |
04b9968b | 84 | but if you specify this option, it will look in @var{DIRECTORY} instead. |
00c1176b UD |
85 | |
86 | This option is primarily of use on a system where the headers in | |
87 | @file{/usr/include} come from an older version of glibc. Conflicts can | |
88 | occasionally happen in this case. Note that Linux libc5 qualifies as an | |
89 | older version of glibc. You can also use this option if you want to | |
90 | compile glibc with a newer set of kernel headers than the ones found in | |
91 | @file{/usr/include}. | |
92 | ||
93 | @item --enable-add-ons[=@var{list}] | |
3858bf28 RM |
94 | Specify add-on packages to include in the build. If this option is |
95 | specified with no list, it enables all the add-on packages it finds in | |
96 | the main source directory; this is the default behavior. You may | |
97 | specify an explicit list of add-ons to use in @var{list}, separated by | |
98 | spaces or commas (if you use spaces, remember to quote them from the | |
99 | shell). Each add-on in @var{list} can be an absolute directory name | |
100 | or can be a directory name relative to the main source directory, or | |
101 | relative to the build directory (that is, the current working directory). | |
102 | For example, @samp{--enable-add-ons=nptl,../glibc-libidn-2.4}. | |
00c1176b | 103 | |
d2830ba4 | 104 | @item --enable-kernel=@var{version} |
90d1d40b | 105 | This option is currently only useful on GNU/Linux systems. The |
d2830ba4 UD |
106 | @var{version} parameter should have the form X.Y.Z and describes the |
107 | smallest version of the Linux kernel the generated library is expected | |
108 | to support. The higher the @var{version} number is, the less | |
109 | compatibility code is added, and the faster the code gets. | |
110 | ||
3c20b9b6 UD |
111 | @item --with-binutils=@var{directory} |
112 | Use the binutils (assembler and linker) in @file{@var{directory}}, not | |
a4d62195 | 113 | the ones the C compiler would default to. You can use this option if |
3c20b9b6 | 114 | the default binutils on your system cannot deal with all the constructs |
a4d62195 UD |
115 | in the GNU C library. In that case, @code{configure} will detect the |
116 | problem and suppress these constructs, so that the library will still be | |
117 | usable, but functionality may be lost---for example, you can't build a | |
118 | shared libc with old binutils. | |
3c20b9b6 | 119 | |
3c20b9b6 | 120 | @item --without-fp |
3c20b9b6 UD |
121 | Use this option if your computer lacks hardware floating-point support |
122 | and your operating system does not emulate an FPU. | |
123 | ||
b5ca0fb0 UD |
124 | @c disable static doesn't work currently |
125 | @c @item --disable-static | |
a4d62195 UD |
126 | @c Don't build static libraries. Static libraries aren't that useful |
127 | these | |
b5ca0fb0 | 128 | @c days, but we recommend you build them in case you need them. |
3c20b9b6 | 129 | |
00c1176b | 130 | @item --disable-shared |
a4d62195 UD |
131 | Don't build shared libraries even if it is possible. Not all systems |
132 | support shared libraries; you need ELF support and (currently) the GNU | |
133 | linker. | |
3c20b9b6 | 134 | |
00c1176b UD |
135 | @item --disable-profile |
136 | Don't build libraries with profiling information. You may want to use | |
137 | this option if you don't plan to do profiling. | |
f12944ec | 138 | |
00c1176b UD |
139 | @item --disable-versioning |
140 | Don't compile the shared libraries with symbol version information. | |
04b9968b | 141 | Doing this will make the resulting library incompatible with old |
00c1176b UD |
142 | binaries, so it's not recommended. |
143 | ||
144 | @item --enable-static-nss | |
145 | Compile static versions of the NSS (Name Service Switch) libraries. | |
146 | This is not recommended because it defeats the purpose of NSS; a program | |
147 | linked statically with the NSS libraries cannot be dynamically | |
148 | reconfigured to use a different name database. | |
149 | ||
8d4b5a8a | 150 | @item --without-tls |
a4d62195 | 151 | By default the C library is built with support for thread-local storage |
8d4b5a8a UD |
152 | if the used tools support it. By using @samp{--without-tls} this can be |
153 | prevented though there generally is no reason since it creates | |
154 | compatibility problems. | |
155 | ||
00c1176b UD |
156 | @item --build=@var{build-system} |
157 | @itemx --host=@var{host-system} | |
04b9968b | 158 | These options are for cross-compiling. If you specify both options and |
00c1176b UD |
159 | @var{build-system} is different from @var{host-system}, @code{configure} |
160 | will prepare to cross-compile glibc from @var{build-system} to be used | |
161 | on @var{host-system}. You'll probably need the @samp{--with-headers} | |
162 | option too, and you may have to override @var{configure}'s selection of | |
163 | the compiler and/or binutils. | |
164 | ||
a4d62195 UD |
165 | If you only specify @samp{--host}, @code{configure} will prepare for a |
166 | native compile but use what you specify instead of guessing what your | |
167 | system is. This is most useful to change the CPU submodel. For example, | |
168 | if @code{configure} guesses your machine as @code{i586-pc-linux-gnu} but | |
169 | you want to compile a library for 386es, give | |
170 | @samp{--host=i386-pc-linux-gnu} or just @samp{--host=i386-linux} and add | |
171 | the appropriate compiler flags (@samp{-mcpu=i386} will do the trick) to | |
172 | @var{CFLAGS}. | |
1792d4db | 173 | |
a4d62195 | 174 | If you specify just @samp{--build}, @code{configure} will get confused. |
3c20b9b6 UD |
175 | @end table |
176 | ||
00c1176b UD |
177 | To build the library and related programs, type @code{make}. This will |
178 | produce a lot of output, some of which may look like errors from | |
179 | @code{make} but isn't. Look for error messages from @code{make} | |
a4d62195 | 180 | containing @samp{***}. Those indicate that something is seriously wrong. |
00c1176b | 181 | |
3858bf28 RM |
182 | The compilation process can take a long time, depending on the |
183 | configuration and the speed of your machine. Some complex modules may | |
184 | take a very long time to compile, as much as several minutes on slower | |
185 | machines. Do not panic if the compiler appears to hang. | |
3c20b9b6 | 186 | |
8eadd4f3 UD |
187 | If you want to run a parallel make, simply pass the @samp{-j} option |
188 | with an appropriate numeric parameter to @code{make}. You need a recent | |
189 | GNU @code{make} version, though. | |
f12944ec | 190 | |
04b9968b UD |
191 | To build and run test programs which exercise some of the library |
192 | facilities, type @code{make check}. If it does not complete | |
193 | successfully, do not use the built library, and report a bug after | |
194 | verifying that the problem is not already known. @xref{Reporting Bugs}, | |
195 | for instructions on reporting bugs. Note that some of the tests assume | |
196 | they are not being run by @code{root}. We recommend you compile and | |
197 | test glibc as an unprivileged user. | |
3c20b9b6 | 198 | |
8eadd4f3 | 199 | Before reporting bugs make sure there is no problem with your system. |
a4d62195 | 200 | The tests (and later installation) use some pre-existing files of the |
8eadd4f3 UD |
201 | system such as @file{/etc/passwd}, @file{/etc/nsswitch.conf} and others. |
202 | These files must all contain correct and sensible content. | |
203 | ||
3c20b9b6 UD |
204 | To format the @cite{GNU C Library Reference Manual} for printing, type |
205 | @w{@code{make dvi}}. You need a working @TeX{} installation to do this. | |
1792d4db UD |
206 | The distribution already includes the on-line formatted version of the |
207 | manual, as Info files. You can regenerate those with @w{@code{make | |
208 | info}}, but it shouldn't be necessary. | |
209 | ||
2e8048e5 UD |
210 | The library has a number of special-purpose configuration parameters |
211 | which you can find in @file{Makeconfig}. These can be overwritten with | |
212 | the file @file{configparms}. To change them, create a | |
213 | @file{configparms} in your build directory and add values as appropriate | |
214 | for your system. The file is included and parsed by @code{make} and has | |
215 | to follow the conventions for makefiles. | |
216 | ||
217 | It is easy to configure the GNU C library for cross-compilation by | |
218 | setting a few variables in @file{configparms}. Set @code{CC} to the | |
219 | cross-compiler for the target you configured the library for; it is | |
220 | important to use this same @code{CC} value when running | |
221 | @code{configure}, like this: @samp{CC=@var{target}-gcc configure | |
a4d62195 UD |
222 | @var{target}}. Set @code{BUILD_CC} to the compiler to use for programs |
223 | run on the build system as part of compiling the library. You may need to | |
e9433893 UD |
224 | set @code{AR} to cross-compiling versions of @code{ar} |
225 | if the native tools are not configured to work with | |
a4d62195 | 226 | object files for the target you configured for. |
2e8048e5 UD |
227 | |
228 | ||
085320f5 | 229 | @node Running make install |
1792d4db UD |
230 | @appendixsec Installing the C Library |
231 | @cindex installing | |
3c20b9b6 UD |
232 | |
233 | To install the library and its header files, and the Info files of the | |
920e11e9 | 234 | manual, type @code{env LANGUAGE=C LC_ALL=C make install}. This will |
a4d62195 | 235 | build things, if necessary, before installing them; however, you should |
920e11e9 UD |
236 | still compile everything first. If you are installing glibc as your |
237 | primary C library, we recommend that you shut the system down to | |
238 | single-user mode first, and reboot afterward. This minimizes the risk | |
239 | of breaking things when the library changes out from underneath. | |
1792d4db | 240 | |
c559a3ca | 241 | If you're upgrading from Linux libc5 or some other C library, you need to |
a4d62195 UD |
242 | replace the @file{/usr/include} with a fresh directory before installing |
243 | it. The new @file{/usr/include} should contain the Linux headers, but | |
244 | nothing else. | |
c559a3ca UD |
245 | |
246 | You must first build the library (@samp{make}), optionally check it | |
247 | (@samp{make check}), switch the include directories and then install | |
248 | (@samp{make install}). The steps must be done in this order. Not moving | |
249 | the directory before install will result in an unusable mixture of header | |
250 | files from both libraries, but configuring, building, and checking the | |
251 | library requires the ability to compile and run programs against the old | |
62075f0f | 252 | library. |
c559a3ca | 253 | |
1792d4db | 254 | If you are upgrading from a previous installation of glibc 2.0 or 2.1, |
62075f0f UD |
255 | @samp{make install} will do the entire job. You do not need to remove |
256 | the old includes -- if you want to do so anyway you must then follow the | |
c559a3ca UD |
257 | order given above. |
258 | ||
259 | You may also need to reconfigure GCC to work with the new library. The | |
260 | easiest way to do that is to figure out the compiler switches to make it | |
261 | work again (@samp{-Wl,--dynamic-linker=/lib/ld-linux.so.2} should work on | |
90d1d40b | 262 | GNU/Linux systems) and use them to recompile gcc. You can also edit the specs |
c559a3ca | 263 | file (@file{/usr/lib/gcc-lib/@var{TARGET}/@var{VERSION}/specs}), but that |
62075f0f | 264 | is a bit of a black art. |
1792d4db UD |
265 | |
266 | You can install glibc somewhere other than where you configured it to go | |
267 | by setting the @code{install_root} variable on the command line for | |
268 | @samp{make install}. The value of this variable is prepended to all the | |
269 | paths for installation. This is useful when setting up a chroot | |
bef24895 UD |
270 | environment or preparing a binary distribution. The directory should be |
271 | specified with an absolute file name. | |
1792d4db | 272 | |
a0edd63e | 273 | Glibc 2.2 includes a daemon called @code{nscd}, which you |
1792d4db UD |
274 | may or may not want to run. @code{nscd} caches name service lookups; it |
275 | can dramatically improve performance with NIS+, and may help with DNS as | |
a0edd63e | 276 | well. |
1792d4db UD |
277 | |
278 | One auxiliary program, @file{/usr/libexec/pt_chown}, is installed setuid | |
279 | @code{root}. This program is invoked by the @code{grantpt} function; it | |
280 | sets the permissions on a pseudoterminal so it can be used by the | |
281 | calling process. This means programs like @code{xterm} and | |
282 | @code{screen} do not have to be setuid to get a pty. (There may be | |
440d13e2 UD |
283 | other reasons why they need privileges.) If you are using a 2.1 or |
284 | newer Linux kernel with the @code{devptsfs} or @code{devfs} filesystems | |
285 | providing pty slaves, you don't need this program; otherwise you do. | |
286 | The source for @file{pt_chown} is in @file{login/programs/pt_chown.c}. | |
3c20b9b6 | 287 | |
d01d6319 UD |
288 | After installation you might want to configure the timezone and locale |
289 | installation of your system. The GNU C library comes with a locale | |
290 | database which gets configured with @code{localedef}. For example, to | |
291 | set up a German locale with name @code{de_DE}, simply issue the command | |
8fc1e2ca UD |
292 | @samp{localedef -i de_DE -f ISO-8859-1 de_DE}. To configure all locales |
293 | that are supported by glibc, you can issue from your build directory the | |
d01d6319 UD |
294 | command @samp{make localedata/install-locales}. |
295 | ||
a4d62195 UD |
296 | To configure the locally used timezone, set the @code{TZ} environment |
297 | variable. The script @code{tzselect} helps you to select the right value. | |
298 | As an example, for Germany, @code{tzselect} would tell you to use | |
299 | @samp{TZ='Europe/Berlin'}. For a system wide installation (the given | |
300 | paths are for an installation with @samp{--prefix=/usr}), link the | |
d01d6319 UD |
301 | timezone file which is in @file{/usr/share/zoneinfo} to the file |
302 | @file{/etc/localtime}. For Germany, you might execute @samp{ln -s | |
303 | /usr/share/zoneinfo/Europe/Berlin /etc/localtime}. | |
304 | ||
00c1176b UD |
305 | @node Tools for Compilation |
306 | @appendixsec Recommended Tools for Compilation | |
3c20b9b6 UD |
307 | @cindex installation tools |
308 | @cindex tools, for installing library | |
309 | ||
310 | We recommend installing the following GNU tools before attempting to | |
311 | build the GNU C library: | |
312 | ||
313 | @itemize @bullet | |
314 | @item | |
2bbc70d5 | 315 | GNU @code{make} 3.79 or newer |
3c20b9b6 UD |
316 | |
317 | You need the latest version of GNU @code{make}. Modifying the GNU C | |
a4d62195 UD |
318 | Library to work with other @code{make} programs would be so difficult that |
319 | we recommend you port GNU @code{make} instead. @strong{Really.} We | |
320 | recommend GNU @code{make} version 3.79. All earlier versions have severe | |
321 | bugs or lack features. | |
3c20b9b6 UD |
322 | |
323 | @item | |
4d3f34be | 324 | GCC 3.4 or newer, GCC 4.1 recommended |
3c20b9b6 | 325 | |
5306d361 UD |
326 | For the 2.4 release or later, GCC 3.4 or higher is required; as of this |
327 | writing, GCC 4.4 is the compiler we advise to use for current versions. | |
4d3f34be RM |
328 | On certain machines including @code{powerpc64}, compilers prior to GCC |
329 | 4.0 have bugs that prevent them compiling the C library code in the | |
330 | 2.4 release. On other machines, GCC 4.1 is required to build the C | |
331 | library with support for the correct @code{long double} type format; | |
5306d361 UD |
332 | these include @code{powerpc} (32 bit), @code{s390} and @code{s390x}. For |
333 | other architectures special compiler-provided headers are needed | |
334 | (like @file{cpuid.h} on x86) which only come with later compiler versions. | |
91ea72b7 UD |
335 | |
336 | You can use whatever compiler you like to compile programs that use GNU | |
337 | libc, but be aware that both GCC 2.7 and 2.8 have bugs in their | |
b8f558b7 | 338 | floating-point support that may be triggered by the math library. |
3c20b9b6 | 339 | |
90d1d40b | 340 | Check the FAQ for any special compiler issues on particular platforms. |
5713a71e | 341 | |
3c20b9b6 | 342 | @item |
98be6f68 | 343 | GNU @code{binutils} 2.15 or later |
00c1176b | 344 | |
2231b60e | 345 | You must use GNU @code{binutils} (as and ld) to build the GNU C library. |
0c02c85f | 346 | No other assembler or linker has the necessary functionality at the |
2231b60e | 347 | moment. |
3c20b9b6 UD |
348 | |
349 | @item | |
407dc7a0 | 350 | GNU @code{texinfo} 3.12f |
3c20b9b6 UD |
351 | |
352 | To correctly translate and install the Texinfo documentation you need | |
353 | this version of the @code{texinfo} package. Earlier versions do not | |
354 | understand all the tags used in the document, and the installation | |
1792d4db | 355 | mechanism for the info files is not present or works differently. |
3c20b9b6 UD |
356 | |
357 | @item | |
8522a053 | 358 | GNU @code{awk} 3.0, or higher |
00c1176b | 359 | |
8522a053 UD |
360 | @code{Awk} is used in several places to generate files. |
361 | @code{gawk} 3.0 is known to work. | |
00c1176b UD |
362 | |
363 | @item | |
364 | Perl 5 | |
365 | ||
366 | Perl is not required, but it is used if present to test the | |
367 | installation. We may decide to use it elsewhere in the future. | |
3c20b9b6 | 368 | |
d66732e0 UD |
369 | @item |
370 | GNU @code{sed} 3.02 or newer | |
371 | ||
a4d62195 UD |
372 | @code{Sed} is used in several places to generate files. Most scripts work |
373 | with any version of @code{sed}. The known exception is the script | |
d66732e0 | 374 | @code{po2test.sed} in the @code{intl} subdirectory which is used to |
a4d62195 UD |
375 | generate @code{msgs.h} for the test suite. This script works correctly |
376 | only with GNU @code{sed} 3.02. If you like to run the test suite, you | |
b8668434 | 377 | should definitely upgrade @code{sed}. |
d66732e0 | 378 | |
3c20b9b6 UD |
379 | @end itemize |
380 | ||
381 | @noindent | |
382 | If you change any of the @file{configure.in} files you will also need | |
383 | ||
384 | @itemize @bullet | |
385 | @item | |
d4198074 | 386 | GNU @code{autoconf} 2.53 or higher |
3c20b9b6 UD |
387 | @end itemize |
388 | ||
389 | @noindent | |
390 | and if you change any of the message translation files you will need | |
391 | ||
392 | @itemize @bullet | |
393 | @item | |
c26b4f64 | 394 | GNU @code{gettext} 0.10.36 or later |
3c20b9b6 UD |
395 | @end itemize |
396 | ||
397 | @noindent | |
398 | You may also need these packages if you upgrade your source tree using | |
399 | patches, although we try to avoid this. | |
400 | ||
1792d4db | 401 | @node Linux |
90d1d40b | 402 | @appendixsec Specific advice for GNU/Linux systems |
1792d4db UD |
403 | @cindex upgrading from libc5 |
404 | @cindex kernel header files | |
405 | ||
90d1d40b | 406 | If you are installing GNU libc on a GNU/Linux system, you need to have the |
9c3bb910 AJ |
407 | header files from a 2.2 or newer kernel around for reference. For some |
408 | architectures, like ia64, sh and hppa, you need at least headers from | |
409 | kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64). You do not need to use | |
410 | that kernel, just have its headers where glibc can access at them. The | |
411 | easiest way to do this is to unpack it in a directory such as | |
412 | @file{/usr/src/linux-2.2.1}. In that directory, run @samp{make config} | |
413 | and accept all the defaults. Then run @samp{make | |
b8f558b7 UD |
414 | include/linux/version.h}. Finally, configure glibc with the option |
415 | @samp{--with-headers=/usr/src/linux-2.2.1/include}. Use the most recent | |
416 | kernel you can get your hands on. | |
417 | ||
418 | An alternate tactic is to unpack the 2.2 kernel and run @samp{make | |
a8d87c92 UD |
419 | config} as above; then, rename or delete @file{/usr/include}, create a |
420 | new @file{/usr/include}, and make symbolic links of | |
421 | @file{/usr/include/linux} and @file{/usr/include/asm} into the kernel | |
422 | sources. You can then configure glibc with no special options. This | |
423 | tactic is recommended if you are upgrading from libc5, since you need to | |
424 | get rid of the old header files anyway. | |
425 | ||
426 | After installing GNU libc, you may need to remove or rename | |
427 | @file{/usr/include/linux} and @file{/usr/include/asm}, and replace them | |
428 | with copies of @file{include/linux} and | |
429 | @file{include/asm-$@var{ARCHITECTURE}} taken from the Linux source | |
430 | package which supplied kernel headers for building the library. | |
431 | @var{ARCHITECTURE} will be the machine architecture for which the | |
432 | library was built, such as @samp{i386} or @samp{alpha}. You do not need | |
433 | to do this if you did not specify an alternate kernel header source | |
434 | using @samp{--with-headers}. The intent here is that these directories | |
435 | should be copies of, @strong{not} symlinks to, the kernel headers used to | |
436 | build the library. | |
1792d4db UD |
437 | |
438 | Note that @file{/usr/include/net} and @file{/usr/include/scsi} should | |
439 | @strong{not} be symlinks into the kernel sources. GNU libc provides its | |
440 | own versions of these files. | |
441 | ||
90d1d40b | 442 | GNU/Linux expects some components of the libc installation to be in |
1792d4db UD |
443 | @file{/lib} and some in @file{/usr/lib}. This is handled automatically |
444 | if you configure glibc with @samp{--prefix=/usr}. If you set some other | |
445 | prefix or allow it to default to @file{/usr/local}, then all the | |
446 | components are installed there. | |
447 | ||
448 | If you are upgrading from libc5, you need to recompile every shared | |
449 | library on your system against the new library for the sake of new code, | |
450 | but keep the old libraries around for old binaries to use. This is | |
451 | complicated and difficult. Consult the Glibc2 HOWTO at | |
452 | @url{http://www.imaxx.net/~thrytis/glibc} for details. | |
453 | ||
454 | You cannot use @code{nscd} with 2.0 kernels, due to bugs in the | |
455 | kernel-side thread support. @code{nscd} happens to hit these bugs | |
456 | particularly hard, but you might have problems with any threaded | |
457 | program. | |
3c20b9b6 UD |
458 | |
459 | @node Reporting Bugs | |
460 | @appendixsec Reporting Bugs | |
461 | @cindex reporting bugs | |
462 | @cindex bugs, reporting | |
463 | ||
464 | There are probably bugs in the GNU C library. There are certainly | |
465 | errors and omissions in this manual. If you report them, they will get | |
466 | fixed. If you don't, no one will ever know about them and they will | |
467 | remain unfixed for all eternity, if not longer. | |
468 | ||
04b9968b UD |
469 | It is a good idea to verify that the problem has not already been |
470 | reported. Bugs are documented in two places: The file @file{BUGS} | |
612fdf25 AS |
471 | describes a number of well known bugs and the bug tracking system has a |
472 | WWW interface at | |
d40eb37a | 473 | @url{http://sources.redhat.com/bugzilla/}. The WWW |
a4d62195 UD |
474 | interface gives you access to open and closed reports. A closed report |
475 | normally includes a patch or a hint on solving the problem. | |
612fdf25 | 476 | |
a4d62195 | 477 | To report a bug, first you must find it. With any luck, this will be the |
3c20b9b6 UD |
478 | hard part. Once you've found a bug, make sure it's really a bug. A |
479 | good way to do this is to see if the GNU C library behaves the same way | |
480 | some other C library does. If so, probably you are wrong and the | |
481 | libraries are right (but not necessarily). If not, one of the libraries | |
1792d4db UD |
482 | is probably wrong. It might not be the GNU library. Many historical |
483 | Unix C libraries permit things that we don't, such as closing a file | |
484 | twice. | |
485 | ||
486 | If you think you have found some way in which the GNU C library does not | |
487 | conform to the ISO and POSIX standards (@pxref{Standards and | |
488 | Portability}), that is definitely a bug. Report it! | |
3c20b9b6 UD |
489 | |
490 | Once you're sure you've found a bug, try to narrow it down to the | |
491 | smallest test case that reproduces the problem. In the case of a C | |
492 | library, you really only need to narrow it down to one library | |
493 | function call, if possible. This should not be too difficult. | |
494 | ||
495 | The final step when you have a simple test case is to report the bug. | |
d40eb37a | 496 | Do this using the WWW interface to the bug database. |
3c20b9b6 UD |
497 | |
498 | If you are not sure how a function should behave, and this manual | |
499 | doesn't tell you, that's a bug in the manual. Report that too! If the | |
500 | function's behavior disagrees with the manual, then either the library | |
501 | or the manual has a bug, so report the disagreement. If you find any | |
d40eb37a UD |
502 | errors or omissions in this manual, please report them to the |
503 | bug database. If you refer to specific | |
04b9968b UD |
504 | sections of the manual, please include the section names for easier |
505 | identification. |