Skip to contentSkip to conversation

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

PATCH In review Brian Cain 7 participants 8 messages Jun 24 – Jun 25

lore
Share & tools
lore

Brian Cain

author
#0 lore raw

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

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.

---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +2 -0
index 8a924816f92..5debbc77d08 100644
@@ -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 \
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Brian Cain

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.

---
  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
  1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +0 -0
index 8a924816f92..5debbc77d08 100644

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 9 lines
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +2 -0
@@ -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).

#2 lore raw
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Brian Cain

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/

---
  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
  1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +1 -0
index 8a924816f92..5debbc77d08 100644
@@ -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 \
Quoted 8 lines

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 5 lines
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +1 -0
      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.

Quoted 2 lines
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#3 lore raw
Quoted 31 lines · Alex Bennée
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Brian Cain

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/

---
  tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
  1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +1 -0
index 8a924816f92..5debbc77d08 100644
@@ -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 \
Quoted 8 lines

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 5 lines
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +1 -0
      build-essential \
+    flex \
      libglib2.0-dev \
      libtool \
      pkgconf \

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

Quoted 3 lines

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

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
Reviewed-by on v1 1/1
#4 lore raw
In reply to Brian Cain
Quoted 16 lines · Brian Cain

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.

---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +0 -0
index 8a924816f92..5debbc77d08 100644

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 9 lines
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +2 -0
@@ -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 on v1 1/1
#5 lore raw
In reply to Brian Cain
Quoted 10 lines · Brian Cain

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.

---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
#6 lore raw
In reply to Brian Cain
Quoted 15 lines · Brian Cain

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.

---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +0 -0
index 8a924816f92..5debbc77d08 100644

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 9 lines
tests/docker/dockerfiles/emsdk-wasm64-cross.docker +2 -0
@@ -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

Reviewed-by
#7 lore raw
Quoted 5 lines

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/

Review

Quoted 6 lines
---
 tests/docker/dockerfiles/emsdk-wasm64-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/tests/docker/dockerfiles/emsdk-wasm64-cross.docker

tests/docker/dockerfiles/emsdk-wasm64-cross.docker ENV CXXFLAGS="$CFLAGS" · line 27

Quoted 13 lines

index 8a924816f92..5debbc77d08 100644

tests/docker/dockerfiles/emsdk-wasm64-cross.docker +2 -0
@@ -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 \