[libvirt] Build fails on Debian unstable: libssh's ssh_get_publickey() is deprecated

I ran into a failure trying to compile libvirt on Debian unstable today: rpc/virnetlibsshsession.c: In function 'virLibsshServerKeyAsString': rpc/virnetlibsshsession.c:220:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations] if (ssh_get_publickey(sess->session, &key) != SSH_OK) { ^~ In file included from rpc/virnetlibsshsession.c:24:0: /usr/include/libssh/libssh.h:489:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key); ^~~~~~~~~~~~~~~~~ CC libvirt_lxc_la-libvirt-lxc.lo cc1: all warnings being treated as errors Makefile:8092: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed Looks like Debian decided to start shipping a development snapshot instead of the latest stable release: $ dpkg -l | grep libssh- ii libssh-gcrypt-4:amd64 0.8.0~20170825.94fa1e38-1 ii libssh-gcrypt-dev 0.8.0~20170825.94fa1e38-1 That means we're not in a hurry; still, it probably makes sense to try and figure out a way to keep it compiling (and working!) sooner rather than later :) -- Andrea Bolognani / Red Hat / Virtualization

On Mon, Oct 23, 2017 at 05:28:36PM +0200, Andrea Bolognani wrote:
I ran into a failure trying to compile libvirt on Debian unstable today:
rpc/virnetlibsshsession.c: In function 'virLibsshServerKeyAsString': rpc/virnetlibsshsession.c:220:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations] if (ssh_get_publickey(sess->session, &key) != SSH_OK) { ^~ In file included from rpc/virnetlibsshsession.c:24:0: /usr/include/libssh/libssh.h:489:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key); ^~~~~~~~~~~~~~~~~ CC libvirt_lxc_la-libvirt-lxc.lo cc1: all warnings being treated as errors Makefile:8092: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed
Looks like Debian decided to start shipping a development snapshot instead of the latest stable release:
$ dpkg -l | grep libssh- ii libssh-gcrypt-4:amd64 0.8.0~20170825.94fa1e38-1 ii libssh-gcrypt-dev 0.8.0~20170825.94fa1e38-1
That means we're not in a hurry; still, it probably makes sense to try and figure out a way to keep it compiling (and working!) sooner rather than later :)
Looks like its just a plain rename to ssh_get_server_publickey() http://api.libssh.org/master/group__libssh__session.html#ga839a93298aeff85ad... 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 :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrange