Bug 84615 - compat-libstdc++ has undefined references to pthread functions
compat-libstdc++ has undefined references to pthread functions
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: compat-gcc (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-19 12:32 EST by Need Real Name
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-03 15:52:58 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 Need Real Name 2003-02-19 12:32:41 EST
Description of problem: 
Trying to compile a c++ program with g++296 fail with undefined reference to pthread 
functions. 
 
Version-Release number of selected component (if applicable): 
compat-gcc-7.3-2.96.110 
compat-gcc-c++-7.3-2.96.110 
compat-libstdc++-7.3-2.96.110 
compat-libstdc++-devel-7.3-2.96.110 
 
How reproducible: 
Always. 
 
Steps to Reproduce: 
1. Create test.cpp which contains: 
#include <string> 
int main() 
{ 
    std::string s; 
    return 0; 
} 
2. Run: 
$ g++296 test.cpp 
     
Actual results: 
/tmp/ccdissG2.o(.__default_alloc_template<true, 
0>::_Lock::gnu.linkonce.t.(void)+0x12): In function `__default_alloc_template<true, 
0>::_Lock::_Lock(void)': 
: undefined reference to `pthread_mutex_lock' 
/tmp/ccdissG2.o(.gnu.linkonce.t._._Q2t24__default_alloc_template2b1i05_Lock+0x13): 
In function `__default_alloc_template<true, 0>::_Lock::~_Lock(void)': 
: undefined reference to `pthread_mutex_unlock' 
collect2: ld returned 1 exit status 
 
Expected results: 
Compiled file in a.out. 
 
Additional info: 
None.
Comment 1 Need Real Name 2003-02-19 12:37:06 EST
I forgot to say that you can compile successifully with: 
$ g++296 test.cpp -lpthread 
But I have doubts if this is the right thing to do. 
 
Comment 2 Jakub Jelinek 2003-02-19 12:40:54 EST
What glibc do you use? I believe it is fixed in phoebe3/rawhide.
Comment 3 Need Real Name 2003-02-19 13:04:32 EST
glibc-2.3.1-21. I'll try the rawhide then. Thanks. 
Comment 4 Jakub Jelinek 2004-10-03 15:52:58 EDT
No results from retry, assuming it is fixed.

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