[libvirt] pthread_sigmask undefined reference error

Jun Koi junkoi2004 at gmail.com
Thu Aug 21 11:09:16 UTC 2008


On Thu, Aug 21, 2008 at 5:34 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Thu, Aug 21, 2008 at 02:36:33PM +0900, Jun Koi wrote:
>> Hi,
>>
>> The latest cvs version has an error when compiling:
>
>> -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
>> -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
>> -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
>> -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
>> -fasynchronous-unwind-tables    -o virsh virsh-console.o
>> virsh-util-lib.o virsh-virsh.o -Wall -Wformat -Wformat-security
>> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow
>> -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
>> -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
>> -fexceptions -fasynchronous-unwind-tables  libvirt.la
>> ../gnulib/lib/libgnu.la
>> gcc -g -O2 -Wall -Wformat -Wformat-security -Wmissing-prototypes
>> -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align
>> -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline
>> -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
>> -fexceptions -fasynchronous-unwind-tables -o .libs/virsh
>> virsh-console.o virsh-util-lib.o virsh-virsh.o -Wall -Wformat
>> -Wformat-security -Wmissing-prototypes -Wnested-externs
>> -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
>> -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
>> -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
>> -fasynchronous-unwind-tables  ./.libs/libvirt.so
>> ../gnulib/lib/.libs/libgnu.a
>> ./.libs/libvirt.so: undefined reference to `pthread_sigmask'
>> collect2: ld returned 1 exit status
>> make[3]: *** [virsh] Error 1
>> make[3]: Leaving directory `/home/jun/projects/libvirt-0821/src'
>> make[2]: *** [all] Error 2
>> make[2]: Leaving directory `/home/jun/projects/libvirt-0821/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/jun/projects/libvirt-0821'
>> make: *** [all] Error 2
>>
>>
>> It seems I lack a particular library??
>
> That symbol is in libpthread.so which we should already be linking
> against because we already use many pthread symbols. Can you provide
> the output of
>
>  $ ldd src/.libs/libvirt.so.0

 # ldd src/.libs/libvirt.so.0
	linux-gate.so.1 =>  (0xb7f4b000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7da0000)
	libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0xb7d2a000)
	libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7d12000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bc3000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7bbf000)
	libz.so.1 => /usr/lib/libz.so.1 (0xb7baa000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7b85000)
	libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb7b75000)
	libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb7b27000)
	libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7b14000)
	/lib/ld-linux.so.2 (0xb7f4c000)
	libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb7b10000)


>
>
> And what OS distribution, version and CPU architecture are you using ?
>

It is Ubuntu 8.04, on x86.

Do you have any idea?

Thanks,
Jun




More information about the libvir-list mailing list