bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glibc-2.3 libc_p.a and libpthread_p.a symbol conflicts


From: Arthur S Naseef
Subject: Re: glibc-2.3 libc_p.a and libpthread_p.a symbol conflicts
Date: Mon, 18 Aug 2003 10:24:43 -0400

$ gcc -static a.c -lc -lpthread
/usr/lib/libpthread.a(lockfile.o)(.text+0x0): In function `flockfile':
: multiple definition of `_IO_flockfile'
/usr/lib/libc.a(flockfile.o)(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `_IO_flockfile' changed from 34 to 18
in /usr/lib/libpthread.a(lockfile.o)
/usr/lib/libpthread.a(lockfile.o)(.text+0x0): In function `flockfile':
: multiple definition of `__flockfile'
/usr/lib/libc.a(flockfile.o)(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `__flockfile' changed from 34 to 18 in
/usr/lib/libpthread.a(lockfile.o)
/usr/lib/libpthread.a(lockfile.o)(.text+0x20): In function `funlockfile':
: multiple definition of `_IO_funlockfile'
/usr/lib/libc.a(funlockfile.o)(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `_IO_funlockfile' changed from 34 to
18 in /usr/lib/libpthread.a(lockfile.o)
/usr/lib/libpthread.a(lockfile.o)(.text+0x20): In function `funlockfile':
: multiple definition of `__funlockfile'
/usr/lib/libc.a(funlockfile.o)(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `__funlockfile' changed from 34 to 18
in /usr/lib/libpthread.a(lockfile.o)
collect2: ld returned 1 exit status

$ cat a.c
#include <pthread.h>

main ()
{
        pthread_create(NULL, NULL, NULL, NULL);
}



                                                                                
                                                   
                      Andreas Jaeger                                            
                                                   
                      <aj                      To:      "Arthur S Naseef" 
<address@hidden>                                        
                      @suse.de>                cc:      address@hidden          
                                                
                                               Subject: Re: glibc-2.3 libc_p.a 
and libpthread_p.a symbol conflicts                 
                      08/18/2003 05:27                                          
                                                   
                      AM                                                        
                                                   
                                                                                
                                                   
                                                                                
                                                   




"Arthur S Naseef" <address@hidden> writes:

> Attempting to build a static, profiled executable with libc and
libpthread
> results in a symbol conflicts on __flockfile, _IO_flockfile,
__funlockfile,
> and _IO_funlockfile. Below are the specifics of the glibc versions with
> sample commands that can be used to detect the problem.
>
> Which library should be defining these? Why do both contain them?

for threaded applications, the functions have a different
implementation and therefore need to overwrite the non-thread case.

This works fine in general and should not case any problems.  So, why
is it a problem for you?

Andreas

> Versions
>    GLIBC 2.3 (seen with 2.3.1 and 2.3.2)
>    Linuxthreads
>
> nm -D /lib/libc-2.3.1.so | grep lockfile
>    000621a0 T _IO_flockfile
>    000621e0 T _IO_ftrylockfile
>    00062220 T _IO_funlockfile
>    000621a0 W flockfile
>    000621e0 W ftrylockfile
>    00062220 W funlockfile
>
> nm -D /lib/libpthread.so.0 | grep lockfile
>    00009f50 T _IO_flockfile
>    00009f90 T _IO_ftrylockfile
>    00009f70 T _IO_funlockfile
>    00009f50 W flockfile
>    00009f90 W ftrylockfile
>    00009f70 W funlockfile
>
>
>
>
>
>
> _______________________________________________
> Bug-glibc mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-glibc
>

Andreas
--
 Andreas Jaeger, address@hidden, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

<< Attachment Removed : C.DTF >>








reply via email to

[Prev in Thread] Current Thread [Next in Thread]