[libvirt] [PATCH] Explicitly link libvirt_net_rpc against SELINUX_LIBS

Eric Blake eblake at redhat.com
Fri Sep 13 17:53:16 UTC 2013


On 09/13/2013 11:02 AM, Guido Günther wrote:
> Since virnetsocket conditionally uses selinux we need to link against it
> otherwise the build fails with:
> 
> CCLD     libvirtd
> /usr/bin/ld: ../src/.libs/libvirt-lxc.so: undefined reference to symbol 'freecon'
> /lib/i386-linux-gnu/libselinux.so.1: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> make[3]: *** [libvirtd] Error 1
> ---
>  src/Makefile.am | 1 +
>  1 file changed, 1 insertion(+)

ACK.

> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 711da32..1a74435 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -2226,6 +2226,7 @@ libvirt_net_rpc_la_LDFLAGS = \
>  			$(GNUTLS_LIBS) \
>  			$(SASL_LIBS) \
>  			$(SSH2_LIBS)\
> +			$(SELINUX_LIBS) \
>  			$(AM_LDFLAGS) \
>  			$(CYGWIN_EXTRA_LDFLAGS) \
>  			$(MINGW_EXTRA_LDFLAGS)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list