[libvirt] [PATCH] Fix pthread related link error for virt-aa-helper
Eric Blake
eblake at redhat.com
Fri May 7 16:20:38 UTC 2010
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 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/876cefd0/attachment-0001.sig>
More information about the libvir-list
mailing list