Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84615 - compat-libstdc++ has undefined references to pthread functions
Summary: compat-libstdc++ has undefined references to pthread functions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: compat-gcc
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-19 17:32 UTC by Need Real Name
Modified: 2007-04-18 16:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-03 19:52:58 UTC


Attachments (Terms of Use)

Description Need Real Name 2003-02-19 17:32:41 UTC
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 17:37:06 UTC
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 17:40:54 UTC
What glibc do you use? I believe it is fixed in phoebe3/rawhide.

Comment 3 Need Real Name 2003-02-19 18:04:32 UTC
glibc-2.3.1-21. I'll try the rawhide then. Thanks. 

Comment 4 Jakub Jelinek 2004-10-03 19:52:58 UTC
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.