Re: [PATCH 2/2] libvirtd: Remove indirect linking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 08, 2011 at 07:36:21PM +0100, Guido GÃnther wrote:
> as described at
> http://wiki.debian.org/ToolChain/DSOLinking
> https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
> 
> otherwise the build fails on current Debian unstable with:
> 
> CCLD   libvirtd
> /usr/bin/ld: ../src/.libs/libvirt_driver_lxc.a(libvirt_driver_lxc_la-lxc_container.o): undefined reference to symbol 'capng_apply'
> /usr/bin/ld: note: 'capng_apply' is defined in DSO //usr/lib/libcap-ng.so.0 so try adding it to the linker command line
> 
> CCLD   libvirtd
> /usr/bin/ld: ../src/.libs/libvirt_driver_storage.a(libvirt_driver_storage_la-storage_backend.o): undefined reference to symbol 'fgetfilecon'
> /usr/bin/ld: note: 'fgetfilecon' is defined in DSO //lib/libselinux.so.1 so try adding it to the linker command line
> //lib/libselinux.so.1: could not read symbols: Invalid operation
> 
> O.k. to apply?
> Cheers,
>  -- Guido
> 
> ---
>  daemon/Makefile.am |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/daemon/Makefile.am b/daemon/Makefile.am
> index 912440c..2083084 100644
> --- a/daemon/Makefile.am
> +++ b/daemon/Makefile.am
> @@ -145,7 +145,15 @@ if WITH_NWFILTER
>  endif
>  endif
>  
> -libvirtd_LDADD += ../src/libvirt.la
> +if WITH_SECDRIVER_SELINUX
> +    libvirtd_LDADD += $(SELINUX_LIBS)
> +endif
> +if WITH_SECDRIVER_APPARMOR
> +    libvirtd_LDADD += $(APPARMOR_LIBS)
> +endif
> +
> +libvirtd_LDADD += ../src/libvirt.la \
> +                  $(CAPNG_LIBS)

This isn't correct. The individual drivers which uses these libraries
should be specifying them in their LDADD in src/Makefile.am. Then libvirtd
gets the link when libtool adds the drivers.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]