On Fri, 19 May 2023 at 18:31, Paolo Bonzini <pbonz...@redhat.com> wrote:
>
> On 5/19/23 19:01, Peter Maydell wrote:
> >> Can you send your config-host.mak after a failed rebuild? I think
> >> what's happening is that the path to meson has changed but Makefile
> >> still tries the old one (which could be the system meson in
> >> /usr/bin).
> >
> > Attached; it has
> > MESON=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/pyvenv/bin/meson
> >
> >  That meson says: $
> > /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/pyvenv/bin/meson 
> > --version>
> > 1.1.0 is neither the system meson (which is 0.61.2) nor the version
> > the build system wants (0.63.0) nor the version that it complains
> > that it's found (0.61.5), so I'm not sure what's going on there...
>
> 1.1.0 must be something you have cached somewhere

Well, I've never done anything with meson except use whatever
the QEMU build system provides...

> but 0.61.5 comes from
> the old submodule.  You should be able to find it with
>
> grep -wA2 'rule REGENERATE_BUILD' ../build.ninja

Yep:

$ grep -wA2 'rule REGENERATE_BUILD' build/x86-tgts/build.ninja
rule REGENERATE_BUILD
 command = /usr/bin/python3
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/meson/meson.py --internal
regenerate /mnt/nvmedisk/linaro/qemu-from-laptop/qemu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts --backend
ninja
 description = Regenerating build files.

$ /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/meson/meson.py --version
0.61.5

> You should be able to unhose the directory with
>
> pyvenv/bin/meson setup --reconfigure ../..
>
> (where ../.. should be the path to the sources) or even with the patch:
>
> diff --git a/Makefile b/Makefile
> index 3c7d67142f13..08fb6a3b058a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -115,15 +115,15 @@ Makefile.ninja: build.ninja
>           $(NINJA) -t query build.ninja | sed -n '1,/^  input:/d; /^  
> outputs:/q; s/$$/ \\/p'; \
>         } > $@.tmp && mv $@.tmp $@
>   -include Makefile.ninja
> +endif
>
> +ifneq ($(MESON),)
>   # A separate rule is needed for Makefile dependencies to avoid -n
>   build.ninja: build.ninja.stamp
>   $(build-files):
>   build.ninja.stamp: meson.stamp $(build-files)
> -       $(NINJA) $(if $V,-v,) build.ninja && touch $@
> -endif
> +       $(MESON) setup --reconfigure $(SRC_PATH) && touch $@
>
> -ifneq ($(MESON),)
>   Makefile.mtest: build.ninja scripts/mtest2make.py
>         $(MESON) introspect --targets --tests --benchmarks | $(PYTHON) 
> scripts/mtest2make.py > $@
>   -include Makefile.mtest

This patch doesn't work, I'm afraid:

$ make -C build/x86-tgts/
make: Entering directory
'/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts'
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/pyvenv/bin/meson
setup --reconfigure /mnt/nvmedisk/linaro/qemu-from-laptop/qemu &&
touch build.ninja.stamp
WARNING: Regenerating configuration from scratch.
Reason: Coredata file
'/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/meson-private/coredata.dat'
references functions or classes that don't exist. This probably means
that it was generated with an old version of meson. Try running from
the source directory meson setup
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts --wipe
The Meson build system
Version: 1.1.0
Source dir: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu
Build dir: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts
Build type: native build

../../meson.build:1:0: ERROR: Unknown options: "sphinx_build"

A full log can be found at
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/meson-logs/meson-log.txt
  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3
tests/fp/berkeley-softfloat-3 dtc
[0/1] Regenerating build files.
The Meson build system
Version: 0.61.5
Source dir: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu
Build dir: /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts
Build type: native build

../../meson.build:1:0: ERROR: Meson version is 0.61.5 but project
requires >=0.63.0

A full log can be found at
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts/meson-logs/meson-log.txt
ninja: error: rebuilding 'build.ninja': subcommand failed
FAILED: build.ninja
/usr/bin/python3
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/meson/meson.py --internal
regenerate /mnt/nvmedisk/linaro/qemu-from-laptop/qemu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts --backend
ninja
make: *** [Makefile:165: run-ninja] Error 1
make: Leaving directory
'/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86-tgts'

-- PMM

Reply via email to