[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous releas

From: Peter Lieven
Subject: Re: [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous release
Date: Mon, 15 Feb 2021 12:34:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Am 15.02.21 um 11:19 schrieb Daniel P. Berrangé:
On Mon, Feb 15, 2021 at 11:11:23AM +0100, Kevin Wolf wrote:
Am 26.01.2021 um 12:25 hat Peter Lieven geschrieben:
even luminous (version 12.2) is unmaintained for over 3 years now.
Bump the requirement to get rid of the ifdef'ry in the code.

Signed-off-by: Peter Lieven <pl@kamp.de>
diff --git a/meson.build b/meson.build
index 5943aa8a51..02d263ad33 100644
--- a/meson.build
+++ b/meson.build
@@ -691,19 +691,24 @@ if not get_option('rbd').auto() or have_block
                             required: get_option('rbd'),
                             kwargs: static_kwargs)
    if librados.found() and librbd.found()
-    if cc.links('''
+    result = cc.run('''
Doesn't running compiled binaries break cross compilation?

        #include <stdio.h>
        #include <rbd/librbd.h>
        int main(void) {
          rados_t cluster;
          rados_create(&cluster, NULL);
+        rados_shutdown(cluster);
+        return 1;
+        #endif
          return 0;
Would #error achieve what you want without running the binary?

But most, if not all, other version checks use pkg-config instead of
trying to compile code, so that's probably what we should be doing here,
Yep, for something that is merely a version number check there's no
need to compile anything. pkg-config can just validate the version

I would have loved to, but at least the Ubuntu/Debian packages do not contain

pkg-config files. I can switch to #error, of course. My initial version of the 

distinguished between can't compile and version is too old. With #error we just

can say doesn't compile, but I think this would be ok.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]