Bug 129878 - relocation error: symbol __pthread_initialize, version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference
Summary: relocation error: symbol __pthread_initialize, version GLIBC_PRIVATE not defi...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-13 17:51 UTC by adams
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-16 07:38:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description adams 2004-08-13 17:51:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040803

Description of problem:
Similar to Bug 113000 but solution doesn't fix our problem. 

The exact error is:
ourexecutable: relocation error: ourexecutable: symbol
__pthread_initialize, version GLIBC_PRIVATE not defined in file
libpthread.so.0 with link time reference

An ldd on ourexecutable produces:
          linux-gate.so.1 =>  (0x00ed1000)
        librt.so.1 => /lib/tls/librt.so.1 (0x0042c000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00847000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00612000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x005f5000)

We have libpthread.so.0 in the following locations:
/lib/i686/libpthread.so.0
/lib/tls/libpthread.so.0
/lib/libpthread.so.0


Version-Release number of selected component (if applicable):
glibc-2.3.3-27

How reproducible:
Always

Steps to Reproduce:
1.using the libs of glibc-2.3.3-27 
2. run ourexecutable
3.
    

Expected Results:   

Additional info:

Comment 1 Jakub Jelinek 2004-08-16 07:38:05 UTC
If your `ourexecutable' references __pthread_initialize, then it is
severely buggy.  __pthread_initialize is a glibc private symbol
(and always has been), no application can use it.

Comment 2 adams 2004-08-17 13:09:07 UTC
No direct references to phtreads are made in ourexecutable. We don't
include the phtread libraries and we don't use the pthreads user calls
such as phtread_create.

Comment 3 adams 2004-08-18 14:17:25 UTC
I discovered that it was actually the librt.so that seems to cause the
problem. After examining the librt.so mentioned earlier I see that it
"NEED"s libpthread.so.0. I solved the problem by using the static
libraries in /usr/lib/. 

Try compiling the following:
#include <unistd.h>
#include <time.h>
#include <sys/time.h>

int main()
{
        struct timespec clock_resolution;
        int stat;

        stat = clock_getres(CLOCK_REALTIME, &clock_resolution);
        printf("CLOCK_REALTIME: Clock resolution is %d seconds, %1d
nanoseconds
(%f seconds)\n",clock_resolution.tv_sec, clock_resolution.tv_nsec,
(clock_resolu
tion.tv_nsec/1000000000.0));
}


Compile as gcc -o getclockres getclockres.c -lrt
and then gcc -o getclockres getclockres.c /usr/lib/librt.a

I get a successfull run with the librt.a but I get the same error as
befort with -lrt
# ./getclockres
./getclockres: relocation error: ./getclockres: symbol
__pthread_initialize, version GLIBC_PRIVATE not defined in file
libpthread.so.0 with link time reference



Note You need to log in before you can comment on or make changes to this bug.