[libvirt] [PATCH] Fix pthread related link error for virt-aa-helper

Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04. --- I just pushed this one, as it qualifies as trivial compile fix. src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2025208..0da30bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1002,7 +1002,7 @@ libexec_PROGRAMS += virt-aa-helper virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) -virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) +virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) $(LIB_PTHREAD) virt_aa_helper_LDADD = \ $(WARN_CFLAGS) \ $(LIBXML_LIBS) \ -- 1.7.0.4

On 05/07/2010 10:07 AM, Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04. ---
I just pushed this one, as it qualifies as trivial compile fix.
src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 2025208..0da30bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1002,7 +1002,7 @@ libexec_PROGRAMS += virt-aa-helper
virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)
-virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) +virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) $(LIB_PTHREAD)
ACK that adding a LIB_PTHREAD is the correct solution, but... Aargh; sorry for not noticing this sooner, but you copied a bug from Jim's patch, which in turn Jim copied from existing code. According to automake, LDFLAGS is for -L and other flags that must come early in the command line, but LDADD is for -l and other flags that must come late in the command line. It doesn't quite matter on Linux, which has lazy linking if you specify -l too early, but it breaks compilation on cygwin if you get it in the wrong order. I'm working up a followup patch that moves LIB_PTHREAD (and other libs) out of LDFLAGS and into LDADD. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 05/07/2010 10:07 AM, Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04. ... -virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) +virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) $(LIB_PTHREAD)
ACK that adding a LIB_PTHREAD is the correct solution, but...
Aargh; sorry for not noticing this sooner, but you copied a bug from Jim's patch, which in turn Jim copied from existing code. According to automake, LDFLAGS is for -L and other flags that must come early in the command line, but LDADD is for -l and other flags that must come late in
Definitely worth fixing.
the command line. It doesn't quite matter on Linux, which has lazy linking if you specify -l too early, but it breaks compilation on cygwin if you get it in the wrong order.
I'm working up a followup patch that moves LIB_PTHREAD (and other libs) out of LDFLAGS and into LDADD.
Thanks for cleaning up.

