qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PULL 29/86] meson: move libudev test
Date: Thu, 1 Oct 2020 18:55:24 +0200	[thread overview]
Message-ID: <5eba8be2-0076-025a-2e21-281427b69d23@redhat.com> (raw)
In-Reply-To: <CAFEAcA98nJiysUkGEUaq4OMJ815pQRTKz4TWxZFHqzzNX2r2uw@mail.gmail.com>

On 01/10/20 18:19, Peter Maydell wrote:
> 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. [...]
> 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?

Paolo



  reply	other threads:[~2020-10-01 17:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
2020-10-01 16:19   ` Peter Maydell
2020-10-01 16:55     ` Paolo Bonzini [this message]
2020-10-01 18:51       ` Peter Maydell
2020-10-01 19:15         ` Paolo Bonzini
2020-09-30 19:58 ` [PULL 30/86] meson: move libmpathpersist test Paolo Bonzini
2020-09-30 19:58 ` [PULL 31/86] meson: extend libmpathpersist test for static linking Paolo Bonzini
2020-10-01 14:28 ` [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Peter Maydell
2020-10-01 15:41   ` 罗勇刚(Yonggang Luo)
2020-10-02 15:58 ` Michal Prívozník
2020-10-02 16:22   ` Eduardo Habkost
2020-10-02 17:26     ` Michal Prívozník
2020-10-02 17:30       ` Paolo Bonzini
2020-10-02 17:55         ` Eduardo Habkost
2020-10-02 16:27   ` Paolo Bonzini
2020-10-02 17:01     ` Eduardo Habkost
2020-10-02 18:24     ` Eduardo Habkost
2020-10-02 18:45       ` Paolo Bonzini
2020-10-02 18:52         ` Peter Maydell
2020-10-07 10:57       ` Michal Privoznik

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=5eba8be2-0076-025a-2e21-281427b69d23@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).