Change to DSO-linking semantics of the compiler

Roland McGrath roland at redhat.com
Wed Jan 13 03:22:11 UTC 2010


> I have problems to understand the xmlrpc-c build failure
> 
> | /usr/bin/ld.bfd: xml-rpc-api2cpp.5842.test: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
> 
> pthread_cancel() is not used by the program. I see it in the .plt section
> only but not where it is referenced.
>
> I would like to avoid blind '-lpthread' flags without knowing why they
> are required.

You are right to ask and not do blind changes!  Thanks for checking this.
You should not add any -lpthread if you don't really use pthread_cancel
yourself.  This is biting libstdc++ users and we think it's an ld bug, so
we'll try to get that fixed.


Thanks,
Roland


More information about the devel mailing list