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 <p...@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); > + #if LIBRBD_VERSION_CODE < LIBRBD_VERSION(1, 12, 0) > + 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, too. > - }''', dependencies: [librbd, librados]) > + }''', dependencies: [librbd, librados], name: 'librbd version check') > + if result.compiled() and result.returncode() == 0 > rbd = declare_dependency(dependencies: [librbd, librados]) > elif get_option('rbd').enabled() > - error('could not link librados') > + error('librados/librbd >= 12.0.0 required') > else > - warning('could not link librados, disabling') > + warning('librados/librbd >= 12.0.0 not found, disabling rbd support') > endif > endif > endif Kevin