From 2a0ea889baa6303332efb6fbdcfeabaf20b8ed40 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 10 Aug 2022 16:14:31 -0300 Subject: [PATCH 1/2] chore(runtime) fix cleanup of cwabt build --- util/runtimes/v8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/runtimes/v8.sh b/util/runtimes/v8.sh index 3d250000c..0ec230cd3 100755 --- a/util/runtimes/v8.sh +++ b/util/runtimes/v8.sh @@ -17,7 +17,7 @@ source $NGX_WASM_DIR/util/_lib.sh build_cwabt() { local target="$1" - local clean="$1" + local clean="$2" notice "building lib/cwabt..." From a59ce0174c6855b877d8af2fb64d1a81fca0d374 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 10 Aug 2022 18:24:53 -0300 Subject: [PATCH 2/2] chore(release) install CMake >= 3.12 on Ubuntu 18.04 The latest cargo uses cmake --parallel when building wabt-sys (which is required by cwabt, used by the V8 backend). The --parallel flag is only available from CMake 3.12 onwards, which is not included in the Ubuntu 18.04 distro. More info on the cmake version requirement for cmake-rs: https://github.com/rust-lang/cmake-rs/issues/131 A fix was merged but a new version of the crate was not yet released: https://github.com/rust-lang/cmake-rs/pull/146 Additionally, wabt-sys actually includes code which assumes CMake >= 3.12! See: https://ma.ttias.be/wabt-sys-compile-error-cmake-project-version-not-declared-in-scope-ubuntu-18-04/ --- assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 b/assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 index 37b180d72..4fcbeba49 100644 --- a/assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 +++ b/assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04 @@ -16,6 +16,15 @@ RUN apt-get update && \ clang \ curl +# Install CMake >= 3.12 (required by wabt-sys, +# which is required by cwabt, used by the V8 backend). +RUN apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools && \ + pip3 install --upgrade pip && \ + pip3 install scikit-build && \ + pip3 install cmake + ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo ENV PATH $CARGO_HOME/bin:$PATH RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \