(M68*:*:R3V[567]*:*): Use uppercase 'M'.
[glibc.git] / FAQ
blobe5b18bfdfa55f16836a8292f3da8c67a09b5c81b
1                 Frequently Asked Question on GNU C Library
3 As every FAQ this one also tries to answer questions the user might have
4 when using the package.  Please make sure you read this before sending
5 questions or bug reports to the maintainers.
7 The GNU C Library is very complex.  The building process exploits the
8 features available in tools generally available.  But many things can
9 only be done using GNU tools.  Also the code is sometimes hard to
10 understand because it has to be portable but on the other hand must be
11 fast.  But you need not understand the details to use GNU C Library.
12 This will only be necessary if you intend to contribute or change it.
14 If you have any questions you think should be answered in this document,
15 please let me know.
17                                                   --drepper@cygnus.com
19 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
20 [Q1]    ``What systems does the GNU C Library run on?''
22 [Q2]    ``What compiler do I need to build GNU libc?''
24 [Q3]    ``When starting make I get only error messages.
25           What's wrong?''
27 [Q4]    ``After I changed configure.in I get `Autoconf version X.Y.
28           or higher is required for this script'.  What can I do?''
30 [Q5]    ``Do I need a special linker or archiver?''
32 [Q6]    ``Do I need some more things to compile GNU C Library?''
34 [Q7]    ``When I run `nm -u libc.so' on the produced library I still
35           find unresolved symbols?  Can this be ok?''
37 [Q8]    ``Can I replace the libc on my Linux system with GNU libc?''
39 [Q9]    ``I expect GNU libc to be 100% source code compatible with
40           the old Linux based GNU libc.  Why isn't it like this?''
42 [Q10]   ``Why does getlogin() always return NULL on my Linux box?''
44 [Q11]   ``Where are the DST_* constants found in <sys/time.h> on many
45           systems?''
47 [Q12]   ``The `gencat' utility cannot process the input which are
48           successfully used on my Linux libc based system.  Why?''
50 [Q13]   ``How do I configure GNU libc so that the essential libraries
51           like libc.so go into /lib and the other into /usr/lib?''
53 [Q14]   ``When linking with the new libc I get unresolved symbols
54           `crypt' and `setkey'.  Why aren't these functions in the
55           libc anymore?''
57 [Q15]   ``What are these `add-ons'?''
59 [Q16]   ``When I use GNU libc on my Linux system by linking against
60           to libc.so which comes with glibc all I get is a core dump.''
62 [Q17]   ``Looking through the shared libc file I haven't found the
63           functions `stat', `lstat', `fstat', and `mknod' and while
64           linking on my Linux system I get error messages.  How is
65           this supposed to work?''
67 [Q18]   ``The prototypes for `connect', `accept', `getsockopt',
68           `setsockopt', `getsockname', `getpeername', `send',
69           `sendto', and `recvfrom' are different in GNU libc than
70           on any other system I saw.  This is a bug, isn't it?''
72 [Q19]   ``My XXX kernel emulates a floating-point coprocessor for me.
73           Should I enable --with-fp?''
75 [Q20]   ``How can I compile gcc 2.7.2.1 from the gcc source code using
76           glibc 2.x?
78 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
79 [Q1]    ``What systems does the GNU C Library run on?''
81 [A1] {UD} This is difficult to answer.  The file `README' lists the
82 architectures GNU libc is known to run *at some time*.  This does not
83 mean that it still can be compiled and run on them in the moment.
85 The systems glibc is known to work on in the moment and most probably
86 in the future are:
88         *-*-gnu                 GNU Hurd
89         i[3456]86-*-linux-gnu   Linux-2.0 on Intel
90         m68k-*-linux-gnu        Linux-2.0 on Motorola 680x0
91         alpha-*-linux-gnu       Linux-2.0 on DEC Alpha
93 Other Linux platforms are also on the way to be supported but I need
94 some success reports first.
96 If you have a system not listed above (or in the `README' file) and
97 you are really interested in porting it, contact
99         <bug-glibc@prep.ai.mit.edu>
102 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
103 [Q2]    ``What compiler do I need to build GNU libc?''
105 [A2] {UD} It is (almost) impossible to compile GNU C Library using a
106 different compiler than GNU CC.  A lot of extensions of GNU CC are
107 used to increase the portability and speed.
109 But this does not mean you have to use GNU CC for using the GNU C
110 Library.  In fact you should be able to use the native C compiler
111 because the success only depends on the binutils: the linker and
112 archiver.
114 The GNU CC is found like all other GNU packages on
115         ftp://prep.ai.mit.edu/pub/gnu
116 or better one of the many mirror sites.
118 You always should try to use the latest official release.  Older
119 versions might not have all the features GNU libc could use.
122 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
123 [Q3]    ``When starting `make' I get only errors messages.
124           What's wrong?''
126 [A3] {UD} You definitely need GNU make to translate GNU libc.  No
127 other make program has the needed functionality.
129 Versions before 3.74 have bugs which prevent correct execution so you
130 should upgrade to the latest version before starting the compilation.
133 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
134 [Q4]    ``After I changed configure.in I get `Autoconf version X.Y.
135           or higher is required for this script'.  What can I do?''
137 [A4] {UD} You have to get the specified autoconf version (or a later)
138 from your favourite mirror of prep.ai.mit.edu.
141 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
142 [Q5]    ``Do I need a special linker or archiver?''
144 [A5] {UD} If your native versions are not too buggy you can probably
145 work with them.  But GNU libc works best with GNU binutils.
147 On systems where the native linker does not support weak symbols you
148 will not get a really ISO C compliant C library.  Generally speaking
149 you should use the GNU binutils if they provide at least the same
150 functionality as your system's tools.
152 Always get the newest release of GNU binutils available.
153 Older releases are known to have bugs that affect building the GNU C
154 Library.
157 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
158 [Q6]    ``Do I need some more things to compile GNU C Library?''
160 [A6] {UD} Yes, there are some more :-).
162 * GNU gettext; the GNU libc is internationalized and partly localized.
163   For bringing the messages for the different languages in the needed
164   form the tools from the GNU gettext package are necessary.  See
165   ftp://prep.ai.mit.edu/pub/gnu or better any mirror site.
167 * lots of diskspace (for i?86-linux this means, e.g., ~70MB).
169   You should avoid compiling on a NFS mounted device.  This is very
170   slow.
172 * plenty of time (approx 1h for i?86-linux on i586@133 or 2.5h on
173   i486@66 or 4.5h on i486@33).  For Hurd systems times are much higher.
175   If you have some more measurements let me know.
177 * When compiling for Linux:
179   + the header files of the Linux kernel must be available in the
180     search path of the CPP as <linux/*.h> and <asm/*.h>.
182 * Some files depend on special tools.  E.g., files ending in .gperf
183   need a `gperf' program.  The GNU version (part of libg++) is known
184   to work while some vendor versions do not.
186   You should not need these tools unless you change the source files.
188 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
189 [Q7]    ``When I run `nm -u libc.so' on the produced library I still
190           find unresolved symbols?  Can this be ok?''
192 [A7] {UD} Yes, this is ok.  There can be several kinds of unresolved
193 symbols:
195 * magic symbols automatically generated by the linker.  Names are
196   often like __start_* and __stop_*
198 * symbols starting with _dl_* come from the dynamic linker
200 * symbols resolved by using libgcc.a
201   (__udivdi3, __umoddi3, or similar)
203 * weak symbols, which need not be resolved at all
204   (currently fabs among others; this gets resolved if the program
205    is linked against libm, too.)
207 Generally, you should make sure you find a real program which produces
208 errors while linking before deciding there is a problem.
211 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
212 [Q8]    ``Can I replace the libc on my Linux system with GNU libc?''
214 [A8] {UD} You cannot replace any existing libc for Linux with GNU
215 libc.  There are different versions of C libraries and you can run
216 libcs with different major version independently.
218 For Linux there are today two libc versions:
219         libc-4          old a.out libc
220         libc-5          current ELF libc
222 GNU libc will have the major number 6 and therefore you can have this
223 additionally installed.  For more information consult documentation for
224 shared library handling.  The Makefiles of GNU libc will automatically
225 generate the needed symbolic links which the linker will use.
228 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
229 [Q9]    ``I expect GNU libc to be 100% source code compatible with
230           the old Linux based GNU libc.  Why isn't it like this?''
232 [A9] {DMT,UD} Not every extension in Linux libc's history was well
233 thought-out.  In fact it had a lot of problems with standards compliance
234 and with cleanliness.  With the introduction of a new version number these
235 errors now can be corrected.  Here is a list of the known source code
236 incompatibilities:
238 * _GNU_SOURCE: glibc does not automatically define _GNU_SOURCE.  Thus,
239   if a program depends on GNU extensions or some other non-standard
240   functionality, it is necessary to compile it with C compiler option
241   -D_GNU_SOURCE, or better, to put `#define _GNU_SOURCE' at the beginning
242   of your source files, before any C library header files are included.
243   This difference normally manifests itself in the form of missing
244   prototypes and/or data type definitions.  Thus, if you get such errors,
245   the first thing you should do is try defining _GNU_SOURCE and see if
246   that makes the problem go away.
248   For more information consult the file `NOTES' part of the GNU C
249   library sources.
251 * reboot(): GNU libc sanitizes the interface of reboot() to be more
252   compatible with the interface used on other OSes.  In particular,
253   reboot() as implemented in glibc takes just one argument.  This argument
254   corresponds to the third argument of the Linux reboot system call.
255   That is, a call of the form reboot(a, b, c) needs to be changed into
256   reboot(c).
257      Beside this the header <sys/reboot.h> defines the needed constants
258   for the argument.  These RB_* constants should be used instead of the
259   cryptic magic numbers.
261 * swapon(): the interface of this function didn't changed, but the
262   prototype is in a separate header file <sys/swap.h>.  For the additional
263   argument of of swapon() you should use the SWAP_* constants from
264   <linux/swap.h>, which get defined when <sys/swap.h> is included.
266 * errno: If a program uses variable "errno", then it _must_ include header
267   file <errno.h>.  The old libc often (erroneously) declared this variable
268   implicitly as a side-effect of including other libc header files.  glibc
269   is careful to avoid such namespace pollution, which, in turn, means that
270   you really need to include the header files that you depend on.  This
271   difference normally manifests itself in the form of the compiler
272   complaining about the references of the undeclared symbol "errno".
274 * Linux-specific syscalls: All Linux system calls now have appropriate
275   library wrappers and corresponding declarations in various header files.
276   This is because the syscall() macro that was traditionally used to
277   work around missing syscall wrappers are inherently non-portable and
278   error-prone.  The following tables lists all the new syscall stubs,
279   the header-file declaring their interface and the system call name.
281        syscall name:    wrapper name:   declaring header file:
282        -------------    -------------   ----------------------
283        bdflush          bdflush         <sys/kdaemon.h>
284        create_module    create_module   <sys/module.h>
285        delete_module    delete_module   <sys/module.h>
286        get_kernel_syms  get_kernel_syms <sys/module.h>
287        init_module      init_module     <sys/module.h>
288        syslog           ksyslog_ctl     <sys/klog.h>
290 * lpd: Older versions of lpd depend on a routine called _validuser().
291   The library does not provide this function, but instead provides
292   __ivaliduser() which has a slightly different interfaces.  Simply
293   upgrading to a newer lpd should fix this problem (e.g., the 4.4BSD
294   lpd is known to be working).
296 * resolver functions/BIND: like on many other systems the functions of
297   the resolver library are not included in the libc itself.  There is
298   a separate library libresolv.  If you find some symbols starting with
299   `res_*' undefined simply add -lresolv to your call of the linker.
302 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
303 [Q10]   ``Why does getlogin() always return NULL on my Linux box?''
305 [A10] {UD} The GNU C library has a format for the UTMP and WTMP file
306 which differs from what your system currently has.  It was extended to
307 fulfill the needs of the next years when IPv6 is introduced.  So the
308 record size is different, fields might have a different position and
309 so reading the files written by functions from the one library cannot
310 be read by functions from the other library.  Sorry, but this is what
311 a major release is for.  It's better to have a cut now than having no
312 means to support the new techniques later.
315 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
316 [Q11]   ``Where are the DST_* constants found in <sys/time.h> on many
317           systems?''
319 [A11] {UD} These constants come from the old BSD days and are not used
320 today anymore (even the Linux based glibc does not implement the handling
321 although the constants are defined).
323 Instead GNU libc contains the zone database handling and compatibility
324 code for POSIX TZ environment variable handling.
327 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
328 [Q12]   ``The `gencat' utility cannot process the input which are
329           successfully used on my Linux libc based system.  Why?''
331 [A12] {UD} Unlike the author of the `gencat' program which is distributed
332 with Linux libc I have read the underlying standards before writing the
333 code.  It is completely compatible with the specification given in
334 X/Open Portability Guide.
336 To ease the transition from the Linux version some of the non-standard
337 features are also present in the `gencat' program of GNU libc.  This
338 mainly includes the use of symbols for the message number and the automatic
339 generation of header files which contain the needed #defines to map the
340 symbols to integers.
342 Here is a simple SED script to convert at least some Linux specific
343 catalog files to the XPG4 form:
345 -----------------------------------------------------------------------
346 # Change catalog source in Linux specific format to standard XPG format.
347 # Ulrich Drepper <drepper@cygnus.com>, 1996.
349 /^\$ #/ {
350   h
351   s/\$ #\([^ ]*\).*/\1/
352   x
353   s/\$ #[^ ]* *\(.*\)/\$ \1/
356 /^# / {
357   s/^# \(.*\)/\1/
358   G
359   s/\(.*\)\n\(.*\)/\2 \1/
361 -----------------------------------------------------------------------
364 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
365 [Q13]   ``How do I configure GNU libc so that the essential libraries
366           like libc.so go into /lib and the other into /usr/lib?''
368 [A13] {UD} Like all other GNU packages GNU libc is configured to use a
369 base directory and install all files relative to this.  If you intend
370 to really use GNU libc on your system this base directory is /usr.  I.e.,
371 you run
372         configure --prefix=/usr <other_options>
374 Some systems like Linux have a filesystem standard which makes a
375 difference between essential libraries and others.  Essential
376 libraries are placed in /lib because this directory is required to be
377 located on the same disk partition as /.  The /usr subtree might be
378 found on another partition/disk.
380 To install the essential libraries which come with GNU libc in /lib
381 one must explicitly tell this.  Autoconf has no option for this so you
382 have to use the file where all user supplied additional information
383 should go in: `configparms' (see the `INSTALL' file).  For Linux the
384 `configparms' file should contain:
386 slibdir=/lib
387 sysconfdir=/etc
389 The first line specifies the directory for the essential libraries,
390 the second line the directory for file which are by tradition placed
391 in a directory named /etc.
394 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
395 [Q14]   ``When linking with the new libc I get unresolved symbols
396           `crypt' and `setkey'.  Why aren't these functions in the
397           libc anymore?''
399 [A14] {UD} Remember the US restrictions of exporting cryptographic
400 programs and source code.  Until this law gets abolished we cannot
401 ship the cryptographic function together with the libc.
403 But of course we provide the code and there is an very easy way to use
404 this code.  First get the extra package.  People in the US way get it
405 from the same place they got the GNU libc from.  People outside the US
406 should get the code from ftp.uni-c.dk [129.142.6.74], or another
407 archive site outside the USA.  The README explains how to install the
408 sources.
410 If you already have the crypt code on your system the reason for the
411 failure is probably that you failed to link with -lcrypt.  The crypto
412 functions are in a separate library to make it possible to export GNU
413 libc binaries from the US.
416 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
417 [Q15]   ``What are these `add-ons'?''
419 [A15] {UD} To avoid complications with export rules or external source
420 code some optional parts of the libc are distributed as separate
421 packages (e.g., the crypt package, see Q14).
423 To ease the use as part of GNU libc the installer just has to unpack
424 the package and tell the configuration script about these additional
425 subdirectories using the --enable-add-ons option.  When you add the
426 crypt add-on you just have to use
428         configure --enable-add-ons=crypt,XXX ...
430 where XXX are possible other add-ons and ... means the rest of the
431 normal option list.
433 You can use add-ons also to overwrite some files in glibc.  The add-on
434 system dependent subdirs are search first.  It is also possible to add
435 banner files (use a file named `Banner') or create shared libraries.
437 Using add-ons has the big advantage that the makefiles of the GNU libc
438 can be used.  Only some few stub rules must be written to get
439 everything running.  Even handling of architecture dependent
440 compilation is provided.  The GNU libc's sysdeps/ directory shows how
441 to use this feature.
444 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
445 [Q16]   ``When I use GNU libc on my Linux system by linking against
446           to libc.so which comes with glibc all I get is a core dump.''
448 [A16] {UD} It is not enough to simply link against the GNU libc
449 library itself.  The GNU C library comes with its own dynamic linker
450 which really conforms to the ELF API standard.  This dynamic linker
451 must be used.
453 Normally this is done by the compiler.  The gcc will use
455         -dynamic-linker /lib/ld-linux.so.1
457 unless the user specifies her/himself a -dynamic-linker argument.  But
458 this is not the correct name for the GNU dynamic linker.  The correct
459 name is /lib/ld.so.1 which is the name specified in the SVr4 ABi.
461 To change your environment to use GNU libc for compiling you need to
462 change the `specs' file of your gcc.  This file is normally found at
464         /usr/lib/gcc-lib/<arch>/<version>/specs
466 In this file you have to change a few things:
468 - change `ld-linux.so.1' to `ld.so.1' (or to ld-linux.so.2, see below)
470 - remove all expression `%{...:-lgmon}';  there is no libgmon in glibc
473 Things are getting a bit more complicated if you have GNU libc
474 installed in some other place than /usr, i.e., if you do not want to
475 use it instead of the old libc.  In this case the needed startup files
476 and libraries are not found in the regular places.  So the specs file
477 must tell the compiler and linker exactly what to use.  Here is for
478 example the gcc-2.7.2 specs file when GNU libc is installed at
479 /usr:
481 -----------------------------------------------------------------------
482 *asm:
483 %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}
485 *asm_final:
486 %{pipe:-}
488 *cpp:
489 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
491 *cc1:
492 %{profile:-p}
494 *cc1plus:
497 *endfile:
498 %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
500 *link:
501 -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:        %{rdynamic:-export-dynamic}     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}  %{static:-static}}}
503 *lib:
504 %{!shared: %{pthread:-lpthread}         %{profile:-lc_p} %{!profile: -lc}}
506 *libgcc:
507 -lgcc
509 *startfile:
510 %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                   %{!p:%{profile:gcrt1.o%s}                         %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
512 *switches_need_spaces:
515 *signed_char:
516 %{funsigned-char:-D__CHAR_UNSIGNED__}
518 *predefines:
519 -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)
521 *cross_compile:
524 *multilib:
525 . ;
527 -----------------------------------------------------------------------
529 The above is currently correct for ix86/Linux.  Because of
530 compatibility issues on this platform the dynamic linker must have
531 a different name: ld-linux.so.2.  So you have to replace
533         %{!dynamic-linker:-dynamic-linker=/home/gnu/lib/ld-linux.so.2}
535         %{!dynamic-linker:-dynamic-linker=/home/gnu/lib/ld.so.1}
537 in the above example specs file ti make it work for other systems.
539 Future versions of GCC will automatically provide the correct specs.
542 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
543 [Q17]   ``Looking through the shared libc file I haven't found the
544           functions `stat', `lstat', `fstat', and `mknod' and while
545           linking on my Linux system I get error messages.  How is
546           this supposed to work?''
548 [A17] {RM} Believe it or not, stat and lstat (and fstat, and mknod)
549 are supposed to be undefined references in libc.so.6!  Your problem is
550 probably a missing or incorrect /usr/lib/libc.so file; note that this
551 is a small text file now, not a symlink to libc.so.6.  It should look
552 something like this:
554 GROUP ( libc.so.6 ld.so.1 libc.a )
557 {UD} The Linux ldconfig file probably generates a link libc.so ->
558 libc.so.6 in /lib.  This is not correct.  There must not be such a
559 link.  The linker script with the above contents is placed in
560 /usr/lib which is enough for the linker.
563 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
564 [Q18]   ``The prototypes for `connect', `accept', `getsockopt',
565           `setsockopt', `getsockname', `getpeername', `send',
566           `sendto', and `recvfrom' are different in GNU libc from
567           any other system I saw.  This is a bug, isn't it?''
569 [A18] {UD} No, this is no bug.  This version of the GNU libc already
570 follows the to-be-released POSIX.1g standard.  In this standard
571 the type `size_t' is used for all parameters which describe a size.
572 So better change now.
574 This change is critical for system which have
575         sizeof (int) != sizeof (size_t)
576 like the Alpha.
579 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
580 [Q19]   ``My XXX kernel emulates a floating-point coprocessor for me.
581           Should I enable --with-fp?''
583 [A19] {UD} As `configure --help' shows the default value is `yes' and
584 this should not be changed unless the FPU instructions would be
585 invalid.  I.e., an emulated FPU is for the libc as good as a real one.
588 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
589 [Q20]   ``How can I compile gcc 2.7.2.1 from the gcc source code using
590           glibc 2.x?
592 [A20] {HJL} There is no support in gcc for glibc 2.0 before gcc 2.8. It
593 is very tricky to compile gcc 2.7.2.1 using glibc 2.x. You have to
594 build it manually or with one pass only. You also have to use the
595 specs file in this FAQ while compiling gcc.
597 A pre-compiled binary version of gcc 2.7.2.1 linked with glibc 2.x for
598 Linux/x86 is available in the same directory at the glibc 2.x source
599 code ftp sites.
602 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
604 Answers were given by:
605 {UD} Ulrich Drepper, <drepper@cygnus.com>
606 {DMT} David Mosberger-Tang, <davidm@AZStarNet.com>
607 {RM} Roland McGrath, <roland@gnu.ai.mit.edu>
608 {HJL} H.J. Lu, <hjl@gnu.ai.mit.edu>
610 Local Variables:
611  mode:text
612 End: