All of lore.kernel.org
 help / color / mirror / Atom feed
* meson: problems building under msys2/mingw-w64 native
@ 2020-08-24 11:05 Mark Cave-Ayland
  2020-08-24 11:37 ` Gerd Hoffmann
  2020-08-24 13:18 ` Paolo Bonzini
  0 siblings, 2 replies; 13+ messages in thread
From: Mark Cave-Ayland @ 2020-08-24 11:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

Hi Paolo,

Yesterday I updated my msys2/mingw-w64 Windows 10 build environment for QEMU to the
latest git to see if I could get the meson build to work, and found a couple of issues:


1) Unable to launch build/ninjatool at the end of configure

At the very end of configure after the build variables are displayed the build would
terminate with the following stack trace:

Traceback (most recent call last):
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/mesonmain.py", line 131, in run
    return options.run_func(options)
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/msetup.py", line 245, in run
    app.generate()
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/msetup.py", line 159, in generate
    self._generate(env)
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/msetup.py", line 215, in _generate
    intr.backend.generate()
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/backend/ninjabackend.py", line 483,
in generate
    ninja = environment.detect_ninja_command_and_version(log=True)
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/environment.py", line 167, in
detect_ninja_command_and_version
    p, found = Popen_safe([n, '--version'])[0:2]
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/mesonlib.py", line 1197, in Popen_safe
    p, o, e = Popen_safe_legacy(args, write=write, stdout=stdout, stderr=stderr,
**kwargs)
  File "C:/msys64/home/Mark/qemu/meson/mesonbuild/mesonlib.py", line 1213, in
Popen_safe_legacy
    p = subprocess.Popen(args, universal_newlines=False, close_fds=False,
  File "C:/msys64/mingw64/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:/msys64/mingw64/lib/python3.8/subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application


I managed to catch up with some meson devs on IRC last night and they helped me
figure out the problem is trying to launch "ninja --version" from configure.

Within configure the default location to ninja is overridden via
"NINJA=$PWD/ninjatool $meson setup ..." and subprocess.Popen() sends the filename to
Win32's CreateProcess() which fails because ninjatool is not a native executable but
a shell script. Any thoughts as to what would be the best solution here?


2) GTK UI now depends on CONFIG_VTE

This one I spotted on my local Linux setup as I didn't have the libvte-dev package
installed and couldn't understand why I couldn't run QEMU with the GTK UI as I always
do, even though configure reported that it found the GTK library and headers.

A quick search showed that the GTK UI was being guarded by "if
config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE')" in
ui/meson.build.

For me the easy solution was to install libvte-dev, but since there are no VTE
packages for Windows my guess is this will now make the GTK UI unavailable for
Windows users.


ATB,

Mark.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-08-27 16:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 11:05 meson: problems building under msys2/mingw-w64 native Mark Cave-Ayland
2020-08-24 11:37 ` Gerd Hoffmann
2020-08-25  7:51   ` Mark Cave-Ayland
2020-08-25  7:54     ` Paolo Bonzini
2020-08-25  8:24       ` 罗勇刚(Yonggang Luo)
2020-08-25  8:34         ` Paolo Bonzini
2020-08-25  8:37           ` 罗勇刚(Yonggang Luo)
2020-08-25 22:14           ` Mark Cave-Ayland
2020-08-26 15:34             ` Paolo Bonzini
2020-08-27 16:07               ` Mark Cave-Ayland
2020-08-24 13:18 ` Paolo Bonzini
2020-08-24 20:26   ` Mark Cave-Ayland
2020-08-25  7:49     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.