Bug 66377 - libical needs to be linked with libpthread
Bug#: 66377 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: s4t4n@gentoo.org Reported By: genone@gentoo.org
Component: Library
URL: 
Summary: libical needs to be linked with libpthread
Keywords:  
Status Whiteboard: 
Opened: 2004-10-04 19:31 0000
Description:   Opened: 2004-10-04 19:31 0000
well, summary says it all. Just check with the following simple test program:

#include <ical.h>

int main(void)
{
	struct icaltimetype x;
	icaltime_compare(x, x);
}

`gcc icaltest.c -lical` blows up with:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../libical.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../libical.so: undefined reference to `pthread_once'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../libical.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../libical.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status

It doesn't happen when I build libical with LDFLAGS=-lpthread

------- Comment #1 From Michele Noberasco 2004-10-15 16:44:38 0000 -------
OK, fix is in Portage. Thank you for the submission!

------- Comment #2 From Cristian Onet 2008-09-30 17:12:29 0000 -------
As of 0.27 the bug re-emerged:

ld /usr/lib/libical.so
ld: warning: cannot find entry symbol _start; not setting start address
/usr/lib/libical.so: undefined reference to `pthread_key_create'
/usr/lib/libical.so: undefined reference to `pthread_once'
/usr/lib/libical.so: undefined reference to `pthread_getspecific'
/usr/lib/libical.so: undefined reference to `pthread_setspecific'

------- Comment #3 From Michele Noberasco 2008-10-01 15:00:41 0000 -------
Reopening old bug.

------- Comment #4 From Michele Noberasco 2008-10-01 15:01:05 0000 -------
*** Bug 239227 has been marked as a duplicate of this bug. ***

------- Comment #5 From Michele Noberasco 2008-10-01 15:13:11 0000 -------
I committed version 0.33-r1 with the same fixes as in version 0.26.7.
Could you test if the fix is still working for you?

------- Comment #6 From Cristian Onet 2008-10-01 17:14:40 0000 -------
(In reply to comment #5)
> I committed version 0.33-r1 with the same fixes as in version 0.26.7.
> Could you test if the fix is still working for you?
> 

Version 0.33-r1 is OK but 0.27 is stable in portage and that version still has
the bug.

------- Comment #7 From Michele Noberasco 2008-10-02 08:00:19 0000 -------
(In reply to comment #6)
I know that: I wanted the fix to be tested before spreading it to all
versions...

------- Comment #8 From Michele Noberasco 2008-10-03 09:07:56 0000 -------
All the ebuilds in Portage have been fixed.
Thanks for the heads up!