Am Fr., 23. Mai 2025 um 23:28 Uhr schrieb Paolo Bonzini <pbonz...@redhat.com>: > > Thanks for the patch! The Windows build configurations that we support > currently are cross-building from Linux and native build with MSYS2. > MSYS2 is sufficiently POSIX-like, and also has a nice package manager. > > Can you share how you set up your build environment, and especially > where you get all the dependencies? Generally we'd prefer to have it > covered in CI to avoid that it breaks again.
I use MSYS2, but I only use `bash` it to run `configure` initially and afterwards I use `cmd.exe` for running Meson and Ninja. > Some more comments below. > > > import os.path > > +from pathlib import PurePath > > > > from tracetool import out > > > > @@ -30,6 +31,12 @@ def generate_h(event, group): > > if len(event.args) > 0: > > argnames = ", " + argnames > > > > + try: > > + event_filename = os.path.relpath(event.filename) > > + except ValueError: > > + event_filename = event.filename > > Can this actually happen during the build? (Same for other backends) I only tested with the `log` backend. [18/1577] Generating trace/trace-crypto.h with a custom command FAILED: trace/trace-crypto.h "C:\msys64\mingw64\bin\python.exe" "C:/src/qemu/scripts/tracetool.py" "--backend=log" "--group=crypto" "--format=h" "C:/src/qemu/crypto/trace-events" "trace/trace-crypto.h" Traceback (most recent call last): File "C:/src/qemu/scripts/tracetool.py", line 140, in <module> main(sys.argv) File "C:/src/qemu/scripts/tracetool.py", line 134, in main tracetool.generate(events, arg_group, arg_format, arg_backends, File "C:\src\qemu\scripts\tracetool\__init__.py", line 449, in generate tracetool.format.generate(events, format, backend, group) File "C:\src\qemu\scripts\tracetool\format\__init__.py", line 84, in generate func(events, backend, group) File "C:\src\qemu\scripts\tracetool\format\h.py", line 70, in generate backend.generate(e, group) File "C:\src\qemu\scripts\tracetool\backend\__init__.py", line 119, in generate self._run_function("generate_%s", event, group) File "C:\src\qemu\scripts\tracetool\backend\__init__.py", line 113, in _run_function func(*args, **kwargs) File "C:\src\qemu\scripts\tracetool\backend\log.py", line 58, in generate_h event_filename=os.path.relpath(event.filename), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen ntpath>", line 808, in relpath ValueError: path is on mount 'C:', start on mount 'E:' > > diff --git a/tests/functional/meson.build b/tests/functional/meson.build > > index 52b4706cf..2e3bd4057 100644 > > --- a/tests/functional/meson.build > > +++ b/tests/functional/meson.build > > @@ -413,4 +413,4 @@ endforeach > > > > run_target('precache-functional', > > depends: precache_all, > > - command: ['true']) > > + command: [python, '-c', '']) > > I wonder if this can be replaced with alias_target() too; and also the > pre-existing code suggests that alias_target needs at least one target, > but is that really true? > > So, maybe all or most uses of 'true' can just go away. I could replace this one with `alias_target()`, but it does need at least one dependency so I could not replace the others. Best regards Oleg Tolmatcev