This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: __lib_fork symbol
- To: Thomas Pasch <Thomas dot Pasch at e-technik dot uni-magdeburg dot de>
- Subject: Re: __lib_fork symbol
- From: Andreas Jaeger <aj at suse dot de>
- Date: 18 Dec 1999 14:46:17 +0100
- Cc: glibc-linux at ricardo dot ecn dot wfu dot edu
- References: <385B6DAC.470F6E7A@E-Technik.Uni-Magdeburg.De>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
>>>>> Thomas Pasch writes:
> Well,
> perhaps silly. But I can't compile with libpthread with glibc version 2.1.2. Trying
>> gcc test.c -lc -lpthread
> always leads to
> /lib/libpthread.so: undefined reference to `__libc_fork@@GLIBC_2.1.2'
> Indeed __libc_fork seems to be defined in /lib/libc.so.6 but not __libc_fork@@GLIBC_2.1.2 (that
> is look for by /lib/libpthread.so.0
> There is something wrong with symbol versioning? Or with the linker? I've just upgraded
> from 2.1.1.
In that case you must have miscompiled glibc somehow.
gromit:/usr/src/cvs/libc:[0]$ readelf -a /lib/libpthread.so.0 |grep __libc_fork
000114e8 01707 R_386_JUMP_SLOT 00000000 __libc_fork
23: 0 47 FUNC GLOBAL 0 UND __libc_fork@GLIBC_2.1.2 (9)
218: 0 47 FUNC GLOBAL 0 UND __libc_fork@@GLIBC_2.1.2
gromit:/usr/src/cvs/libc:[0]$ readelf -a /lib/libc.so.6 |grep __libc_fork
0013ab40 54201 R_386_32 00095650 __libc_fork
1346: 95650 47 FUNC GLOBAL 0 17 __libc_fork@@GLIBC_2.1.2
4686: 95650 47 FUNC GLOBAL 0 17 __libc_fork
Are you sure that /lib/libpthread.so.0 and /lib/libc.so.6 are both the
newly installed files? Is /usr/lib/libc.so the linker script as
documented in the FAQ?
If you compiled glibc 2.1.2 yourself, you should have in
posix/Versions:
[...]
GLIBC_2.1.2 {
# functions used in other libraries
__libc_fork; __vfork;
}
which ends up in libc.map in your build directory.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de