From 09217a73c6f2637ebbcc85131cff18513b99100a Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 10 Sep 2024 09:54:48 -0600 Subject: [PATCH 1/3] Update to wasi-sdk-24.0 --- docker/ubuntu-2004-builder.Dockerfile | 29 ++++++++++++++------------- docker/ubuntu-2204-builder.Dockerfile | 29 ++++++++++++++------------- docker/ubuntu-2404-builder.Dockerfile | 27 +++++++++++++------------ 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/docker/ubuntu-2004-builder.Dockerfile b/docker/ubuntu-2004-builder.Dockerfile index 11bc698..571996c 100644 --- a/docker/ubuntu-2004-builder.Dockerfile +++ b/docker/ubuntu-2004-builder.Dockerfile @@ -26,13 +26,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \ zstd \ # Clang / LLVM && wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \ - && add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" \ + && add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" \ && apt-get update \ && apt-get install -yq \ - clang-16 \ - libclang-16-dev \ - lld-16 \ - llvm-16 \ + clang-18 \ + libclang-18-dev \ + lld-18 \ + llvm-18 \ && apt-get clean -yq \ && rm -rf /var/lib/apt/lists/* @@ -63,17 +63,18 @@ RUN cd /root \ && cd /root \ && rm -rf boost* -# https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20 -ENV WASI_SDK_PREFIX=/usr/lib/llvm-16 +# https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-24 +ENV WASI_SDK_PREFIX=/usr/lib/llvm-18 ENV PATH=${WASI_SDK_PREFIX}/bin:$PATH -RUN cd ${WASI_SDK_PREFIX}/lib/clang/16/ \ - && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz \ - && tar xf libclang_rt.builtins-wasm32-wasi-20.0.tar.gz \ - && rm libclang_rt.builtins-wasm32-wasi-20.0.tar.gz \ +RUN cd ${WASI_SDK_PREFIX}/lib/clang/18/ \ + && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/libclang_rt.builtins-wasm32-wasi-24.0.tar.gz \ + && mkdir -p lib/wasi \ + && tar xf libclang_rt.builtins-wasm32-wasi-24.0.tar.gz -C lib/wasi --strip-components=1 \ + && rm libclang_rt.builtins-wasm32-wasi-24.0.tar.gz \ && cd ${WASI_SDK_PREFIX}/share \ - && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sysroot-20.0.tar.gz \ - && tar xf wasi-sysroot-20.0.tar.gz \ - && rm wasi-sysroot-20.0.tar.gz + && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sysroot-24.0.tar.gz \ + && tar xf wasi-sysroot-24.0.tar.gz \ + && rm wasi-sysroot-24.0.tar.gz # Node RUN < Date: Tue, 10 Sep 2024 12:46:52 -0600 Subject: [PATCH 2/3] Fix clang version in psibase contributor --- docker/psibase-contributor.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/psibase-contributor.Dockerfile b/docker/psibase-contributor.Dockerfile index 9f21145..396a0b4 100644 --- a/docker/psibase-contributor.Dockerfile +++ b/docker/psibase-contributor.Dockerfile @@ -17,7 +17,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get install -yq \ apt-transport-https \ - clang-format-16 \ + clang-format-18 \ curl \ gdb \ gnupg2 \ From 370a77b5a9afa65c327c5c87a9dd765f355ba1b5 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 25 Sep 2024 07:52:30 -0600 Subject: [PATCH 3/3] Fix wasi-sysroot location --- docker/ubuntu-2004-builder.Dockerfile | 2 +- docker/ubuntu-2204-builder.Dockerfile | 2 +- docker/ubuntu-2404-builder.Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/ubuntu-2004-builder.Dockerfile b/docker/ubuntu-2004-builder.Dockerfile index 571996c..cdd4789 100644 --- a/docker/ubuntu-2004-builder.Dockerfile +++ b/docker/ubuntu-2004-builder.Dockerfile @@ -73,7 +73,7 @@ RUN cd ${WASI_SDK_PREFIX}/lib/clang/18/ \ && rm libclang_rt.builtins-wasm32-wasi-24.0.tar.gz \ && cd ${WASI_SDK_PREFIX}/share \ && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sysroot-24.0.tar.gz \ - && tar xf wasi-sysroot-24.0.tar.gz \ + && tar xf wasi-sysroot-24.0.tar.gz --transform 's/^[^\/]*/wasi-sysroot/' \ && rm wasi-sysroot-24.0.tar.gz # Node diff --git a/docker/ubuntu-2204-builder.Dockerfile b/docker/ubuntu-2204-builder.Dockerfile index 345e4c6..d34317d 100644 --- a/docker/ubuntu-2204-builder.Dockerfile +++ b/docker/ubuntu-2204-builder.Dockerfile @@ -53,7 +53,7 @@ RUN cd ${WASI_SDK_PREFIX}/lib/clang/18/ \ && rm libclang_rt.builtins-wasm32-wasi-24.0.tar.gz \ && cd ${WASI_SDK_PREFIX}/share \ && curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sysroot-24.0.tar.gz \ - && tar xf wasi-sysroot-24.0.tar.gz \ + && tar xf wasi-sysroot-24.0.tar.gz --transform 's/^[^\/]*/wasi-sysroot/' \ && rm wasi-sysroot-24.0.tar.gz RUN <