/usr/include/pthread.h:368:11: note: previous declaration of '__libc_thr_self' was here
Submitted by Stephen Fisher
Assigned to xcb mailing list dummy
Description
When compiling libpthread-stubs-0.1 as a prerequisite for libxcb-1.11 on NetBSD 6.1.5, I encounter this compilation error after running the configure script:
stubs.c:33:5: error: conflicting types for '__libc_thr_self' /usr/include/pthread.h:368:11: note: previous declaration of '__libc_thr_self' was here
Presumably, this is because none of NetBSD's pthread functions were found by the configure script even though they exist:
checking for pthread_self... no checking for pthread_mutex_init... no checking for pthread_mutex_destroy... no checking for pthread_mutex_lock... no checking for pthread_mutex_unlock... no checking for pthread_cond_init... no checking for pthread_cond_destroy... no checking for pthread_cond_wait... no checking for pthread_cond_signal... no checking for pthread_cond_broadcast... no checking for pthread_equal... no
The man page for pthread_self() says it is included in pthread.h and the libpthread library. I work around this problem by passing -lpthread to the configure script with LDFLAGS on the command line.
Version: 1.11