Bug 129878 - relocation error: symbol __pthread_initialize, version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference
relocation error: symbol __pthread_initialize, version GLIBC_PRIVATE not defi...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-13 13:51 EDT by adams
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-16 03:38:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description adams 2004-08-13 13:51:33 EDT
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 03:38:05 EDT
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 09:09:07 EDT
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 10:17:25 EDT
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.