qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Alexander Graf <agraf@csgraf.de>, Joelle van Dyne <j@getutm.app>
Subject: Re: [PATCH] configure: Move preadv check to meson.build
Date: Wed, 27 Jan 2021 22:49:41 +0100	[thread overview]
Message-ID: <b61b0309-e5b5-0fb7-ab23-85da66518692@redhat.com> (raw)
In-Reply-To: <20210126155846.17109-1-peter.maydell@linaro.org>

On 1/26/21 4:58 PM, Peter Maydell wrote:
> Move the preadv availability check to meson.build.  This is what we
> want to be doing for host-OS-feature-checks anyway, but it also fixes
> a problem with building for macOS with the most recent XCode SDK on a
> Catalina host.
> 
> On that configuration, 'preadv()' is provided as a weak symbol, so
> that programs can be built with optional support for it and make a
> runtime availability check to see whether the preadv() they have is a
> working one or one which they must not call because it will
> runtime-assert.  QEMU's configure test passes (unless you're building
> with --enable-werror) because the test program using preadv()
> compiles, but then QEMU crashes at runtime when preadv() is called,
> with errors like:
> 
>   dyld: lazy symbol binding failed: Symbol not found: _preadv
>     Referenced from: /Users/pm215/src/qemu/./build/x86/tests/test-replication
>     Expected in: /usr/lib/libSystem.B.dylib
> 
>   dyld: Symbol not found: _preadv
>     Referenced from: /Users/pm215/src/qemu/./build/x86/tests/test-replication
>     Expected in: /usr/lib/libSystem.B.dylib
> 
> Meson's own function availability check has a special case for macOS
> which adds '-Wl,-no_weak_imports' to the compiler flags, which forces
> the test to require the real function, not the macOS-version-too-old
> stub.
> 
> So this commit fixes the bug where macOS builds on Catalina currently
> require --disable-werror.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  configure   | 16 ----------------
>  meson.build |  4 +++-
>  2 files changed, 3 insertions(+), 17 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



  parent reply	other threads:[~2021-01-27 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 15:58 [PATCH] configure: Move preadv check to meson.build Peter Maydell
2021-01-26 16:34 ` Paolo Bonzini
2021-01-27 21:49 ` Philippe Mathieu-Daudé [this message]
2021-01-28 12:15   ` Peter Maydell

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=b61b0309-e5b5-0fb7-ab23-85da66518692@redhat.com \
    --to=philmd@redhat.com \
    --cc=agraf@csgraf.de \
    --cc=j@getutm.app \
    --cc=pbonzini@redhat.com \
    --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).