Bug 97528 - unresolved symbol pthread_once
unresolved symbol pthread_once
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-17 07:45 EDT by Mathias Fröhlich
Modified: 2016-11-24 10:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-17 11:26:20 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 Mathias Fröhlich 2003-06-17 07:45:30 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
The weak aliases for the pthread functions

pthread_getspecific 
pthread_key_create 
pthread_kill_other_threads_np 
pthread_once 
pthread_rwlock_rdlock 
pthread_rwlock_unlock 
pthread_rwlock_wrlock 
pthread_setspecific 

are missing in /lib/tls/libc-2.3.2.so.
Note, that they are available in /lib/libc-2.3.2.so.

Version-Release number of selected component (if applicable):
glibc-2.3.2-27.9

How reproducible:
Always

Steps to Reproduce:
1. nm /lib/tls/libc-2.3.2.so | grep pthread_once


    

Actual Results:  Noting shows here

Expected Results:      w __pthread_once


Additional info:

I found this while fixing nss_ldap's recursiv gethostbyname bug. For that I need
thread local storage and used the posix standard thread library which is
available even if gcc's tls extention is not. When booting vanilla 2.4.21
without the redhat paches to the kernel everything works fine. But if I use the
redhat shipped Kernel tls libraries are used and libnss_ldap does not load due
to unresolved symbols from the pthread library.
Comment 1 Jakub Jelinek 2003-06-17 11:26:20 EDT
They are not available in /lib/libc-2.3.2.so either (that w __pthread_once
is weak undefined symbol to __pthread_once) and never has been.
If you need those symbols, you need to link with -lpthread.
If you need to use it conditionally, you need to make them weak externs in
your library (e.g. through #pragma weak pthread_once etc.) and first test
if those symbols are actually available.

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