* [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check
2019-08-14 12:15 [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 Philippe Mathieu-Daudé
@ 2019-08-14 12:15 ` Philippe Mathieu-Daudé
2019-08-14 12:36 ` Pino Toscano
2019-08-14 12:15 ` [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:15 UTC (permalink / raw)
To: Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, qemu-block, Alex Bennée, Max Reitz,
周文青, Philippe Mathieu-Daudé
The libssh pkg-config is not complete, the libraries required to
link with libssh are not returned. For example on Ubuntu 18.04:
$ dpkg -l|fgrep libssh
ii libssh-4:arm64 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64 tiny C SSH library (OpenSSL flavor)
ii libssh-dev 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64 tiny C SSH library. Development files (OpenSSL flavor)
$ pkg-config libssh --libs
-lssh
Since the ./configure script tries to link an object to figure if
libssh is available, it fails:
$ cat config.log
[...]
cc -pthread -I/usr/include/glib-2.0 [...] -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -static -g -lssh
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libssh.a(dh.c.o): In function `ssh_crypto_init':
(.text+0x1a9): undefined reference to `BN_new'
(.text+0x1c2): undefined reference to `BN_set_word'
(.text+0x1c7): undefined reference to `BN_new'
(.text+0x1e7): undefined reference to `BN_bin2bn'
(.text+0x1ec): undefined reference to `BN_new'
(.text+0x20c): undefined reference to `BN_bin2bn'
(.text+0x218): undefined reference to `OPENSSL_init_crypto'
[...]
collect2: error: ld returned 1 exit status
To bypass this check, simply compile an object using libssh headers.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Should we check for libcrypto?
$ pkg-config --libs libssh openssl
-lssh -lssl -lcrypto
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 714e7fb6a1..1d5c07de1f 100755
--- a/configure
+++ b/configure
@@ -3951,7 +3951,7 @@ if test "$libssh" = "yes"; then
#include <libssh/libssh.h>
int main(void) { return ssh_get_server_publickey(NULL, NULL); }
EOF
- if compile_prog "$libssh_cflags" "$libssh_libs"; then
+ if compile_object "$libssh_cflags"; then
libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
fi
fi
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check
2019-08-14 12:15 ` [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check Philippe Mathieu-Daudé
@ 2019-08-14 12:36 ` Pino Toscano
0 siblings, 0 replies; 16+ messages in thread
From: Pino Toscano @ 2019-08-14 12:36 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, qemu-block, qemu-devel, Richard W . M . Jones,
Max Reitz, 周文青,
Alex Bennée
[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]
On Wednesday, 14 August 2019 14:15:24 CEST Philippe Mathieu-Daudé wrote:
> The libssh pkg-config is not complete, the libraries required to
> link with libssh are not returned. For example on Ubuntu 18.04:
>
> $ dpkg -l|fgrep libssh
> ii libssh-4:arm64 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64 tiny C SSH library (OpenSSL flavor)
> ii libssh-dev 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64 tiny C SSH library. Development files (OpenSSL flavor)
>
> $ pkg-config libssh --libs
> -lssh
>
> Since the ./configure script tries to link an object to figure if
> libssh is available, it fails:
>
> $ cat config.log
> [...]
> cc -pthread -I/usr/include/glib-2.0 [...] -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -static -g -lssh
> /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libssh.a(dh.c.o): In function `ssh_crypto_init':
> (.text+0x1a9): undefined reference to `BN_new'
> (.text+0x1c2): undefined reference to `BN_set_word'
> (.text+0x1c7): undefined reference to `BN_new'
> (.text+0x1e7): undefined reference to `BN_bin2bn'
> (.text+0x1ec): undefined reference to `BN_new'
> (.text+0x20c): undefined reference to `BN_bin2bn'
> (.text+0x218): undefined reference to `OPENSSL_init_crypto'
> [...]
> collect2: error: ld returned 1 exit status
Sigh :/
> ---
> Should we check for libcrypto?
>
> $ pkg-config --libs libssh openssl
> -lssh -lssl -lcrypto
Definitely not! The crypto library is an internal implementation of
libssh, so please do not assume libssh is built against openssl.
--
Pino Toscano
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 12:15 [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 Philippe Mathieu-Daudé
2019-08-14 12:15 ` [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check Philippe Mathieu-Daudé
@ 2019-08-14 12:15 ` Philippe Mathieu-Daudé
2019-08-14 12:35 ` Pino Toscano
2019-08-14 13:27 ` Andrea Bolognani
2019-08-14 12:15 ` [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8 Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:15 UTC (permalink / raw)
To: Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, qemu-block, Alex Bennée, Andrea Bolognani,
Max Reitz, 周文青, Philippe Mathieu-Daudé
The libssh packaged by a distribution can predate version 0.8,
but still provides the newer API introduced after version 0.7.
Using the deprecated API leads to build failure, as on Ubuntu 18.04:
CC block/ssh.o
block/ssh.c: In function 'check_host_key_hash':
block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
r = ssh_get_publickey(s->session, &pubkey);
^
In file included from block/ssh.c:27: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);
^~~~~~~~~~~~~~~~~
rules.mak:69: recipe for target 'block/ssh.o' failed
make: *** [block/ssh.o] Error 1
Fix by using the newer API if available.
Suggested-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
block/ssh.c | 2 +-
configure | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/block/ssh.c b/block/ssh.c
index 501933b855..f5fea921c6 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -438,7 +438,7 @@ check_host_key_hash(BDRVSSHState *s, const char *hash,
unsigned char *server_hash;
size_t server_hash_len;
-#ifdef HAVE_LIBSSH_0_8
+#ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
r = ssh_get_server_publickey(s->session, &pubkey);
#else
r = ssh_get_publickey(s->session, &pubkey);
diff --git a/configure b/configure
index 1d5c07de1f..fe3fef9309 100755
--- a/configure
+++ b/configure
@@ -3949,11 +3949,18 @@ fi
if test "$libssh" = "yes"; then
cat > $TMPC <<EOF
#include <libssh/libssh.h>
+#ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
int main(void) { return ssh_get_server_publickey(NULL, NULL); }
+#else
+int main(void) { return ssh_get_publickey(NULL, NULL); }
+#endif
EOF
if compile_object "$libssh_cflags"; then
libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
fi
+ if compile_object "$libssh_cflags -DHAVE_SSH_GET_SERVER_PUBLICKEY"; then
+ libssh_cflags="-DHAVE_SSH_GET_SERVER_PUBLICKEY $libssh_cflags"
+ fi
fi
##########################################
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 12:15 ` [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API Philippe Mathieu-Daudé
@ 2019-08-14 12:35 ` Pino Toscano
2019-08-14 13:27 ` Andrea Bolognani
1 sibling, 0 replies; 16+ messages in thread
From: Pino Toscano @ 2019-08-14 12:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, qemu-block, qemu-devel, Richard W . M . Jones,
Max Reitz, 周文青,
Andrea Bolognani, Alex Bennée
[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]
On Wednesday, 14 August 2019 14:15:25 CEST Philippe Mathieu-Daudé wrote:
> The libssh packaged by a distribution can predate version 0.8,
> but still provides the newer API introduced after version 0.7.
>
> Using the deprecated API leads to build failure, as on Ubuntu 18.04:
>
> CC block/ssh.o
> block/ssh.c: In function 'check_host_key_hash':
> block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
> r = ssh_get_publickey(s->session, &pubkey);
> ^
> In file included from block/ssh.c:27: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);
> ^~~~~~~~~~~~~~~~~
> rules.mak:69: recipe for target 'block/ssh.o' failed
> make: *** [block/ssh.o] Error 1
>
> Fix by using the newer API if available.
>
> Suggested-by: Andrea Bolognani <abologna@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> block/ssh.c | 2 +-
> configure | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/block/ssh.c b/block/ssh.c
> index 501933b855..f5fea921c6 100644
> --- a/block/ssh.c
> +++ b/block/ssh.c
> @@ -438,7 +438,7 @@ check_host_key_hash(BDRVSSHState *s, const char *hash,
> unsigned char *server_hash;
> size_t server_hash_len;
>
> -#ifdef HAVE_LIBSSH_0_8
> +#ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
> r = ssh_get_server_publickey(s->session, &pubkey);
> #else
> r = ssh_get_publickey(s->session, &pubkey);
> diff --git a/configure b/configure
> index 1d5c07de1f..fe3fef9309 100755
> --- a/configure
> +++ b/configure
> @@ -3949,11 +3949,18 @@ fi
> if test "$libssh" = "yes"; then
> cat > $TMPC <<EOF
> #include <libssh/libssh.h>
> +#ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
> int main(void) { return ssh_get_server_publickey(NULL, NULL); }
> +#else
> +int main(void) { return ssh_get_publickey(NULL, NULL); }
> +#endif
> EOF
> if compile_object "$libssh_cflags"; then
> libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
> fi
> + if compile_object "$libssh_cflags -DHAVE_SSH_GET_SERVER_PUBLICKEY"; then
> + libssh_cflags="-DHAVE_SSH_GET_SERVER_PUBLICKEY $libssh_cflags"
> + fi
Why try to compile it twice? If the check for ssh_get_server_publickey
works, then it is available...
Just add an additional HAVE_SSH_GET_SERVER_PUBLICKEY define when this
test succeeds, and change the usage of ssh_get_server_publickey based
on this.
--
Pino Toscano
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 12:15 ` [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API Philippe Mathieu-Daudé
2019-08-14 12:35 ` Pino Toscano
@ 2019-08-14 13:27 ` Andrea Bolognani
2019-08-14 14:15 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 16+ messages in thread
From: Andrea Bolognani @ 2019-08-14 13:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, 周文青,
Alex Bennée, qemu-block, Max Reitz
On Wed, 2019-08-14 at 14:15 +0200, Philippe Mathieu-Daudé wrote:
> The libssh packaged by a distribution can predate version 0.8,
> but still provides the newer API introduced after version 0.7.
>
> Using the deprecated API leads to build failure, as on Ubuntu 18.04:
>
> CC block/ssh.o
> block/ssh.c: In function 'check_host_key_hash':
> block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
> r = ssh_get_publickey(s->session, &pubkey);
> ^
> In file included from block/ssh.c:27: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);
> ^~~~~~~~~~~~~~~~~
> rules.mak:69: recipe for target 'block/ssh.o' failed
> make: *** [block/ssh.o] Error 1
>
> Fix by using the newer API if available.
>
> Suggested-by: Andrea Bolognani <abologna@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> block/ssh.c | 2 +-
> configure | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
Did I really suggest this? I have no recollection of doing so, or
even getting involved with libssh support in QEMU at all for that
matter.
--
Andrea Bolognani / Red Hat / Virtualization
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 13:27 ` Andrea Bolognani
@ 2019-08-14 14:15 ` Philippe Mathieu-Daudé
2019-08-14 14:51 ` Andrea Bolognani
0 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 14:15 UTC (permalink / raw)
To: Andrea Bolognani, Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, 周文青,
Alex Bennée, qemu-block, Max Reitz
On 8/14/19 3:27 PM, Andrea Bolognani wrote:
> On Wed, 2019-08-14 at 14:15 +0200, Philippe Mathieu-Daudé wrote:
>> The libssh packaged by a distribution can predate version 0.8,
>> but still provides the newer API introduced after version 0.7.
>>
>> Using the deprecated API leads to build failure, as on Ubuntu 18.04:
>>
>> CC block/ssh.o
>> block/ssh.c: In function 'check_host_key_hash':
>> block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
>> r = ssh_get_publickey(s->session, &pubkey);
>> ^
>> In file included from block/ssh.c:27: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);
>> ^~~~~~~~~~~~~~~~~
>> rules.mak:69: recipe for target 'block/ssh.o' failed
>> make: *** [block/ssh.o] Error 1
>>
>> Fix by using the newer API if available.
>>
>> Suggested-by: Andrea Bolognani <abologna@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> block/ssh.c | 2 +-
>> configure | 7 +++++++
>> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> Did I really suggest this? I have no recollection of doing so, or
> even getting involved with libssh support in QEMU at all for that
> matter.
I took this suggestion from
https://www.redhat.com/archives/libvir-list/2018-May/msg00597.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 14:15 ` Philippe Mathieu-Daudé
@ 2019-08-14 14:51 ` Andrea Bolognani
2019-08-14 15:14 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 16+ messages in thread
From: Andrea Bolognani @ 2019-08-14 14:51 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, 周文青,
Alex Bennée, qemu-block, Max Reitz
On Wed, 2019-08-14 at 16:15 +0200, Philippe Mathieu-Daudé wrote:
> On 8/14/19 3:27 PM, Andrea Bolognani wrote:
> > On Wed, 2019-08-14 at 14:15 +0200, Philippe Mathieu-Daudé wrote:
> > > The libssh packaged by a distribution can predate version 0.8,
> > > but still provides the newer API introduced after version 0.7.
> > >
> > > Using the deprecated API leads to build failure, as on Ubuntu 18.04:
> > >
> > > CC block/ssh.o
> > > block/ssh.c: In function 'check_host_key_hash':
> > > block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
> > > r = ssh_get_publickey(s->session, &pubkey);
> > > ^
> > > In file included from block/ssh.c:27: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);
> > > ^~~~~~~~~~~~~~~~~
> > > rules.mak:69: recipe for target 'block/ssh.o' failed
> > > make: *** [block/ssh.o] Error 1
> > >
> > > Fix by using the newer API if available.
> > >
> > > Suggested-by: Andrea Bolognani <abologna@redhat.com>
> > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > > ---
> > > block/ssh.c | 2 +-
> > > configure | 7 +++++++
> > > 2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > Did I really suggest this? I have no recollection of doing so, or
> > even getting involved with libssh support in QEMU at all for that
> > matter.
>
> I took this suggestion from
> https://www.redhat.com/archives/libvir-list/2018-May/msg00597.html
I see :)
I feel like adding a Suggested-by because of something that was
posted on an unrelated project's mailing list is stretching the
definition of the tag a bit, so if you end up having to respin I
think it would be reasonable to drop it, but honestly it's not a
big deal either way: I was just curious.
--
Andrea Bolognani / Red Hat / Virtualization
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 14:51 ` Andrea Bolognani
@ 2019-08-14 15:14 ` Philippe Mathieu-Daudé
2019-08-15 8:52 ` Andrea Bolognani
0 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 15:14 UTC (permalink / raw)
To: Andrea Bolognani, Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, 周文青,
Alex Bennée, qemu-block, Max Reitz
On 8/14/19 4:51 PM, Andrea Bolognani wrote:
> On Wed, 2019-08-14 at 16:15 +0200, Philippe Mathieu-Daudé wrote:
>> On 8/14/19 3:27 PM, Andrea Bolognani wrote:
>>> On Wed, 2019-08-14 at 14:15 +0200, Philippe Mathieu-Daudé wrote:
>>>> The libssh packaged by a distribution can predate version 0.8,
>>>> but still provides the newer API introduced after version 0.7.
>>>>
>>>> Using the deprecated API leads to build failure, as on Ubuntu 18.04:
>>>>
>>>> CC block/ssh.o
>>>> block/ssh.c: In function 'check_host_key_hash':
>>>> block/ssh.c:444:5: error: 'ssh_get_publickey' is deprecated [-Werror=deprecated-declarations]
>>>> r = ssh_get_publickey(s->session, &pubkey);
>>>> ^
>>>> In file included from block/ssh.c:27: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);
>>>> ^~~~~~~~~~~~~~~~~
>>>> rules.mak:69: recipe for target 'block/ssh.o' failed
>>>> make: *** [block/ssh.o] Error 1
>>>>
>>>> Fix by using the newer API if available.
>>>>
>>>> Suggested-by: Andrea Bolognani <abologna@redhat.com>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>> block/ssh.c | 2 +-
>>>> configure | 7 +++++++
>>>> 2 files changed, 8 insertions(+), 1 deletion(-)
>>>
>>> Did I really suggest this? I have no recollection of doing so, or
>>> even getting involved with libssh support in QEMU at all for that
>>> matter.
>>
>> I took this suggestion from
>> https://www.redhat.com/archives/libvir-list/2018-May/msg00597.html
>
> I see :)
>
> I feel like adding a Suggested-by because of something that was
> posted on an unrelated project's mailing list is stretching the
> definition of the tag a bit, so if you end up having to respin I
> think it would be reasonable to drop it, but honestly it's not a
> big deal either way: I was just curious.
Understood, sorry.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API
2019-08-14 15:14 ` Philippe Mathieu-Daudé
@ 2019-08-15 8:52 ` Andrea Bolognani
0 siblings, 0 replies; 16+ messages in thread
From: Andrea Bolognani @ 2019-08-15 8:52 UTC (permalink / raw)
To: Philippe Mathieu-Daudé,
Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, 周文青,
Alex Bennée, qemu-block, Max Reitz
On Wed, 2019-08-14 at 17:14 +0200, Philippe Mathieu-Daudé wrote:
> On 8/14/19 4:51 PM, Andrea Bolognani wrote:
> > On Wed, 2019-08-14 at 16:15 +0200, Philippe Mathieu-Daudé wrote:
> > > On 8/14/19 3:27 PM, Andrea Bolognani wrote:
> > > > On Wed, 2019-08-14 at 14:15 +0200, Philippe Mathieu-Daudé wrote:
> > > > > Suggested-by: Andrea Bolognani <abologna@redhat.com>
> > > > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > > > > ---
> > > > > block/ssh.c | 2 +-
> > > > > configure | 7 +++++++
> > > > > 2 files changed, 8 insertions(+), 1 deletion(-)
> > > >
> > > > Did I really suggest this? I have no recollection of doing so, or
> > > > even getting involved with libssh support in QEMU at all for that
> > > > matter.
> > >
> > > I took this suggestion from
> > > https://www.redhat.com/archives/libvir-list/2018-May/msg00597.html
> >
> > I see :)
> >
> > I feel like adding a Suggested-by because of something that was
> > posted on an unrelated project's mailing list is stretching the
> > definition of the tag a bit, so if you end up having to respin I
> > think it would be reasonable to drop it, but honestly it's not a
> > big deal either way: I was just curious.
>
> Understood, sorry.
Nothing to apologize for! :)
--
Andrea Bolognani / Red Hat / Virtualization
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8
2019-08-14 12:15 [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 Philippe Mathieu-Daudé
2019-08-14 12:15 ` [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check Philippe Mathieu-Daudé
2019-08-14 12:15 ` [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API Philippe Mathieu-Daudé
@ 2019-08-14 12:15 ` Philippe Mathieu-Daudé
2019-08-14 12:39 ` Pino Toscano
2019-08-14 12:15 ` [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected Philippe Mathieu-Daudé
2019-08-14 16:45 ` [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 no-reply
4 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:15 UTC (permalink / raw)
To: Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, qemu-block, Alex Bennée, Max Reitz,
周文青, Philippe Mathieu-Daudé
To figure out which libssh version is installed, checking for
ssh_get_server_publickey() is not sufficient.
ssh_get_server_publickey() has been introduced in libssh
commit bbd052202 (predating 0.8) but distributions also
backported other pre-0.8 patches, such libssh commit
963c46e4f which introduce the ssh_known_hosts_e enum.
Check the enum is available to assume the version is 0.8.
This fixes build failure on Ubuntu 18.04:
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;
^~~~~
rules.mak:69: recipe for target 'block/ssh.o' failed
make: *** [block/ssh.o] Error 1
Reported-by: 周文青 <1151451036@qq.com>
Fixes: https://bugs.launchpad.net/qemu/+bug/1838763
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
configure | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index fe3fef9309..040aa8eb6c 100755
--- a/configure
+++ b/configure
@@ -3949,18 +3949,24 @@ fi
if test "$libssh" = "yes"; then
cat > $TMPC <<EOF
#include <libssh/libssh.h>
+#ifdef HAVE_LIBSSH_0_8
+static const enum ssh_known_hosts_e val = SSH_KNOWN_HOSTS_OK;
+#endif
#ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
int main(void) { return ssh_get_server_publickey(NULL, NULL); }
#else
int main(void) { return ssh_get_publickey(NULL, NULL); }
#endif
EOF
- if compile_object "$libssh_cflags"; then
+ if compile_object "$libssh_cflags -DHAVE_LIBSSH_0_8"; then
libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
fi
if compile_object "$libssh_cflags -DHAVE_SSH_GET_SERVER_PUBLICKEY"; then
libssh_cflags="-DHAVE_SSH_GET_SERVER_PUBLICKEY $libssh_cflags"
fi
+ if ! compile_object "$libssh_cflags"; then
+ error_exit "cannot use with libssh (is it broken?)"
+ fi
fi
##########################################
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8
2019-08-14 12:15 ` [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8 Philippe Mathieu-Daudé
@ 2019-08-14 12:39 ` Pino Toscano
0 siblings, 0 replies; 16+ messages in thread
From: Pino Toscano @ 2019-08-14 12:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, qemu-block, qemu-devel, Richard W . M . Jones,
Max Reitz, 周文青,
Alex Bennée
[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]
On Wednesday, 14 August 2019 14:15:26 CEST Philippe Mathieu-Daudé wrote:
> To figure out which libssh version is installed, checking for
> ssh_get_server_publickey() is not sufficient.
>
> ssh_get_server_publickey() has been introduced in libssh
> commit bbd052202 (predating 0.8) but distributions also
> backported other pre-0.8 patches, such libssh commit
> 963c46e4f which introduce the ssh_known_hosts_e enum.
>
> Check the enum is available to assume the version is 0.8.
>
> This fixes build failure on Ubuntu 18.04:
>
> 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;
> ^~~~~
> rules.mak:69: recipe for target 'block/ssh.o' failed
> make: *** [block/ssh.o] Error 1
>
> Reported-by: 周文青 <1151451036@qq.com>
> Fixes: https://bugs.launchpad.net/qemu/+bug/1838763
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> configure | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index fe3fef9309..040aa8eb6c 100755
> --- a/configure
> +++ b/configure
> @@ -3949,18 +3949,24 @@ fi
> if test "$libssh" = "yes"; then
> cat > $TMPC <<EOF
> #include <libssh/libssh.h>
> +#ifdef HAVE_LIBSSH_0_8
> +static const enum ssh_known_hosts_e val = SSH_KNOWN_HOSTS_OK;
> +#endif
> #ifdef HAVE_SSH_GET_SERVER_PUBLICKEY
> int main(void) { return ssh_get_server_publickey(NULL, NULL); }
> #else
> int main(void) { return ssh_get_publickey(NULL, NULL); }
> #endif
> EOF
> - if compile_object "$libssh_cflags"; then
> + if compile_object "$libssh_cflags -DHAVE_LIBSSH_0_8"; then
> libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
> fi
> if compile_object "$libssh_cflags -DHAVE_SSH_GET_SERVER_PUBLICKEY"; then
> libssh_cflags="-DHAVE_SSH_GET_SERVER_PUBLICKEY $libssh_cflags"
> fi
> + if ! compile_object "$libssh_cflags"; then
> + error_exit "cannot use with libssh (is it broken?)"
> + fi
Ugh no, this is way more twisted and complex than really needed.
Instead, just add another build time check for
ssh_session_is_known_server, and change check_host_key_knownhosts to
use it only when found.
--
Pino Toscano
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected
2019-08-14 12:15 [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2019-08-14 12:15 ` [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8 Philippe Mathieu-Daudé
@ 2019-08-14 12:15 ` Philippe Mathieu-Daudé
2019-08-14 12:29 ` Richard W.M. Jones
2019-08-14 12:41 ` Pino Toscano
2019-08-14 16:45 ` [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 no-reply
4 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:15 UTC (permalink / raw)
To: Richard W . M . Jones, qemu-devel, Pino Toscano
Cc: Kevin Wolf, qemu-block, Alex Bennée, Max Reitz,
周文青, Philippe Mathieu-Daudé
Log wether the version is 0.7 or 0.8 to better understand
user reports.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
configure | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 040aa8eb6c..d06cee0ba0 100755
--- a/configure
+++ b/configure
@@ -3930,6 +3930,7 @@ if test "$libssh" != "no" ; then
if $pkg_config --exists libssh; then
libssh_cflags=$($pkg_config libssh --cflags)
libssh_libs=$($pkg_config libssh --libs)
+ libssh_version=$($pkg_config libssh --modversion)
libssh=yes
else
if test "$libssh" = "yes" ; then
@@ -3960,6 +3961,9 @@ int main(void) { return ssh_get_publickey(NULL, NULL); }
EOF
if compile_object "$libssh_cflags -DHAVE_LIBSSH_0_8"; then
libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
+ else
+ # If this is not libssh 0.8, this is likely 0.7
+ libssh_version="0.7"
fi
if compile_object "$libssh_cflags -DHAVE_SSH_GET_SERVER_PUBLICKEY"; then
libssh_cflags="-DHAVE_SSH_GET_SERVER_PUBLICKEY $libssh_cflags"
@@ -6466,7 +6470,7 @@ echo "GlusterFS support $glusterfs"
echo "gcov $gcov_tool"
echo "gcov enabled $gcov"
echo "TPM support $tpm"
-echo "libssh support $libssh"
+echo "libssh support $libssh $(echo_version $libssh $libssh_version)"
echo "QOM debugging $qom_cast_debug"
echo "Live block migration $live_block_migration"
echo "lzo support $lzo"
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected
2019-08-14 12:15 ` [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected Philippe Mathieu-Daudé
@ 2019-08-14 12:29 ` Richard W.M. Jones
2019-08-14 12:41 ` Pino Toscano
1 sibling, 0 replies; 16+ messages in thread
From: Richard W.M. Jones @ 2019-08-14 12:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, qemu-block, qemu-devel, Max Reitz,
周文青,
Pino Toscano, Alex Bennée
The series seems fine, so:
Acked-by: Richard W.M. Jones <rjones@redhat.com>
If it was me I'd be inclined to file a bug against Ubuntu and get them
to fix their broken package instead :-)
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected
2019-08-14 12:15 ` [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected Philippe Mathieu-Daudé
2019-08-14 12:29 ` Richard W.M. Jones
@ 2019-08-14 12:41 ` Pino Toscano
1 sibling, 0 replies; 16+ messages in thread
From: Pino Toscano @ 2019-08-14 12:41 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, qemu-block, qemu-devel, Richard W . M . Jones,
Max Reitz, 周文青,
Alex Bennée
[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]
On Wednesday, 14 August 2019 14:15:27 CEST Philippe Mathieu-Daudé wrote:
> Log wether the version is 0.7 or 0.8 to better understand
> user reports.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> configure | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 040aa8eb6c..d06cee0ba0 100755
> --- a/configure
> +++ b/configure
> @@ -3930,6 +3930,7 @@ if test "$libssh" != "no" ; then
> if $pkg_config --exists libssh; then
> libssh_cflags=$($pkg_config libssh --cflags)
> libssh_libs=$($pkg_config libssh --libs)
> + libssh_version=$($pkg_config libssh --modversion)
> libssh=yes
> else
> if test "$libssh" = "yes" ; then
> @@ -3960,6 +3961,9 @@ int main(void) { return ssh_get_publickey(NULL, NULL); }
> EOF
> if compile_object "$libssh_cflags -DHAVE_LIBSSH_0_8"; then
> libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
> + else
> + # If this is not libssh 0.8, this is likely 0.7
> + libssh_version="0.7"
> fi
Not sure why this though -- please leave it out, and just log the
version as found.
--
Pino Toscano
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04
2019-08-14 12:15 [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2019-08-14 12:15 ` [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected Philippe Mathieu-Daudé
@ 2019-08-14 16:45 ` no-reply
4 siblings, 0 replies; 16+ messages in thread
From: no-reply @ 2019-08-14 16:45 UTC (permalink / raw)
To: philmd
Cc: kwolf, qemu-block, qemu-devel, philmd, rjones, ptoscano,
1151451036, mreitz, alex.bennee
Patchew URL: https://patchew.org/QEMU/20190814121527.17876-1-philmd@redhat.com/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===
Configure options:
--enable-werror --target-list=x86_64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --enable-debug --enable-sanitizers --cxx=clang++ --cc=clang --host-cc=clang
ERROR: configure test passed without -Werror but failed with -Werror.
This is probably a bug in the configure script. The failing command
will be at the bottom of config.log.
You can run configure with --disable-werror to bypass this check.
---
funcs: do_compiler do_cc compile_object check_define main
lines: 92 122 627 696 0
clang -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: __i386__ not defined
#error __i386__ not defined
^
1 error generated.
---
funcs: do_compiler do_cc compile_object check_define main
lines: 92 122 627 699 0
clang -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: __ILP32__ not defined
#error __ILP32__ not defined
^
1 error generated.
---
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 92 128 1958 1962 0
clang -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Werror -Wold-style-declaration -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -g
error: unknown warning option '-Wold-style-declaration'; did you mean '-Wout-of-line-declaration'? [-Werror,-Wunknown-warning-option]
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 92 128 1958 1962 0
---
funcs: do_compiler do_cc compile_prog main
lines: 92 128 2400 0
clang -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -llzfse
config-temp/qemu-conf.c:1:10: fatal error: 'lzfse.h' file not found
#include <lzfse.h>
^~~~~~~~~
1 error generated.
---
funcs: do_compiler do_cc compile_prog main
lines: 92 128 2981 0
clang -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -lpam
config-temp/qemu-conf.c:1:10: fatal error: 'security/pam_appl.h' file not found
#include <security/pam_appl.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
---
funcs: do_compiler do_cc compile_prog main
lines: 92 128 3313 0
clang -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g
config-temp/qemu-conf.c:2:10: fatal error: 'xfs/xfs.h' file not found
#include <xfs/xfs.h>
^~~~~~~~~~~
1 error generated.
---
funcs: do_compiler do_cc compile_prog main
lines: 92 128 3337 0
clang -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -lvdeplug
config-temp/qemu-conf.c:1:10: fatal error: 'libvdeplug.h' file not found
#include <libvdeplug.h>
^~~~~~~~~~~~~~
1 error generated.
---
funcs: do_compiler do_cc compile_prog main
lines: 92 128 3900 0
clang -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g
config-temp/qemu-conf.c:3:52: error: too few arguments to function call, expected 2, have 1
static void *f(void *p) { pthread_setname_np("QEMU"); }
~~~~~~~~~~~~~~~~~~ ^
/usr/include/pthread.h:452:1: note: 'pthread_setname_np' declared here
---
funcs: do_compiler do_cc compile_object main
lines: 92 122 3962 0
clang -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -DHAVE_LIBSSH_0_8 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:8:25: warning: 'ssh_get_publickey' is deprecated [-Wdeprecated-declarations]
int main(void) { return ssh_get_publickey(NULL, NULL); }
^
/usr/include/libssh/libssh.h:545:1: note: 'ssh_get_publickey' has been explicitly marked deprecated here
---
/usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECATED'
#define SSH_DEPRECATED __attribute__ ((deprecated))
^
config-temp/qemu-conf.c:3:37: warning: unused variable 'val' [-Wunused-const-variable]
static const enum ssh_known_hosts_e val = SSH_KNOWN_HOSTS_OK;
^
2 warnings generated.
clang -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -DHAVE_LIBSSH_0_8 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:8:25: error: 'ssh_get_publickey' is deprecated [-Werror,-Wdeprecated-declarations]
int main(void) { return ssh_get_publickey(NULL, NULL); }
^
/usr/include/libssh/libssh.h:545:1: note: 'ssh_get_publickey' has been explicitly marked deprecated here
The full log is available at
http://patchew.org/logs/20190814121527.17876-1-philmd@redhat.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 16+ messages in thread