[PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross

Brian Cain posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260624054832.610697-1-brian.cain@oss.qualcomm.com
Maintainers: Kohei Tokunaga <ktokunaga.mail@gmail.com>, "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
1 file changed, 2 insertions(+)
[PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Brian Cain 1 month ago
The hexagon idef-parser requires flex and bison as host build
tools.  Add them to the emsdk-wasm64-cross container image so that
wasm64 builds including hexagon-softmmu can find them.

Link: https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
index 8a924816f92..5debbc77d08 100644
--- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
+++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
@@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
 ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
 RUN apt-get update && apt-get install -y \
     autoconf \
+    bison \
     build-essential \
+    flex \
     libglib2.0-dev \
     libtool \
     pkgconf \
-- 
2.34.1

Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Pierrick Bouvier 1 month ago
On 6/23/2026 10:48 PM, Brian Cain wrote:
> The hexagon idef-parser requires flex and bison as host build
> tools.  Add them to the emsdk-wasm64-cross container image so that
> wasm64 builds including hexagon-softmmu can find them.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> index 8a924816f92..5debbc77d08 100644
> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
>  ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
>  RUN apt-get update && apt-get install -y \
>      autoconf \
> +    bison \
>      build-essential \
> +    flex \
>      libglib2.0-dev \
>      libtool \
>      pkgconf \

Feel free to pull this directly as part of an Hexagon PR.

Regards,
Pierrick
Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Kohei Tokunaga 1 month ago
> The hexagon idef-parser requires flex and bison as host build
> tools.  Add them to the emsdk-wasm64-cross container image so that
> wasm64 builds including hexagon-softmmu can find them.
>
> Link:
https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> index 8a924816f92..5debbc77d08 100644
> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
>  ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
>  RUN apt-get update && apt-get install -y \
>      autoconf \
> +    bison \
>      build-essential \
> +    flex \
>      libglib2.0-dev \
>      libtool \
>      pkgconf \

Reviewed-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Pierrick Bouvier 1 month ago
On 6/23/2026 10:48 PM, Brian Cain wrote:
> The hexagon idef-parser requires flex and bison as host build
> tools.  Add them to the emsdk-wasm64-cross container image so that
> wasm64 builds including hexagon-softmmu can find them.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Stefan Hajnoczi 1 month ago
On Wed, Jun 24, 2026 at 1:48 AM Brian Cain <brian.cain@oss.qualcomm.com> wrote:
>
> The hexagon idef-parser requires flex and bison as host build
> tools.  Add them to the emsdk-wasm64-cross container image so that
> wasm64 builds including hexagon-softmmu can find them.
>
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> index 8a924816f92..5debbc77d08 100644
> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
>  ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
>  RUN apt-get update && apt-get install -y \
>      autoconf \
> +    bison \
>      build-essential \
> +    flex \
>      libglib2.0-dev \
>      libtool \
>      pkgconf \

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On 24/6/26 07:48, Brian Cain wrote:
> The hexagon idef-parser requires flex and bison as host build
> tools.  Add them to the emsdk-wasm64-cross container image so that
> wasm64 builds including hexagon-softmmu can find them.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>   tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> index 8a924816f92..5debbc77d08 100644
> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
>   ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
>   RUN apt-get update && apt-get install -y \
>       autoconf \
> +    bison \
>       build-essential \
> +    flex \
>       libglib2.0-dev \
>       libtool \
>       pkgconf \

Maybe emsdk-wasm64 should have been added to lci-tool first.
(not your responsibility).

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Alex Bennée 1 month ago
Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> writes:

> On 24/6/26 07:48, Brian Cain wrote:
>> The hexagon idef-parser requires flex and bison as host build
>> tools.  Add them to the emsdk-wasm64-cross container image so that
>> wasm64 builds including hexagon-softmmu can find them.
>> Link:
>> https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
>> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
>> ---
>>   tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
>>   1 file changed, 2 insertions(+)
>> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
>> b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
>> index 8a924816f92..5debbc77d08 100644
>> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
>> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
>> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
>>   ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
>>   RUN apt-get update && apt-get install -y \
>>       autoconf \
>> +    bison \
>>       build-essential \
>> +    flex \
>>       libglib2.0-dev \
>>       libtool \
>>       pkgconf \
>
> Maybe emsdk-wasm64 should have been added to lci-tool first.
> (not your responsibility).

I don't think that will be easy on account of emsdk having to build a
bunch of libraries to support building QEMU. If a distro provides a
better cross environment for wasm64 then we could try.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH] tests/docker: add flex and bison to emsdk-wasm64-cross
Posted by Daniel P. Berrangé 1 month ago
On Wed, Jun 24, 2026 at 06:40:24PM +0100, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> writes:
> 
> > On 24/6/26 07:48, Brian Cain wrote:
> >> The hexagon idef-parser requires flex and bison as host build
> >> tools.  Add them to the emsdk-wasm64-cross container image so that
> >> wasm64 builds including hexagon-softmmu can find them.
> >> Link:
> >> https://lore.kernel.org/qemu-devel/CAJSP0QVk6wsOnPAspC4YfXRp90saKibQfD4Mk-44-RQo0k=z3w@mail.gmail.com/
> >> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> >> ---
> >>   tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
> >>   1 file changed, 2 insertions(+)
> >> diff --git a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> >> b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> >> index 8a924816f92..5debbc77d08 100644
> >> --- a/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> >> +++ b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker
> >> @@ -19,7 +19,9 @@ ENV CXXFLAGS="$CFLAGS"
> >>   ENV LDFLAGS="-sWASM_BIGINT -sASYNCIFY=1 -L$TARGET/lib"
> >>   RUN apt-get update && apt-get install -y \
> >>       autoconf \
> >> +    bison \
> >>       build-essential \
> >> +    flex \
> >>       libglib2.0-dev \
> >>       libtool \
> >>       pkgconf \
> >
> > Maybe emsdk-wasm64 should have been added to lci-tool first.
> > (not your responsibility).
> 
> I don't think that will be easy on account of emsdk having to build a
> bunch of libraries to support building QEMU. If a distro provides a
> better cross environment for wasm64 then we could try.

Yeah, there's rather too much custom stuff going on in our emsdk
dockerfile to make it practical to add to lcitool.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|