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 17:19:46 +0100

On Wed, 30 Sep 2020 at 21:01, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure   | 14 --------------
>  meson.build |  7 ++++---
>  2 files changed, 4 insertions(+), 17 deletions(-)

Hi; this commit seems to have broken my static build.
Previously configure did not include libudev in the link
for a static build (there is no libudev.a, at least on my
system). Now it does, and then the link fails with
  /usr/bin/ld: cannot find -ludev

>  ##########################################
> -# Do we have libudev
> -if test "$libudev" != "no" ; then
> -  if $pkg_config libudev && test "$static" != "yes"; then
> -    libudev="yes"
> -    libudev_libs=$($pkg_config --libs libudev)
> -  else
> -    libudev="no"
> -  fi
> -fi

This is the old code, which doesn't enable libudev for
static builds.

> --- a/meson.build
> +++ b/meson.build
> @@ -257,8 +257,8 @@ if 'CONFIG_CURL' in config_host
>                              link_args: config_host['CURL_LIBS'].split())
>  endif
>  libudev = not_found
> -if 'CONFIG_LIBUDEV' in config_host
> -  libudev = declare_dependency(link_args: 
> config_host['LIBUDEV_LIBS'].split())
> +if targetos == 'linux' and (have_system or have_tools)
> +  libudev = dependency('libudev', static: enable_static)
>  endif

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).

>  brlapi = not_found
>  if 'CONFIG_BRLAPI' in config_host

thanks
-- PMM



reply via email to

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