[PATCH 19/24] configure: set the meson executable suffix/ext

marcandre.lureau@redhat.com posted 24 patches 1 week, 2 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Yonggang Luo <luoyonggang@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Kohei Tokunaga <ktokunaga.mail@gmail.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Ed Maste <emaste@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>
There is a newer version of this series
[PATCH 19/24] configure: set the meson executable suffix/ext
Posted by marcandre.lureau@redhat.com 1 week, 2 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 8d84e3c5c0..7b1795ab29 100755
--- a/configure
+++ b/configure
@@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
 # We ignore PATH completely here: we want to use the venv's Meson
 # *exclusively*.
 
-meson="$(cd pyvenv/bin; pwd)/meson"
+# for msys2
+get_pwd() {
+    if pwd -W >/dev/null 2>&1; then
+        pwd -W
+    else
+        pwd
+    fi
+}
+
+meson="$(cd pyvenv/bin; get_pwd)/meson"
+if [ -f "$meson$EXESUF" ]; then
+  meson="$meson$EXESUF"
+fi
 
 # Conditionally ensure Sphinx is installed.
 
-- 
2.51.0


Re: [PATCH 19/24] configure: set the meson executable suffix/ext
Posted by Daniel P. Berrangé 1 week, 2 days ago
On Fri, Sep 19, 2025 at 05:33:13PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>


Please actually the reason why the change is needed. The code
change seems related to msys2 / Windows, but our CI is already
covering this and so what's broken ?


> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  configure | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 8d84e3c5c0..7b1795ab29 100755
> --- a/configure
> +++ b/configure
> @@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
>  # We ignore PATH completely here: we want to use the venv's Meson
>  # *exclusively*.
>  
> -meson="$(cd pyvenv/bin; pwd)/meson"
> +# for msys2
> +get_pwd() {
> +    if pwd -W >/dev/null 2>&1; then
> +        pwd -W
> +    else
> +        pwd
> +    fi
> +}
> +
> +meson="$(cd pyvenv/bin; get_pwd)/meson"
> +if [ -f "$meson$EXESUF" ]; then
> +  meson="$meson$EXESUF"
> +fi
>  
>  # Conditionally ensure Sphinx is installed.
>  
> -- 
> 2.51.0
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH 19/24] configure: set the meson executable suffix/ext
Posted by Marc-André Lureau 6 days, 4 hours ago
Hi

On Fri, Sep 19, 2025 at 6:41 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Fri, Sep 19, 2025 at 05:33:13PM +0400, marcandre.lureau@redhat.com
> wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
>
> Please actually the reason why the change is needed. The code
> change seems related to msys2 / Windows, but our CI is already
> covering this and so what's broken ?
>

It doesn't cover --enable-rust yet:

../rust/meson.build:41:2: ERROR: Program
'/c/Users/User/qemu/build/pyvenv/bin/meson' not found or not executable


>
>
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  configure | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 8d84e3c5c0..7b1795ab29 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir
> "${source_path}/python/wheels" \
> >  # We ignore PATH completely here: we want to use the venv's Meson
> >  # *exclusively*.
> >
> > -meson="$(cd pyvenv/bin; pwd)/meson"
> > +# for msys2
> > +get_pwd() {
> > +    if pwd -W >/dev/null 2>&1; then
> > +        pwd -W
> > +    else
> > +        pwd
> > +    fi
> > +}
> > +
> > +meson="$(cd pyvenv/bin; get_pwd)/meson"
> > +if [ -f "$meson$EXESUF" ]; then
> > +  meson="$meson$EXESUF"
> > +fi
> >
> >  # Conditionally ensure Sphinx is installed.
> >
> > --
> > 2.51.0
> >
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>
Re: [PATCH 19/24] configure: set the meson executable suffix/ext
Posted by Daniel P. Berrangé 6 days, 4 hours ago
On Mon, Sep 22, 2025 at 02:34:25PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Fri, Sep 19, 2025 at 6:41 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> 
> > On Fri, Sep 19, 2025 at 05:33:13PM +0400, marcandre.lureau@redhat.com
> > wrote:
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> >
> > Please actually the reason why the change is needed. The code
> > change seems related to msys2 / Windows, but our CI is already
> > covering this and so what's broken ?
> >
> 
> It doesn't cover --enable-rust yet:
> 
> ../rust/meson.build:41:2: ERROR: Program
> '/c/Users/User/qemu/build/pyvenv/bin/meson' not found or not executable

