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

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
From ae53113ddf09846cc01ec0f5e6e65a25991b1bfa Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Fri, 7 May 2010 16:23:44 +0200 Subject: [PATCH] avoid link error in tests using libvirt_util; due to pthread_sigmask
* src/Makefile.am (libvirt_util_la_LDFLAGS): Add $(LIB_PTHREAD), required, now that we're using gnulib's pthread module. 2010-05-07 Jim Meyering <meyering@redhat.com> --- src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 7182da1..937ee84 100644 --- a/src/Makefile.am +++ 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) noinst_LTLIBRARIES += libvirt_conf.la -- 1.7.1.166.gf2086

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@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Fri, May 07, 2010 at 08:36:05AM -0600, Eric Blake wrote:
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?
me either :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Eric Blake wrote:
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?
I was wondering just that, since the problem arose for me only on x86_64/F13, and not on i686/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 wrote:
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?
I see no failure on F12. I'll bet it's because one of the other libraries happens to include -lpthread on F12, but does not on F13. I've pushed that patch, after removing the bogus vc-dwim-added date line from the log.
participants (3)
-
Daniel Veillard
-
Eric Blake
-
Jim Meyering