[libvirt] current master failed to compile

libvirt.c:323:15: error: 'gcry_thread_cbs' is deprecated [-Werror=deprecated-declarations] static struct gcry_thread_cbs virTLSThreadImpl = { ^ In file included from libvirt.c:58:0: /usr/x86_64-pc-linux-gnu/include/gcrypt.h:211:8: note: declared here struct gcry_thread_cbs ^ libvirt.c:331:5: error: excess elements in struct initializer [-Werror] virTLSMutexInit, ^ libvirt.c:331:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:332:5: error: excess elements in struct initializer [-Werror] virTLSMutexDestroy, ^ libvirt.c:332:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:333:5: error: excess elements in struct initializer [-Werror] virTLSMutexLock, ^ libvirt.c:333:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:334:5: error: excess elements in struct initializer [-Werror] virTLSMutexUnlock, ^ libvirt.c:334:5: note: (near initialization for 'virTLSThreadImpl') my configure line is: ./configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --prefix=/usr/x86_64-pc-linux-gnu --bindir=/usr/x86_64-pc-linux-gnu/bin --sbindir=/usr/x86_64-pc-linux-gnu/bin --libdir=/usr/x86_64-pc-linux-gnu/lib --datadir=/usr/share --datarootdir=/usr/share --docdir=/usr/share/doc/libvirt-scm --infodir=/usr/share/info --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --enable-fast-install --enable-nls --localstatedir=/var --with-blkid --with-chrdev-lock-files=/run/lock --with-curl --with-dbus --with-firewalld --with-gnutls --with-html-dir=/usr/share/doc/libvirt-scm --with-html-subdir=./ --with-init-script=systemd --with-interface --with-libvirtd --with-macvtap --with-pciaccess --with-qemu-group=kvm --with-readline --with-remote --with-secrets --with-ssh2 --with-storage-dir --with-storage-fs --with-sysctl --with-test --with-udev --with-virtualport --without-apparmor --without-apparmor-mount --without-apparmor-profiles --without-audit --without-driver-modules --without-dtrace --without-esx --without-hal --without-hyperv --without-included-regex --without-libxl --without-netcf --without-openvz --without-openwsman --without-phyp --without-rhel5-api --without-sanlock --without-secdriver-apparmor --without-secdriver-selinux --without-selinux --without-selinux-mount --without-storage-gluster --without-storage-rbd --without-storage-zfs --without-vz --without-xen --without-xen-inotify --without-xenapi --enable-debug --without-avahi --with-attr --without-storage-iscsi --with-qemu --with-yajl --with-capng --without-storage-lvm --without-storage-mpath --with-lxc --with-fuse --without-network --without-numactl --without-numad --without-libpcap --without-pm-utils --without-polkit --without-storage-disk --without-sasl --without-storage-scsi --without-storage-sheepdog --without-uml --without-vbox --without-vmware --without-wireshark-dissector -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On Mon, Mar 14, 2016 at 08:26:42PM +0300, Vasiliy Tolstov wrote:
libvirt.c:323:15: error: 'gcry_thread_cbs' is deprecated [-Werror=deprecated-declarations] static struct gcry_thread_cbs virTLSThreadImpl = { ^
What version of libgcrypt or gnutls do you use? Or is it something else that provides that struct. It works fine for me with libgcrypt-1.6.5 and gnutls-3.3.22. There should be some sort of guidance somewhere what to use instead of that. I believe it's also the reason for the other errors below.
In file included from libvirt.c:58:0: /usr/x86_64-pc-linux-gnu/include/gcrypt.h:211:8: note: declared here struct gcry_thread_cbs ^ libvirt.c:331:5: error: excess elements in struct initializer [-Werror] virTLSMutexInit, ^ libvirt.c:331:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:332:5: error: excess elements in struct initializer [-Werror] virTLSMutexDestroy, ^ libvirt.c:332:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:333:5: error: excess elements in struct initializer [-Werror] virTLSMutexLock, ^ libvirt.c:333:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:334:5: error: excess elements in struct initializer [-Werror] virTLSMutexUnlock, ^ libvirt.c:334:5: note: (near initialization for 'virTLSThreadImpl')
my configure line is: ./configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --prefix=/usr/x86_64-pc-linux-gnu --bindir=/usr/x86_64-pc-linux-gnu/bin --sbindir=/usr/x86_64-pc-linux-gnu/bin --libdir=/usr/x86_64-pc-linux-gnu/lib --datadir=/usr/share --datarootdir=/usr/share --docdir=/usr/share/doc/libvirt-scm --infodir=/usr/share/info --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --enable-fast-install --enable-nls --localstatedir=/var --with-blkid --with-chrdev-lock-files=/run/lock --with-curl --with-dbus --with-firewalld --with-gnutls --with-html-dir=/usr/share/doc/libvirt-scm --with-html-subdir=./ --with-init-script=systemd --with-interface --with-libvirtd --with-macvtap --with-pciaccess --with-qemu-group=kvm --with-readline --with-remote --with-secrets --with-ssh2 --with-storage-dir --with-storage-fs --with-sysctl --with-test --with-udev --with-virtualport --without-apparmor --without-apparmor-mount --without-apparmor-profiles --without-audit --without-driver-modules --without-dtrace --without-esx --without-hal --without-hyperv --without-included-regex --without-libxl --without-netcf --without-openvz --without-openwsman --without-phyp --without-rhel5-api --without-sanlock --without-secdriver-apparmor --without-secdriver-selinux --without-selinux --without-selinux-mount --without-storage-gluster --without-storage-rbd --without-storage-zfs --without-vz --without-xen --without-xen-inotify --without-xenapi --enable-debug --without-avahi --with-attr --without-storage-iscsi --with-qemu --with-yajl --with-capng --without-storage-lvm --without-storage-mpath --with-lxc --with-fuse --without-network --without-numactl --without-numad --without-libpcap --without-pm-utils --without-polkit --without-storage-disk --without-sasl --without-storage-scsi --without-storage-sheepdog --without-uml --without-vbox --without-vmware --without-wireshark-dissector
-- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

2016-03-15 14:39 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
What version of libgcrypt or gnutls do you use? Or is it something else that provides that struct. It works fine for me with libgcrypt-1.6.5 and gnutls-3.3.22. There should be some sort of guidance somewhere what to use instead of that. I believe it's also the reason for the other errors below.
I'm try to update, my gcrypt version is 1.6.4 and gnutls 3.4.8 -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

2016-03-15 15:08 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
What version of libgcrypt or gnutls do you use? Or is it something else that provides that struct. It works fine for me with libgcrypt-1.6.5 and gnutls-3.3.22. There should be some sort of guidance somewhere what to use instead of that. I believe it's also the reason for the other errors below.
I'm update libgrcypt but error still exists: libvirt.c:323:15: error: 'gcry_thread_cbs' is deprecated [-Werror=deprecated-declarations] static struct gcry_thread_cbs virTLSThreadImpl = { ^ In file included from libvirt.c:58:0: /usr/x86_64-pc-linux-gnu/include/gcrypt.h:211:8: note: declared here struct gcry_thread_cbs ^ libvirt.c:331:5: error: excess elements in struct initializer [-Werror] virTLSMutexInit, ^ libvirt.c:331:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:332:5: error: excess elements in struct initializer [-Werror] virTLSMutexDestroy, ^ libvirt.c:332:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:333:5: error: excess elements in struct initializer [-Werror] virTLSMutexLock, ^ libvirt.c:333:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:334:5: error: excess elements in struct initializer [-Werror] virTLSMutexUnlock, ^ libvirt.c:334:5: note: (near initialization for 'virTLSThreadImpl') -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

Vasiliy Tolstov wrote:
2016-03-15 14:39 GMT+03:00 Martin Kletzander <mkletzan@redhat.com>:
What version of libgcrypt or gnutls do you use? Or is it something else that provides that struct. It works fine for me with libgcrypt-1.6.5 and gnutls-3.3.22. There should be some sort of guidance somewhere what to use instead of that. I believe it's also the reason for the other errors below.
I'm try to update, my gcrypt version is 1.6.4 and gnutls 3.4.8
This is weird because gnutls 3.x does not use gcrypt. So WITH_GNUTLS_GCRYPT should not be defined and therefore gcrypt.h should not be included. Probably there's an issue with your system or a bug in configure. You might check how configure tries to find gnutls. Or, to start with, run "pkg-config --libs 'gnutls >= 3.0'" to check if it sees gnutls 3.x on your system. Roman Bogorodskiy

On Mon, Mar 14, 2016 at 08:26:42PM +0300, Vasiliy Tolstov wrote:
libvirt.c:323:15: error: 'gcry_thread_cbs' is deprecated [-Werror=deprecated-declarations] static struct gcry_thread_cbs virTLSThreadImpl = { ^ In file included from libvirt.c:58:0: /usr/x86_64-pc-linux-gnu/include/gcrypt.h:211:8: note: declared here struct gcry_thread_cbs ^ libvirt.c:331:5: error: excess elements in struct initializer [-Werror] virTLSMutexInit, ^ libvirt.c:331:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:332:5: error: excess elements in struct initializer [-Werror] virTLSMutexDestroy, ^ libvirt.c:332:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:333:5: error: excess elements in struct initializer [-Werror] virTLSMutexLock, ^ libvirt.c:333:5: note: (near initialization for 'virTLSThreadImpl') libvirt.c:334:5: error: excess elements in struct initializer [-Werror] virTLSMutexUnlock, ^ libvirt.c:334:5: note: (near initialization for 'virTLSThreadImpl')
This is caused by changes in latest version of libgcrypt. Most people don't hit this because when building with latest gnutls, libvirt will prefer linking to nettle, instead of libgcrypt. ie linking to modern gnutls and modern libgcrypt is pretty unusual setup. Are you perhaps missing nettle-devel packages causing it to fallback to the legacy libgcrypt codepath ? None the less we should fix libvirt to not have these libgcrypt errors. Regards, 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 :|

2016-03-23 15:06 GMT+03:00 Daniel P. Berrange <berrange@redhat.com>:
This is caused by changes in latest version of libgcrypt.
Most people don't hit this because when building with latest gnutls, libvirt will prefer linking to nettle, instead of libgcrypt. ie linking to modern gnutls and modern libgcrypt is pretty unusual setup. Are you perhaps missing nettle-devel packages causing it to fallback to the legacy libgcrypt codepath ?
None the less we should fix libvirt to not have these libgcrypt errors.
I have nettle-devel (3.2) packages, so i don't know why this happened =(. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru
participants (4)
-
Daniel P. Berrange
-
Martin Kletzander
-
Roman Bogorodskiy
-
Vasiliy Tolstov