qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 29/86] meson: move libudev test


From: Peter Maydell
Subject: Re: [PULL 29/86] meson: move libudev test
Date: Thu, 1 Oct 2020 19:51:55 +0100

On Thu, 1 Oct 2020 at 17:55, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 01/10/20 18:19, Peter Maydell wrote:
> > I'm not very confident about reading meson.build logic, but it
> > looks like this trusts meson/pkg-config to tell it about
> > whether it can do a static link against this library,
> > which doesn't work on my system, at least. (Ubuntu 18.04.4).
>
> Yes, and the same was of course true of pkg-config without meson.  You
> probably got the same warning that you reported on v7.
>
> In fact, my guess is that the "test $static != yes" was added in reply
> to a similar complaint; the commit that introduced it has a note that
> the test was added by the maintainer:
>
>     commit 3efac6ebb88e4d099f07fef65178ebaa595ae770
>     Author: Tomáš Golembiovský <tgolembi@redhat.com>
>     Date:   Tue Oct 23 13:23:10 2018 +0200
>
>     configure: add test for libudev
>
>     Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
>     Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>     *make libudev optional to avoid breaking existing build/test
>     environments
>     *disable libudev for --static builds
>     Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>
> But I don't think --static should affect the build this way, especially
> since libudev was the only library that had this test in the configure
> script (checked in 5.1).  Debian doesn't package "libgtk-3.a" either and
> yet GTK+ it is not special cased in the configure script, so I'm not
> sure what it is that makes libudev special.
>
> Do you actually build just with "--static"?  Or do you have a list of
> "--disable" options so you can add one more?

Yes, I have a lot of --disable-foo options. Ideally I wouldn't
need any, because our configure/build system would identify "there
isn't actually a static version of this dependency present"
rather than blindly trusting pkg-config when it lies to us.
(Is it possible to get Meson to just always do a "test that
a trivial program with these cflags and libs will build" as
part of whatever magic it does as part of dependency() ?
Or to have a qemu_dependency() wrapper that does ?)

The useful thing about libgtk is that it's pretty obvious
that the --disable option to use to stop QEMU linking to
it is --disable-gtk. It's much less obvious what would be
the --disable option to use to stop us linking against
libgio, or libudev, because those dependencies aren't closely
and obviously tied to QEMU features. So for that kind of
library dependency it's much more useful to have configure
do enough checks that it doesn't try to link against something
that doesn't exist.

thanks
-- PMM



reply via email to

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