On Sat, Apr 06, 2013 at 07:17:30AM -0600, Eric Blake wrote: > On 04/05/2013 08:44 PM, Serge Hallyn wrote: > > 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 > > > > (and onward in sequence) - since at least 1.0.2 on Ubuntu systems. > > (Oddly, only if gnutls is installed - uninstalling it allows the > > compilation to complete, so it hasn't been crucial on our builders, > > just annoying when building by hand). > > > > Signed-off-by: Serge Hallyn <serge.hallyn@xxxxxxxxxx> > > --- > > tests/Makefile.am | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/tests/Makefile.am b/tests/Makefile.am > > index 3abd698..99d70d2 100644 > > --- a/tests/Makefile.am > > +++ b/tests/Makefile.am > > @@ -36,7 +36,8 @@ PROBES_O += ../src/libvirt_probes.lo > > endif > > > > LDADDS = \ > > - $(WARN_CFLAGS) \ > > + $(GNUTLS_LIBS) $(LIBXML_LIBS) $(DBUS_LIBS) \ > > + $(WARN_CFLAGS) \ > > Do we really want this linked into ALL test executables, or should you > be limiting it to just virnettlscontexttest_LDADD? I'd at least like to > try the latter, as I'm a fan of not linking in unused libraries. Yep, we should only link libraries to the tests which actually need them. 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