From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PULL v3 00/18] Rust initial PoC + meson changes for 2024-10-07
Date: Mon, 14 Oct 2024 12:54:46 +0200 [thread overview]
Message-ID: <CABgObfZXiYjRdJCeRewPho_Py0R+qSaXTGdK2_Sib3yTEzu_2A@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-hhdXwfD6Bn5yR6by3h-SkYaNd6dsj8d7J-zc2zK7E8Q@mail.gmail.com>
On Mon, Oct 14, 2024 at 12:40 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 14 Oct 2024 at 11:12, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Fri, 11 Oct 2024 at 18:13, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > > v2->v3: new patches
> > > - scripts/archive-source: find directory name for subprojects
> > > - docs: fix invalid footnote syntax
> > > - docs: avoid footnotes consisting of just URLs
> > > - docs: use consistent markup for footnotes
> > >
> > > ----------------------------------------------------------------
> > > * first commit for Rust support
> > > * add CI job using Fedora + Rust nightly
> > > * fix detection of ATOMIC128 on x86_64
> > > * fix compilation with Sphinx 8.1.0
>
> > Applied, thanks.
>
> With this applied, I find that on one of my personal
> local dev branches an incremental rebuild fails, because
> meson complains about not finding a new enough bindgen,
> even though I did not --enable-rust. Meson also complains
> about a bogus coredata.dat and we end up running meson
> three times before it eventually decides the error is fatal.
The report of coredata.dat is just a warning that it's not able to use
any cached data, which is expected when bumping the Meson version.
It's definitely going in the "if have_rust and have_system" path. If
you have the meson-logs/meson-log.txt and meson-private/cmd_line.txt
files, they can help debugging. I'd expect a "rust = disabled" line in
the latter... but yes I see what's happening. The
test "$rust" != "auto" && meson_option_add "-Drust=$rust"
line is only executed when configure runs meson. Here it doesn't, and
Makefile just tells Meson to reconfigure itself. Meson then gets the
command line options from either coredata.dat (which has everything
cached in Python's pickle format) or cmd_line.txt (slow path when
Meson version is upgraded), but neither knows about the rust option;
and the meson_options.txt default is 'auto'.
To sum up:
1) this is specific to incremental builds
2) this is *not* specific to the Meson version change, the
coredata.dat warning is a red herring
3) this (mangled) patch would fix it:
diff --git a/configure b/configure
index 3e38a91616a..8a9a4153310 100755
--- a/configure
+++ b/configure
@@ -1987,7 +1987,7 @@ if test "$skip_meson" = no; then
fi
# QEMU options
- test "$rust" != "auto" && meson_option_add "-Drust=$rust"
+ test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
diff --git a/meson_options.txt b/meson_options.txt
index 2211f291b2d..fc6d5526d58 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -372,5 +372,5 @@ option('hexagon_idef_parser', type : 'boolean',
value : true,
option('x86_version', type : 'combo', choices : ['0', '1', '2', '3',
'4'], value: '1',
description: 'tweak required x86_64 architecture version
beyond compiler default')
-option('rust', type: 'feature', value: 'auto',
+option('rust', type: 'feature', value: 'disabled',
description: 'Rust support')
and I can send it shortly; fortunately your tree never got a working
coredata.dat, so it hasn't stored anywhere the rust=auto value.
Paolo
Paolo
next prev parent reply other threads:[~2024-10-14 10:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 15:32 [PULL v3 00/18] Rust initial PoC + meson changes for 2024-10-07 Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 01/18] Require meson version 1.5.0 Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 02/18] build-sys: Add rust feature option Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 03/18] configure, meson: detect Rust toolchain Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 04/18] rust: add bindgen step as a meson dependency Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 05/18] .gitattributes: add Rust diff and merge attributes Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 06/18] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 07/18] rust: add crate to expose bindings and interfaces Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 08/18] scripts/archive-source: find directory name for subprojects Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 09/18] rust: add utility procedural macro crate Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 10/18] rust: add PL011 device model Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 11/18] meson: fix machine option for x86_version Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 12/18] meson: define qemu_isa_flags Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 13/18] meson: ensure -mcx16 is passed when detecting ATOMIC128 Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 14/18] dockerfiles: add a Dockerfile using a nightly Rust toolchain Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 15/18] gitlab-ci: add Rust-enabled CI job Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 16/18] docs: fix invalid footnote syntax Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 17/18] docs: avoid footnotes consisting of just URLs Paolo Bonzini
2024-10-11 15:32 ` [PULL v3 18/18] docs: use consistent markup for footnotes Paolo Bonzini
2024-10-12 10:54 ` [PULL v3 00/18] Rust initial PoC + meson changes for 2024-10-07 Peter Maydell
2024-10-12 14:02 ` Peter Maydell
2024-10-13 17:39 ` Paolo Bonzini
2024-10-14 10:12 ` Peter Maydell
2024-10-14 10:40 ` Peter Maydell
2024-10-14 10:54 ` Manos Pitsidianakis
2024-10-14 10:54 ` Paolo Bonzini [this message]
2024-10-14 10:57 ` Daniel P. Berrangé
2024-10-16 10:46 ` Marc-André Lureau
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=CABgObfZXiYjRdJCeRewPho_Py0R+qSaXTGdK2_Sib3yTEzu_2A@mail.gmail.com \
--to=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).