Public bug reported: QEMU consumes the library and its configure script use the libssh pkg-config cflags. The it checks if ssh_get_server_publickey() is present and assume it is a libssh-0.8 based.
Ubuntu libssh is not based on upstream 0.8 but on the 0.7 branch, with commit bbd052202 cherry-picked. This commit adds the ssh_get_server_publickey() function that QEMU uses to check 0.8 compatibility. Now commit 963c46e4f is present in libssh-0.8 but has not been cherry-picked by Ubuntu, so QEMU fails at compiling because the ssh_known_hosts_e enums this commit introduced are missing. QEMU tracker is https://bugs.launchpad.net/qemu/+bug/1838763 How to reproduce: - install libssh-dev - try to build QEMU 4.1 (sources from https://www.qemu.org/download/#source) $ ./configure ... libssh support yes ... $ make ... CC block/ssh.o block/ssh.c: In function 'check_host_key_knownhosts': block/ssh.c:281:28: error: storage size of 'state' isn't known enum ssh_known_hosts_e state; ^~~~~ block/ssh.c:289:13: error: implicit declaration of function 'ssh_session_is_known_server' [-Werror=implicit-function-declaration] state = ssh_session_is_known_server(s->session); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ block/ssh.c:289:13: error: nested extern declaration of 'ssh_session_is_known_server' [-Werror=nested-externs] block/ssh.c:293:10: error: 'SSH_KNOWN_HOSTS_OK' undeclared (first use in this function); did you mean 'SSH_OPTIONS_HOSTKEYS'? case SSH_KNOWN_HOSTS_OK: ^~~~~~~~~~~~~~~~~~ SSH_OPTIONS_HOSTKEYS block/ssh.c:293:10: note: each undeclared identifier is reported only once for each function it appears in block/ssh.c:297:10: error: 'SSH_KNOWN_HOSTS_CHANGED' undeclared (first use in this function); did you mean 'SSH_KNOWN_HOSTS_OK'? case SSH_KNOWN_HOSTS_CHANGED: ^~~~~~~~~~~~~~~~~~~~~~~ SSH_KNOWN_HOSTS_OK block/ssh.c:301:48: error: 'SSH_PUBLICKEY_HASH_SHA256' undeclared (first use in this function); did you mean 'SSH_PUBLICKEY_HASH_SHA1'? r = ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_SHA256, ^~~~~~~~~~~~~~~~~~~~~~~~~ SSH_PUBLICKEY_HASH_SHA1 block/ssh.c:307:27: error: implicit declaration of function 'ssh_get_fingerprint_hash'; did you mean 'ssh_get_pubkey_hash'? [-Werror=implicit-function-declaration] fingerprint = ssh_get_fingerprint_hash(SSH_PUBLICKEY_HASH_SHA256, ^~~~~~~~~~~~~~~~~~~~~~~~ ssh_get_pubkey_hash block/ssh.c:307:27: error: nested extern declaration of 'ssh_get_fingerprint_hash' [-Werror=nested-externs] block/ssh.c:324:10: error: 'SSH_KNOWN_HOSTS_OTHER' undeclared (first use in this function); did you mean 'SSH_KNOWN_HOSTS_OK'? case SSH_KNOWN_HOSTS_OTHER: ^~~~~~~~~~~~~~~~~~~~~ SSH_KNOWN_HOSTS_OK block/ssh.c:329:10: error: 'SSH_KNOWN_HOSTS_UNKNOWN' undeclared (first use in this function); did you mean 'SSH_KNOWN_HOSTS_CHANGED'? case SSH_KNOWN_HOSTS_UNKNOWN: ^~~~~~~~~~~~~~~~~~~~~~~ SSH_KNOWN_HOSTS_CHANGED block/ssh.c:333:10: error: 'SSH_KNOWN_HOSTS_NOT_FOUND' undeclared (first use in this function); did you mean 'SSH_KNOWN_HOSTS_UNKNOWN'? case SSH_KNOWN_HOSTS_NOT_FOUND: ^~~~~~~~~~~~~~~~~~~~~~~~~ SSH_KNOWN_HOSTS_UNKNOWN block/ssh.c:337:10: error: 'SSH_KNOWN_HOSTS_ERROR' undeclared (first use in this function); did you mean 'SSH_KNOWN_HOSTS_OTHER'? case SSH_KNOWN_HOSTS_ERROR: ^~~~~~~~~~~~~~~~~~~~~ SSH_KNOWN_HOSTS_OTHER block/ssh.c:281:28: error: unused variable 'state' [-Werror=unused-variable] enum ssh_known_hosts_e state; ^~~~~ cc1: all warnings being treated as errors rules.mak:69: recipe for target 'block/ssh.o' failed make: *** [block/ssh.o] Error 1 ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: libssh-dev 0.8.0~20170825.94fa1e38-1ubuntu0.2 Uname: Linux 5.2.17-200.fc30.x86_64 x86_64 ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 Date: Wed Oct 9 18:21:25 2019 ProcEnviron: TERM=xterm PATH=(custom, no user) SourcePackage: libssh UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: libssh (Ubuntu) Importance: Undecided Status: Confirmed ** Tags: amd64 apport-bug bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847514 Title: libssh-0.8 is detected as 0.7 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libssh/+bug/1847514/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
