Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 84615 - compat-libstdc++ has undefined references to pthread functions
compat-libstdc++ has undefined references to pthread functions
Product: Red Hat Linux
Classification: Retired
Component: compat-gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  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:
Last Closed: 2004-10-03 15:52:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 
Version-Release number of selected component (if applicable): 
How reproducible: 
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: 
0>::_Lock::gnu.linkonce.t.(void)+0x12): In function `__default_alloc_template<true, 
: undefined reference to `pthread_mutex_lock' 
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: 
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.