Bug 730835 - link error against pthread library
Summary: link error against pthread library
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Benjamin Kosnik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-15 21:31 UTC by gallo33
Modified: 2013-08-09 05:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:48:36 UTC


Attachments (Terms of Use)

Description gallo33 2011-08-15 21:31:57 UTC
Description of problem:
Linking the interprocess boost library against rt library causes the following error:
/usr/bin/ld: note: 'pthread_mutexattr_settype@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation

Version-Release number of selected component (if applicable):
1.46.0

How reproducible:
Just build the first example in the page http://www.boost.org/doc/libs/1_47_0/doc/html/interprocess/quick_guide.html
I tried to link the project with the line:
/usr/lib64/ccache/c++   -g   CMakeFiles/Boost-ICP.dir/src/main.cpp.o  -o Boost-ICP -rdynamic -lrt

Comment 1 Petr Machata 2011-08-16 12:48:36 UTC
You need to compile with -pthread.  Boost.Interprocess is a source-level library, so there's no way for the library itself to "smuggle" the pthread libraries to the command line.


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