[libvirt] [PATCH] avoid link error in tests using libvirt_util; due to pthread_sigmask

Eric Blake eblake at redhat.com
Fri May 7 14:36:05 UTC 2010


On 05/07/2010 08:25 AM, Jim Meyering wrote:
> Without this patch, linking the test programs fails like this:
> 
>     /usr/bin/ld: ../src/.libs/libvirt_test.a(libvirt_util_la-util.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'
>     /usr/bin/ld: note: 'pthread_sigmask@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
>     /lib64/libpthread.so.0: could not read symbols: Invalid operation
>     collect2: ld returned 1 exit status
>     make[3]: *** [nodeinfotest] Error 1

Wonder why I didn't see it on F12?

> +++ b/src/Makefile.am
> @@ -378,7 +378,7 @@ libvirt_la_LIBADD = libvirt_util.la
>  libvirt_util_la_SOURCES =					\
>  		$(UTIL_SOURCES)
>  libvirt_util_la_CFLAGS =  $(CAPNG_CFLAGS) $(YAJL_CFLAGS)
> -libvirt_util_la_LDFLAGS =  $(CAPNG_LIBS) $(YAJL_LIBS)
> +libvirt_util_la_LDFLAGS =  $(CAPNG_LIBS) $(YAJL_LIBS) $(LIB_PTHREAD)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100507/703e7f3f/attachment-0001.sig>


More information about the libvir-list mailing list