qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pino Toscano <ptoscano@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	"Richard W . M . Jones" <rjones@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>, 周文青 <1151451036@qq.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check
Date: Wed, 14 Aug 2019 14:36:43 +0200	[thread overview]
Message-ID: <18212418.TTLG0Ac5hC@lindworm.usersys.redhat.com> (raw)
In-Reply-To: <20190814121527.17876-2-philmd@redhat.com>

[-- 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 --]

  reply	other threads:[~2019-08-14 12:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:36   ` Pino Toscano [this message]
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é
2019-08-14 14:51       ` Andrea Bolognani
2019-08-14 15:14         ` Philippe Mathieu-Daudé
2019-08-15  8:52           ` Andrea Bolognani
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
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
2019-08-14 16:45 ` [Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04 no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18212418.TTLG0Ac5hC@lindworm.usersys.redhat.com \
    --to=ptoscano@redhat.com \
    --cc=1151451036@qq.com \
    --cc=alex.bennee@linaro.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).