Loads of undefined reference to `pthread_foo`
Oliver Eikemeier
eikemeier at fillmore-labs.com
Tue Apr 29 06:10:27 PDT 2003
Joe Marcus Clarke wrote:
> On Mon, 2003-04-28 at 20:22, Philip Paeps wrote:
>
>>For some obscure reason, I can't get anything to link properly with libxml2
>>today. I keep getting errors like:
>>
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_signal'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_getspecific'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_equal'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_once'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_key_create'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_unlock'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_self'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_destroy'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_lock'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_wait'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_init'
>> /usr/local/lib/libxml2.so: undefined reference to `pthread_setspecific'
>>
>>I don't know what all changed on the box either, perhaps someone could point
>>me in the right direction towards debugging this, and preferably fixing it :-)
>
> libxml2 as of 2.5.7 has thread supported enabled by default. Therefore,
> you need to link in -pthread on -STABLE or -lc_r on -CURRENT. If you're
> building your own app, you should be using either pkg-config --libs
> libxml-2.0 or gnome-config --libs libxml-2.0 to get the libraries needed
> for libxml2.
>
> If this is a port in the system, let me know which one is failing.
while updating port textproc/wv (wv-0.7.4):
from /usr/ports/textproc/wv/work/wv-0.7.5/config.log:
configure:2742: checking for wmf_stream_create in -lwmf
configure:2761: cc -o conftest -O -pipe -march=k6 -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -L/usr/local/lib -lwmf -lwmflite -lfreetype -lxml2 -lz -liconv -lm -ljpeg -lpng -lz -lm conftest.c -lwmf -L/usr/local/lib -lwmf -lwmflite -lfreetype -lxml2 -lz -liconv -lm -ljpeg -lpng -lz -lm 1>&5
/usr/local/lib/libxml2.so: undefined reference to `pthread_cond_signal'
/usr/local/lib/libxml2.so: undefined reference to `pthread_getspecific'
/usr/local/lib/libxml2.so: undefined reference to `pthread_equal'
/usr/local/lib/libxml2.so: undefined reference to `pthread_once'
/usr/local/lib/libxml2.so: undefined reference to `pthread_key_create'
/usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_unlock'
/usr/local/lib/libxml2.so: undefined reference to `pthread_self'
/usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_destroy'
/usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_lock'
/usr/local/lib/libxml2.so: undefined reference to `pthread_cond_wait'
/usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_init'
/usr/local/lib/libxml2.so: undefined reference to `pthread_setspecific'
configure: failed program was:
#line 2750 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char wmf_stream_create();
int main() {
wmf_stream_create()
; return 0; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2945 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030429/8dbf2c3f/smime.bin
More information about the freebsd-ports
mailing list