All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Peter Lieven <pl@kamp.de>,
	ct@flyingcircus.io, mreitz@redhat.com, pbonzini@redhat.com,
	dillaman@redhat.com
Subject: Re: [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous release
Date: Mon, 15 Feb 2021 10:19:11 +0000	[thread overview]
Message-ID: <20210215101911.GA1542881@redhat.com> (raw)
In-Reply-To: <20210215101123.GC7226@merkur.fritz.box>

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);
> > +        #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.

Yep, for something that is merely a version number check there's no
need to compile anything. pkg-config can just validate the version
straightup.

> 
> > -      }''', 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

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2021-02-15 10:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 11:25 [PATCH V2 0/7] block/rbd: migrate to coroutines and add write zeroes support Peter Lieven
2021-01-26 11:25 ` [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous release Peter Lieven
2021-02-15 10:11   ` Kevin Wolf
2021-02-15 10:19     ` Daniel P. Berrangé [this message]
2021-02-15 11:34       ` Peter Lieven
2021-02-15 12:17         ` Kevin Wolf
2021-02-15 10:24   ` Daniel P. Berrangé
2021-02-15 11:32     ` Peter Lieven
2021-02-15 11:41       ` Daniel P. Berrangé
2021-02-15 11:45         ` Peter Lieven
2021-02-15 11:51           ` Daniel P. Berrangé
2021-02-15 11:55             ` Peter Lieven
2021-02-15 12:02               ` Daniel P. Berrangé
2021-02-15 12:13           ` Kevin Wolf
2021-02-15 13:28             ` Peter Lieven
2021-02-22 21:48               ` Jason Dillaman
2021-01-26 11:25 ` [PATCH V2 2/7] block/rbd: store object_size in BDRVRBDState Peter Lieven
2021-01-26 11:25 ` [PATCH V2 3/7] block/rbd: update s->image_size in qemu_rbd_getlength Peter Lieven
2021-01-26 11:25 ` [PATCH V2 4/7] block/rbd: add bdrv_attach_aio_context Peter Lieven
2021-02-15 10:20   ` Kevin Wolf
2021-02-15 11:48     ` Peter Lieven
2021-01-26 11:25 ` [PATCH V2 5/7] block/rbd: migrate from aio to coroutines Peter Lieven
2021-01-26 11:25 ` [PATCH V2 6/7] block/rbd: add write zeroes support Peter Lieven
2021-01-26 11:25 ` [PATCH V2 7/7] block/rbd: drop qemu_rbd_refresh_limits 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=20210215101911.GA1542881@redhat.com \
    --to=berrange@redhat.com \
    --cc=ct@flyingcircus.io \
    --cc=dillaman@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --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.