From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>,
dillaman@redhat.com,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
philmd@redhat.com
Subject: Re: configure does not detect librados or librbd since the switch to meson
Date: Mon, 25 Jan 2021 22:57:12 +0100 [thread overview]
Message-ID: <7499e47d-b3d9-5ca5-2321-45b04ba06fca@redhat.com> (raw)
In-Reply-To: <00855a0d-33e0-d835-e6e0-4d3af963975b@kamp.de>
On 25/01/21 20:47, Peter Lieven wrote:
>> Can you include the meson-logs/meson-log.txt output?
>
> Sure:https://pastebin.com/u3XtbDvQ
Does this work for you?
diff --git a/meson.build b/meson.build
index 690d48a6fd..a662772c4a 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,9 @@ config_host = keyval.load(meson.current_build_dir() /
'config-host.mak')
enable_modules = 'CONFIG_MODULES' in config_host
enable_static = 'CONFIG_STATIC' in config_host
+# Allow both shared and static libraries unless --enable-static
+static_kwargs = enable_static ? {'static': true} : {}
+
# Temporary directory used for files created while
# configure runs. Since it is in the build directory
# we can safely blow away any previous version of it
@@ -679,10 +682,10 @@ endif
rbd = not_found
if not get_option('rbd').auto() or have_block
librados = cc.find_library('rados', required: get_option('rbd'),
- static: enable_static)
+ kwargs: static_kwargs)
librbd = cc.find_library('rbd', has_headers: ['rbd/librbd.h'],
required: get_option('rbd'),
- static: enable_static)
+ kwargs: static_kwargs)
if librados.found() and librbd.found() and cc.links('''
#include <stdio.h>
#include <rbd/librbd.h>
@@ -693,6 +696,9 @@ if not get_option('rbd').auto() or have_block
}''', dependencies: [librbd, librados])
rbd = declare_dependency(dependencies: [librbd, librados])
endif
+ if not rbd.found() and get_option('rbd').enabled()
+ error('could not link librbd')
+ endif
endif
glusterfs = not_found
(It's not a complete patch, all instances of "static: enable_static"
would need to be changed because other libraries could have the same issue).
Thanks,
Paolo
next prev parent reply other threads:[~2021-01-25 21:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 14:13 configure does not detect librados or librbd since the switch to meson Peter Lieven
2021-01-25 14:31 ` Peter Lieven
2021-01-25 15:24 ` Paolo Bonzini
2021-01-25 19:47 ` Peter Lieven
2021-01-25 21:57 ` Paolo Bonzini [this message]
2021-01-25 22:20 ` Peter Lieven
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=7499e47d-b3d9-5ca5-2321-45b04ba06fca@redhat.com \
--to=pbonzini@redhat.com \
--cc=dillaman@redhat.com \
--cc=philmd@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.