So it is is called meson.exe on Windows, even though it is a
script, not an executable ?

Can you put all this info in the commit message.

> 
> 
> >
> >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > ---
> > >  configure | 14 +++++++++++++-
> > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/configure b/configure
> > > index 8d84e3c5c0..7b1795ab29 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir
> > "${source_path}/python/wheels" \
> > >  # We ignore PATH completely here: we want to use the venv's Meson
> > >  # *exclusively*.
> > >
> > > -meson="$(cd pyvenv/bin; pwd)/meson"
> > > +# for msys2
> > > +get_pwd() {
> > > +    if pwd -W >/dev/null 2>&1; then
> > > +        pwd -W
> > > +    else
> > > +        pwd
> > > +    fi
> > > +}
> > > +
> > > +meson="$(cd pyvenv/bin; get_pwd)/meson"
> > > +if [ -f "$meson$EXESUF" ]; then
> > > +  meson="$meson$EXESUF"
> > > +fi
> > >
> > >  # Conditionally ensure Sphinx is installed.
> > >
> > > --
> > > 2.51.0
> > >
> >
> > With regards,
> > Daniel
> > --
> > |: https://berrange.com      -o-
> > https://www.flickr.com/photos/dberrange :|
> > |: https://libvirt.org         -o-
> > https://fstop138.berrange.com :|
> > |: https://entangle-photo.org    -o-
> > https://www.instagram.com/dberrange :|
> >
> >

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH 19/24] configure: set the meson executable suffix/ext
Posted by Marc-André Lureau 6 days, 4 hours ago
Hi

On Mon, Sep 22, 2025 at 2:42 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Sep 22, 2025 at 02:34:25PM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Fri, Sep 19, 2025 at 6:41 PM Daniel P. Berrangé <berrange@redhat.com>
> > wrote:
> >
> > > On Fri, Sep 19, 2025 at 05:33:13PM +0400, marcandre.lureau@redhat.com
> > > wrote:
> > > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > >
> > > Please actually the reason why the change is needed. The code
> > > change seems related to msys2 / Windows, but our CI is already
> > > covering this and so what's broken ?
> > >
> >
> > It doesn't cover --enable-rust yet:
> >
> > ../rust/meson.build:41:2: ERROR: Program
> > '/c/Users/User/qemu/build/pyvenv/bin/meson' not found or not executable
>
> So it is is called meson.exe on Windows, even though it is a
> script, not an executable ?

It's a PE EXE. I don't know how it works there.

> Can you put all this info in the commit message.

sure

> >
> >
> > >
> > >
> > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > > ---
> > > >  configure | 14 +++++++++++++-
> > > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/configure b/configure
> > > > index 8d84e3c5c0..7b1795ab29 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -1000,7 +1000,19 @@ $mkvenv ensuregroup --dir
> > > "${source_path}/python/wheels" \
> > > >  # We ignore PATH completely here: we want to use the venv's Meson
> > > >  # *exclusively*.
> > > >
> > > > -meson="$(cd pyvenv/bin; pwd)/meson"
> > > > +# for msys2
> > > > +get_pwd() {
> > > > +    if pwd -W >/dev/null 2>&1; then
> > > > +        pwd -W
> > > > +    else
> > > > +        pwd
> > > > +    fi
> > > > +}
> > > > +
> > > > +meson="$(cd pyvenv/bin; get_pwd)/meson"
> > > > +if [ -f "$meson$EXESUF" ]; then
> > > > +  meson="$meson$EXESUF"
> > > > +fi
> > > >
> > > >  # Conditionally ensure Sphinx is installed.
> > > >
> > > > --
> > > > 2.51.0
> > > >
> > >
> > > With regards,
> > > Daniel
> > > --
> > > |: https://berrange.com      -o-
> > > https://www.flickr.com/photos/dberrange :|
> > > |: https://libvirt.org         -o-
> > > https://fstop138.berrange.com :|
> > > |: https://entangle-photo.org    -o-
> > > https://www.instagram.com/dberrange :|
> > >
> > >
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>
>


-- 
Marc-André Lureau