Per automake, LDFLAGS is used early in the line, and LIBADD (libraries) or LDADD (programs) is used late. On platforms like cygwin, without lazy linking, this order matters. Therefore, libtool commands, -L, and similar should be in LDFLAGS, but -l should be in L*ADD. * src/Makefile.am (*_LDFLAGS): Move libraries... (*_LIBADD): ...to their LIBADD counterpart. ---
Aargh; sorry for not noticing this sooner, but you copied a bug from Jim's patch, which in turn Jim copied from existing code. According to automake, LDFLAGS is for -L and other flags that must come early in the command line, but LDADD is for -l and other flags that must come late in Definitely worth fixing.
Well, automake complained when I tried LDADD on libraries, but this patch uses LIBADD, and made automake happy. On preparing this email, I noticed that my editor did some space-tab -> tab conversions, I'll split those into a separate patch before pushing, once this gets an ACK. src/Makefile.am | 79 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 45 insertions(+), 34 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0da30bb..c441934 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -216,7 +216,7 @@ QEMU_DRIVER_SOURCES = \ qemu/qemu_monitor_json.c \ qemu/qemu_monitor_json.h \ qemu/qemu_driver.c qemu/qemu_driver.h \ - qemu/qemu_bridge_filter.c \ + qemu/qemu_bridge_filter.c \ qemu/qemu_bridge_filter.h \ qemu/qemu_security_stacked.h \ qemu/qemu_security_stacked.c \ @@ -350,7 +350,7 @@ CPU_SOURCES = \ pkgdata_DATA = cpu/cpu_map.xml -EXTRA_DIST += $(pkgdata_DATA) +EXTRA_DIST += $(pkgdata_DATA) ######################### # @@ -362,8 +362,8 @@ noinst_LTLIBRARIES = libvirt_util.la 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) $(LIB_PTHREAD) +libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) +libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIB_PTHREAD) noinst_LTLIBRARIES += libvirt_conf.la @@ -385,7 +385,7 @@ libvirt_driver_la_SOURCES = $(DRIVER_SOURCES) libvirt_driver_la_CFLAGS = $(NUMACTL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_la_LDFLAGS = $(NUMACTL_LIBS) +libvirt_driver_la_LIBADD = $(NUMACTL_LIBS) USED_SYM_FILES = libvirt_private.syms @@ -415,9 +415,8 @@ libvirt_driver_remote_la_CFLAGS = \ $(GNUTLS_CFLAGS) \ $(SASL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_remote_la_LDFLAGS = \ - $(GNUTLS_LIBS) \ - $(SASL_LIBS) +libvirt_driver_remote_la_LDFLAGS = +libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) $(SASL_LIBS) if WITH_DRIVER_MODULES libvirt_driver_remote_la_LDFLAGS += -module -avoid-version endif @@ -463,10 +462,11 @@ else noinst_LTLIBRARIES += libvirt_driver_xen.la libvirt_la_LIBADD += libvirt_driver_xen.la endif -libvirt_driver_xen_la_CFLAGS = \ +libvirt_driver_xen_la_CFLAGS = \ $(XEN_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_xen_la_LDFLAGS = $(XEN_LIBS) +libvirt_driver_xen_la_LDFLAGS = +libvirt_driver_xen_la_LIBADD = $(XEN_LIBS) if WITH_DRIVER_MODULES libvirt_driver_xen_la_LDFLAGS += -module -avoid-version endif @@ -480,7 +480,7 @@ else noinst_LTLIBRARIES += libvirt_driver_phyp.la libvirt_la_LIBADD += libvirt_driver_phyp.la endif -libvirt_driver_phyp_la_LDFLAGS = $(LIBSSH2_LIBS) +libvirt_driver_phyp_la_LIBADD = $(LIBSSH2_LIBS) libvirt_driver_phyp_la_CFLAGS = $(LIBSSH2_CFLAGS) \ -I@top_srcdir@/src/conf libvirt_driver_phyp_la_SOURCES = $(PHYP_DRIVER_SOURCES) @@ -526,7 +526,8 @@ libvirt_la_LIBADD += libvirt_driver_xenapi.la endif libvirt_driver_xenapi_la_CFLAGS = $(LIBXENSERVER_CFLAGS) $(LIBCURL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_xenapi_la_LDFLAGS = $(LIBXENSERVER_LIBS) $(LIBCURL_LIBS) +libvirt_driver_xenapi_la_LDFLAGS = +libvirt_driver_xenapi_la_LIBADD = $(LIBXENSERVER_LIBS) $(LIBCURL_LIBS) if WITH_DRIVER_MODULES libvirt_driver_xenapi_la_LDFLAGS += -module -avoid-version endif @@ -543,7 +544,8 @@ noinst_LTLIBRARIES += libvirt_driver_qemu.la endif libvirt_driver_qemu_la_CFLAGS = $(NUMACTL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_qemu_la_LDFLAGS = $(NUMACTL_LIBS) +libvirt_driver_qemu_la_LDFLAGS = +libvirt_driver_qemu_la_LIBADD = $(NUMACTL_LIBS) if WITH_DRIVER_MODULES libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version endif @@ -591,7 +593,8 @@ noinst_LTLIBRARIES += libvirt_driver_uml.la endif libvirt_driver_uml_la_CFLAGS = $(NUMACTL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_uml_la_LDFLAGS = $(NUMACTL_LIBS) +libvirt_driver_uml_la_LDFLAGS = +libvirt_driver_uml_la_LIBADD = $(NUMACTL_LIBS) if WITH_DRIVER_MODULES libvirt_driver_uml_la_LDFLAGS += -module -avoid-version endif @@ -608,7 +611,8 @@ noinst_LTLIBRARIES += libvirt_driver_one.la endif libvirt_driver_one_la_CFLAGS = $(XMLRPC_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_one_la_LDFLAGS = $(XMLRPC_LIBS) +libvirt_driver_one_la_LDFLAGS = +libvirt_driver_one_la_LIBADD = $(XMLRPC_LIBS) #libvirt_driver_one_la_CFLAGS = "-DWITH_ONE" if WITH_DRIVER_MODULES libvirt_driver_one_la_LDFLAGS += -module -avoid-version @@ -631,7 +635,8 @@ libvirt_la_LIBADD += libvirt_driver_esx.la endif libvirt_driver_esx_la_CFLAGS = $(LIBCURL_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_esx_la_LDFLAGS = $(LIBCURL_LIBS) +libvirt_driver_esx_la_LDFLAGS = +libvirt_driver_esx_la_LIBADD = $(LIBCURL_LIBS) if WITH_DRIVER_MODULES libvirt_driver_esx_la_LDFLAGS += -module -avoid-version endif @@ -668,7 +673,8 @@ libvirt_la_LIBADD += libvirt_driver_interface.la endif libvirt_driver_interface_la_CFLAGS = $(NETCF_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_interface_la_LDFLAGS = $(NETCF_LIBS) +libvirt_driver_interface_la_LDFLAGS = +libvirt_driver_interface_la_LIBADD = $(NETCF_LIBS) if WITH_DRIVER_MODULES libvirt_driver_interface_la_LDFLAGS += -module -avoid-version endif @@ -686,7 +692,8 @@ endif libvirt_driver_secret_la_CFLAGS = \ -I@top_srcdir@/src/conf if WITH_DRIVER_MODULES -libvirt_driver_secret_la_LDFLAGS = -module -avoid-version ../gnulib/lib/libgnu.la +libvirt_driver_secret_la_LDFLAGS = -module -avoid-version +libvirt_driver_secret_la_LDAD = ../gnulib/lib/libgnu.la endif libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES) endif @@ -696,6 +703,7 @@ libvirt_driver_storage_la_SOURCES = libvirt_driver_storage_la_CFLAGS = \ -I@top_srcdir@/src/conf libvirt_driver_storage_la_LDFLAGS = +libvirt_driver_storage_la_LIBADD = if WITH_STORAGE_DIR if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_storage.la @@ -726,7 +734,7 @@ endif if WITH_STORAGE_MPATH libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_MPATH_SOURCES) libvirt_driver_storage_la_CFLAGS += $(DEVMAPPER_CFLAGS) -libvirt_driver_storage_la_LDFLAGS += $(DEVMAPPER_LIBS) +libvirt_driver_storage_la_LIBADD += $(DEVMAPPER_LIBS) endif if WITH_STORAGE_DISK @@ -747,15 +755,16 @@ libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES) libvirt_driver_nodedev_la_CFLAGS = \ -I@top_srcdir@/src/conf libvirt_driver_nodedev_la_LDFLAGS = +libvirt_driver_nodedev_la_LIBADD = if HAVE_HAL libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES) libvirt_driver_nodedev_la_CFLAGS += $(HAL_CFLAGS) -libvirt_driver_nodedev_la_LDFLAGS += $(HAL_LIBS) +libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS) endif if HAVE_UDEV libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES) libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS) -libvirt_driver_nodedev_la_LDFLAGS += $(UDEV_LIBS) $(PCIACCESS_LIBS) +libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS) endif if WITH_DRIVER_MODULES @@ -773,9 +782,11 @@ noinst_LTLIBRARIES += libvirt_driver_nwfilter.la endif libvirt_driver_nwfilter_la_CFLAGS = $(LIBPCAP_CFLAGS) \ -I@top_srcdir@/src/conf -libvirt_driver_nwfilter_la_LDFLAGS = $(LIBPCAP_LIBS) +libvirt_driver_nwfilter_la_LDFLAGS = +libvirt_driver_nwfilter_la_LIBADD = $(LIBPCAP_LIBS) if WITH_DRIVER_MODULES -libvirt_driver_nwfilter_la_LDFLAGS += -module -avoid-version ../gnulib/lib/libgnu.la +libvirt_driver_nwfilter_la_LDFLAGS += -module -avoid-version +libvirt_driver_nwfilter_la_LIBADD += ../gnulib/lib/libgnu.la endif libvirt_driver_nwfilter_la_SOURCES = $(NWFILTER_DRIVER_SOURCES) endif @@ -787,15 +798,16 @@ libvirt_la_LIBADD += libvirt_driver_security.la libvirt_driver_security_la_CFLAGS = \ -I@top_srcdir@/src/conf libvirt_driver_security_la_LDFLAGS = +libvirt_driver_security_la_LIBADD = if WITH_SECDRIVER_SELINUX libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES) libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS) -libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS) +libvirt_driver_security_la_LIBADD += $(SELINUX_LIBS) endif if WITH_SECDRIVER_APPARMOR libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES) libvirt_driver_security_la_CFLAGS += $(APPARMOR_CFLAGS) -libvirt_driver_security_la_LDFLAGS += $(APPARMOR_LIBS) +libvirt_driver_security_la_LIBADD += $(APPARMOR_LIBS) endif # Add all conditional sources just in case... @@ -926,15 +938,14 @@ libvirt.def: libvirt.syms # Empty source list - it merely links a bunch of convenience libs together libvirt_la_SOURCES = -libvirt_la_LIBADD += \ - $(CYGWIN_EXTRA_LIBADD) ../gnulib/lib/libgnu.la libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \ -version-info $(LIBVIRT_VERSION_INFO) \ $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \ - $(LIBXML_LIBS) \ + $(CYGWIN_EXTRA_LDFLAGS) $(MINGW_EXTRA_LDFLAGS) +libvirt_la_LIBADD += $(LIBXML_LIBS) \ $(LIBPCAP_LIBS) \ $(DRIVER_MODULE_LIBS) \ - $(CYGWIN_EXTRA_LDFLAGS) $(MINGW_EXTRA_LDFLAGS) + $(CYGWIN_EXTRA_LIBADD) ../gnulib/lib/libgnu.la libvirt_la_CFLAGS = $(COVERAGE_CFLAGS) -DIN_LIBVIRT libvirt_la_DEPENDENCIES = $(libvirt_la_LIBADD) $(LIBVIRT_SYMBOL_FILE) @@ -983,8 +994,9 @@ libvirt_lxc_SOURCES = \ $(DOMAIN_CONF_SOURCES) \ $(CPU_CONF_SOURCES) \ $(NWFILTER_PARAM_CONF_SOURCES) -libvirt_lxc_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDCFLAGS) $(CAPNG_LIBS) $(YAJL_LIBS) -libvirt_lxc_LDADD = $(LIBXML_LIBS) $(NUMACTL_LIBS) $(LIB_PTHREAD) \ +libvirt_lxc_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDCFLAGS) +libvirt_lxc_LDADD = $(CAPNG_LIBS) $(YAJL_LIBS) \ + $(LIBXML_LIBS) $(NUMACTL_LIBS) $(LIB_PTHREAD) \ ../gnulib/lib/libgnu.la libvirt_lxc_CFLAGS = \ $(LIBPARTED_CFLAGS) \ @@ -1002,10 +1014,9 @@ libexec_PROGRAMS += virt-aa-helper virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) -virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) $(LIB_PTHREAD) +virt_aa_helper_LDFLAGS = $(WARN_CFLAGS) virt_aa_helper_LDADD = \ - $(WARN_CFLAGS) \ - $(LIBXML_LIBS) \ + $(LIBXML_LIBS) $(LIB_PTHREAD) \ libvirt_conf.la \ libvirt_util.la \ ../gnulib/lib/libgnu.la -- 1.6.6.1

