On Mon, Apr 08, 2013 at 08:41:27AM -0500, Serge Hallyn wrote:
Quoting Daniel P. Berrange (berrange(a)redhat.com):
> On Mon, Apr 08, 2013 at 07:54:55AM -0500, Serge Hallyn wrote:
> > Some tests fail to build without libxml2 or libdbus specified, add
> > them where needed.
> >
> > Without this, I get errors like
> >
> > /usr/bin/ld: virnettlscontexttest.o: undefined reference to symbol
'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4'
> > /usr/bin/ld: note: 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' is
defined in DSO /usr/lib/x86_64-linux-gnu/libgnutls.so.26 so try adding it to the linker
command line
> > /usr/lib/x86_64-linux-gnu/libgnutls.so.26: could not read symbols: Invalid
operation
> > collect2: error: ld returned 1 exit status
>
> So this makes sense because virnettlscontexttest.c directly
> calls various TLS APIs, and so needs to link to gnutls.
>
> I'm not seeing why you need to add dbus + libxml to all these
> other tests though. What errors are you getting from them ?
I incrementally added them one by one, as I got DSO errors about libxml2
and dbus as below, in sequence:
CCLD qemuxml2argvtest
/usr/bin/ld:
../src/.libs/libvirt_driver_qemu_impl.a(libvirt_driver_qemu_impl_la-qemu_domain.o):
undefined reference to symbol 'xmlXPathRegisterNs@(a)LIBXML2_2.4.30'
/usr/bin/ld: note: 'xmlXPathRegisterNs@(a)LIBXML2_2.4.30' is defined in DSO
/usr/lib/x86_64-linux-gnu/libxml2.so.2 so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/libxml2.so.2: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
[ and ]
/usr/bin/ld:
../src/.libs/libvirt_driver_network_impl.a(libvirt_driver_network_impl_la-bridge_driver.o):
undefined reference to symbol 'dbus_bus_add_match'
/usr/bin/ld: note: 'dbus_bus_add_match' is defined in DSO
/lib/x86_64-linux-gnu/libdbus-1.so.3 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdbus-1.so.3: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Ok, so those messages indicate that the libvirt_driver_qemu_impl.la and
libvirt_driver_network_impl.la libraries need to have their linkage
fixed, not the test suite(s).
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 :|