On Wed, Sep 20, 2017 at 11:35:14AM +0200, Martin Kletzander wrote:
On Wed, Sep 20, 2017 at 09:41:24AM +0100, Daniel P. Berrange wrote:
> The util/vircrypto.c file uses gnutls, so we must directly link
> libvirt_util.la with gnutls to avoid errors on OS which do not
> resolve symbols against indirectly linked libraries.
>
> This fixes a build failure on Ubuntu Trusty
>
> CCLD storagevolxml2argvtest
> /usr/bin/ld: ../src/.libs/libvirt_util.a(libvirt_util_la-vircrypto.o): undefined
reference to symbol 'gnutls_strerror@@GNUTLS_1_4'
>
> //usr/lib/x86_64-linux-gnu/libgnutls.so.26: error adding symbols: DSO missing from
command line
>
Thanks for fixing that. Do you know how this can be changed? Is it
some setting for glibc or is it the way it is compiled?
It is behaviour of the "ld" linker
https://wiki.debian.org/ToolChain/DSOLinking
Debian/Ubuntu have --no-add-needed/--no-copy-dt-needed-entries enabled by
default in their linker builds, which IIUC, differs from what is the
default on Fedora/RHEL.
IIUC, it is the --no-copy-dt-needed-entries that caused this particular
build failure.
> Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
> ---
>
> Pushed as a build breaker fix
>
> src/Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index c3c7a8f04..173fba1e6 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1224,7 +1224,7 @@ libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS)
$(LIBNL_LIBS) \
> $(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
> $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \
> $(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(ACL_LIBS) \
> - $(POLKIT_LIBS)
> + $(POLKIT_LIBS) $(GNUTLS_LIBS)
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|