Eric Blake wrote:
Per automake, LDFLAGS is used early in the line, and LIBADD (libraries) or LDADD (programs) is used late. On platforms like cygwin, without lazy linking, this order matters. Therefore, libtool commands, -L, and similar should be in LDFLAGS, but -l should be in L*ADD.
* src/Makefile.am (*_LDFLAGS): Move libraries... (*_LIBADD): ...to their LIBADD counterpart. ---
Aargh; sorry for not noticing this sooner, but you copied a bug from Jim's patch, which in turn Jim copied from existing code. According to automake, LDFLAGS is for -L and other flags that must come early in the command line, but LDADD is for -l and other flags that must come late in Definitely worth fixing.
Well, automake complained when I tried LDADD on libraries, but this patch uses LIBADD, and made automake happy.
On preparing this email, I noticed that my editor did some space-tab -> tab conversions, I'll split those into a separate patch before pushing, once this gets an ACK.
src/Makefile.am | 79 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am ... @@ -686,7 +692,8 @@ endif libvirt_driver_secret_la_CFLAGS = \ -I@top_srcdir@/src/conf if WITH_DRIVER_MODULES -libvirt_driver_secret_la_LDFLAGS = -module -avoid-version ../gnulib/lib/libgnu.la +libvirt_driver_secret_la_LDFLAGS = -module -avoid-version +libvirt_driver_secret_la_LDAD = ../gnulib/lib/libgnu.la
Oops. That should be ..._LDADD
endif libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
Other than that, it looks fine. Thanks. Did everything build/link with that for you? (I didn't try.) If so, I wonder if that part was configured out or if libgnu is not needed there.

On 05/07/2010 11:18 AM, Jim Meyering wrote:
@@ -686,7 +692,8 @@ endif libvirt_driver_secret_la_CFLAGS = \ -I@top_srcdir@/src/conf if WITH_DRIVER_MODULES -libvirt_driver_secret_la_LDFLAGS = -module -avoid-version ../gnulib/lib/libgnu.la +libvirt_driver_secret_la_LDFLAGS = -module -avoid-version +libvirt_driver_secret_la_LDAD = ../gnulib/lib/libgnu.la
Oops. That should be ..._LDADD
Or better, LIBADD. Automake didn't warn about the typo, because it wasn't a primitive, but it did warn about LDADD. Fixed.
endif libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
Other than that, it looks fine. Thanks.
Thanks for the review; pushed.
Did everything build/link with that for you? (I didn't try.)
Yes, 'make clean; make check' passed on my F12 system, and I think I have all of the prereq dev libraries installed to exercise the bulk of the libraries. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 05/07/2010 11:18 AM, Jim Meyering wrote:
@@ -686,7 +692,8 @@ endif libvirt_driver_secret_la_CFLAGS = \ -I@top_srcdir@/src/conf if WITH_DRIVER_MODULES -libvirt_driver_secret_la_LDFLAGS = -module -avoid-version ../gnulib/lib/libgnu.la +libvirt_driver_secret_la_LDFLAGS = -module -avoid-version +libvirt_driver_secret_la_LDAD = ../gnulib/lib/libgnu.la
Oops. That should be ..._LDADD
Or better, LIBADD. Automake didn't warn about the typo, because it wasn't a primitive, but it did warn about LDADD. Fixed.
Hah. Yes ;-)

Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04.
Hi Matthias, If the link failure was due solely to virt-aa-helper's use of the util library, then this patch may have solved that problem at the source: avoid link error in tests using libvirt_util; due to pthread_sigmask http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0e9b3a269be9ce8 If so, please revert this patch.

2010/5/7 Jim Meyering <jim@meyering.net>:
Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04.
Hi Matthias,
If the link failure was due solely to virt-aa-helper's use of the util library, then this patch may have solved that problem at the source:
avoid link error in tests using libvirt_util; due to pthread_sigmask http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0e9b3a269be9ce8
If so, please revert this patch.
I noticed this problem after updating to current git head with your patch already included, so my patch is necessary. Matthias

Matthias Bolte wrote:
2010/5/7 Jim Meyering <jim@meyering.net>:
Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04.
Hi Matthias,
If the link failure was due solely to virt-aa-helper's use of the util library, then this patch may have solved that problem at the source:
avoid link error in tests using libvirt_util; due to pthread_sigmask http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0e9b3a269be9ce8
If so, please revert this patch.
I noticed this problem after updating to current git head with your patch already included, so my patch is necessary.
Merely changing library options in the src/Makefile.am does not cause all libraries to be recreated, so it is likely that you are still using a util library created without -lpthread, and thus you would not have seen any benefit to my patch. You can confirm that it is not required by running e.g., touch src/util/util.c && make without your patch.

2010/5/7 Jim Meyering <jim@meyering.net>:
Matthias Bolte wrote:
2010/5/7 Jim Meyering <jim@meyering.net>:
Matthias Bolte wrote:
Link virt-aa-helper explicitly with pthread. This is at least required on Ubuntu 10.04.
Hi Matthias,
If the link failure was due solely to virt-aa-helper's use of the util library, then this patch may have solved that problem at the source:
avoid link error in tests using libvirt_util; due to pthread_sigmask http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0e9b3a269be9ce8
If so, please revert this patch.
I noticed this problem after updating to current git head with your patch already included, so my patch is necessary.
Merely changing library options in the src/Makefile.am does not cause all libraries to be recreated, so it is likely that you are still using a util library created without -lpthread, and thus you would not have seen any benefit to my patch.
You can confirm that it is not required by running e.g.,
touch src/util/util.c && make
without your patch.
You're right, I didn't recompile it properly after pulling in your patch :( Sorry for that, I'll revert my patch, as it's not necessary. Matthias
participants (3)
-
Eric Blake
-
Jim Meyering
-
Matthias Bolte