Compare commits

...

38 Commits

Author SHA1 Message Date
Matt McCormick
88c04a4ba6 Merge pull request from thewtex/wasi-sdk-22
web-wasi: bump to wasi-sdk 22
2024-04-18 11:26:32 -04:00
Matt McCormick
d292408a32 web-wasi: bump to wasi-sdk 22 2024-04-16 10:56:40 -04:00
Matt McCormick
20a1bd6ae4 Merge pull request from VirtualTim/patch-1
Fix incorrect example in CONTRIBUTING.md
2024-04-14 23:26:57 -04:00
Tim Lander
0b5e4fbf2e Fix incorrect example in CONTRIBUTING.md 2024-04-11 16:10:15 +08:00
518fe0572e Merge pull request from dockcross/base-bookworm
docs: base image is Bookworm
2024-04-04 13:19:50 +02:00
Matt McCormick
72a6a72d80 docs: base image is Bookworm 2024-04-04 06:18:43 -04:00
Matt McCormick
2c6c0a52fb Merge pull request from thewtex/wasi-threads
Wasi threads
2024-04-04 05:56:56 -04:00
Matt McCormick
d4e7c0aff2 web-wasi-threads: initial addition
This is a different toolchain following how wasi-sdk defines the
platform triple and how builds are configured -- everything should be
built with the flags defined in the toolchain file.

We build from web-wasi:latest, and that is built first.
2024-04-03 15:19:02 -04:00
Matt McCormick
8106a3b245 Merge pull request from thewtex/emscripten-3-1-56
web-wasm: bump emscripten to 3.1.56
2024-04-03 15:16:54 -04:00
Matt McCormick
488369f3d7 web-wasm: bump emscripten to 3.1.56 2024-04-02 13:54:02 -04:00
Matt McCormick
f52fb3821a wasm: bump binaryen, wabt to latest 2024-04-02 13:12:10 -04:00
Matt McCormick
a8e3072e4f web-wasi: bump to SDK 21 2024-04-02 10:50:17 -04:00
Matt McCormick
e40a33d02b Merge pull request from thewtex/oci-exe-buildx-arm64
Enable specification of build tool with OCI_EXE, building images for arm64 hosts
2024-03-30 14:36:39 -04:00
Matt McCormick
00e75583b2 ci: build the base image for both arm64 and amd64 2024-03-25 22:53:11 -04:00
Matt McCormick
0ee05c1f5a Makefile: apply BUILD_CMD to standard images 2024-03-25 22:33:07 -04:00
Matt McCormick
9f4fe90923 Makefile: apply BUILD_CMD to the base image 2024-03-25 22:31:12 -04:00
Matt McCormick
50120593a3 Makefile: define BUILD_CMD and apply to web-wasm
Note, when setting, QEMU needs to be installed in the Linux kernel with
something like:

  $ docker run --privileged --rm tonistiigi/binfmt --install all

Per: https://github.com/docker/buildx
2024-03-25 22:28:04 -04:00
Matt McCormick
ba27b1fc51 WIP: Support multi-platform amd64, arm64 host images 2024-03-25 22:11:11 -04:00
Matt McCormick
55d275535c Makefile: support OCI_EXE environmental variable
Allow setting podman for image builds.
2024-03-25 21:42:18 -04:00
Matt McCormick
9e57d2bd8f manylinux_2_28: update almalinux-release package
Addresses:

   > [ 2/18] RUN   set -x &&   yum -y install     gpg     python3-devel     zlib-devel     gettext     openssh-clients     wget     nasm     zip   &&   yum clean all:
  265
  6.220  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
  266
  6.220 Public key for platform-python-devel-3.6.8-56.el8_9.3.alma.1.x86_64.rpm is not installed. Failing package is: platform-python-devel-3.6.8-56.el8_9.3.alma.1.x86_64
  267
  6.220  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
  268
  6.220 Public key for platform-python-3.6.8-56.el8_9.3.alma.1.x86_64.rpm is not installed. Failing package is: platform-python-3.6.8-56.el8_9.3.alma.1.x86_64
  269
  6.220  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
  270
  6.221 Public key for python3-libs-3.6.8-56.el8_9.3.alma.1.x86_64.rpm is not installed. Failing package is: python3-libs-3.6.8-56.el8_9.3.alma.1.x86_64
  271
  6.221  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
  272
  6.221 The downloaded packages were saved in cache until the next successful transaction.
  273
  6.221 You can remove cached packages by executing 'yum clean packages'.
  274
  6.230 Error: GPG check FAILED
2024-03-04 12:22:45 +01:00
Matt McCormick
137dda204d ci: increase base cache retention to 3 days 2024-03-04 12:22:45 +01:00
Matt McCormick
3ac4aed3aa ci: use docker import-export instead of load-save
To avoid:

  open /var/lib/docker/tmp/docker-import-2294564057/repositories: no such file or directory

observed in itk-wasm.
2024-03-04 12:22:45 +01:00
Matt McCormick
50baccd0fa ci: bump upload-artifact and download-artifact to v4 2024-03-04 12:22:45 +01:00
Lee Bush
fa87501f12 spelling fixes. 2024-02-07 11:43:42 +01:00
6eda62728a Merge pull request from ftapajos/master
Update to debian bookworm
2024-01-04 11:27:06 +01:00
Flávio Tapajós
6dfa69bdaa Downgrade clang in linux-x64-clang to 15
Stockfish test uses unavailable flag -fexperimental-new-pass-manager
2024-01-03 12:16:55 -03:00
Flávio Tapajós
24f9bdefe2 fixes linux-x64-clang with debian bookworm 2024-01-03 00:45:11 -03:00
Flávio Tapajós
eaba673170 bump debian to bookworm in web-wasi 2024-01-02 23:10:08 -03:00
Flávio Tapajós
7e034e5282 fixes android-arm64 with bookworm 2024-01-02 23:09:54 -03:00
Flávio Tapajós
424b61e9ec Merge 'dockcross/master' 2024-01-02 23:03:07 -03:00
dependabot[bot]
4e4d3ad7ed build(deps): bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 00:01:29 +01:00
Matt McCormick
9476e910d9 Merge pull request from tresf/armv5-fix
Fix linux-armv5 typo
2023-11-09 16:47:41 -05:00
Matt McCormick
f93e2f73bf Merge pull request from tresf/riscv-typos
Fix RISCV typos
2023-11-09 16:47:11 -05:00
Tres Finocchiaro
a5f9b49a37 Fix linux-armv5 typo 2023-11-06 18:53:17 -05:00
Tres Finocchiaro
0b56496e9c Fix riscv32 PKG_CONFIG_PATH 2023-11-06 10:27:47 -05:00
Tres Finocchiaro
e5106c5fd4 Fix copy/paste error 2023-11-05 15:43:20 -05:00
zry98
4282105d11 install-gosu-binary: fix arch detection to match gosu releases arch naming 2023-10-29 23:59:28 +01:00
zry98
ae06c00377 install-gosu-binary: fix arch detection to match gosu releases arch naming 2023-10-29 23:59:28 +01:00
18 changed files with 170 additions and 39 deletions

@@ -6,7 +6,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v8 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted' exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted'

@@ -24,7 +24,15 @@ jobs:
submodules: "recursive" submodules: "recursive"
fetch-depth: 1 fetch-depth: 1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: build - name: build
env:
BUILD_CMD: buildx build --platform linux/amd64,linux/arm64
run: make base run: make base
- name: test - name: test
@@ -33,14 +41,14 @@ jobs:
- name: archive base - name: archive base
run: | run: |
mkdir -p cache mkdir -p cache
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz docker export dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
- name: save base - name: save base
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: cache name: cache
path: ./cache path: ./cache
retention-days: 1 retention-days: 3
- name: deploy - name: deploy
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
@@ -1031,6 +1039,25 @@ jobs:
cpython: "no", cpython: "no",
cpython_arg: "", cpython_arg: "",
} }
- {
image: "web-wasi-threads",
stockfish: "no",
stockfish_arg: "",
ninja: "no",
ninja_arg: "",
openssl: "no",
openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso",
C: "no",
C_arg: "",
C-Plus-Plus: "no",
C-Plus-Plus_arg: "",
fmt: "no",
fmt_arg: "",
raylib: "no",
raylib_arg: "",
cpython: "no",
cpython_arg: "",
}
# Bare metal images # Bare metal images
- { - {
image: "bare-armv7emhf-nano_newlib", image: "bare-armv7emhf-nano_newlib",
@@ -1062,13 +1089,13 @@ jobs:
submodules: "recursive" submodules: "recursive"
fetch-depth: 1 fetch-depth: 1
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: cache name: cache
path: ./cache path: ./cache
- name: load base - name: load base
run: xz -d -k < ./cache/base.tar.xz | docker load run: xz -d -k < ./cache/base.tar.xz | docker import - dockcross/base:latest
- name: build - name: build
run: make ${{ matrix.arch_name.image }} run: make ${{ matrix.arch_name.image }}

@@ -67,7 +67,7 @@ We will take the example of `aarch64-rpi4-linux-gnu`, a `.config` file will be c
*Alternatively*, we could copy an existing `crosstool-ng.config` from one of the target folders in the `dockcross` project to the local `.config`: *Alternatively*, we could copy an existing `crosstool-ng.config` from one of the target folders in the `dockcross` project to the local `.config`:
```bash ```bash
cp path/to/dockcross/linux-arm64 .config cp path/to/dockcross/linux-arm64/crosstool-ng.config .config
``` ```
We will configure the toolchains according to our needs: We will configure the toolchains according to our needs:
@@ -115,7 +115,7 @@ set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm64) set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm64)
``` ```
Then ou must change these lines according to the targeted architecture, here **ARM64**: Then you must change these lines according to the targeted architecture, here **ARM64**:
```cmake ```cmake
set(CMAKE_SYSTEM_PROCESSOR ARM64) set(CMAKE_SYSTEM_PROCESSOR ARM64)
@@ -174,7 +174,7 @@ ENV ARCH arm64
#include "common.label-and-env" #include "common.label-and-env"
``` ```
Then ou must change these lines according to the targeted architecture. Then you must change these lines according to the targeted architecture.
Here you have to change the value according to the name of the toolchain (./ct-ng show-tuple): Here you have to change the value according to the name of the toolchain (./ct-ng show-tuple):

@@ -4,7 +4,14 @@
# #
# Name of the docker executable # Name of the docker executable
DOCKER := docker DOCKER := $(or $(OCI_EXE), docker)
# The build sub-command. Use:
#
# export "BUILD_CMD=buildx build --platform linux/amd64,linux/arm64"
#
# to generate multi-platform images.
BUILD_CMD := $(or $(BUILD_CMD), build)
# Docker organization to pull the images from # Docker organization to pull the images from
ORG = dockcross ORG = dockcross
@@ -30,7 +37,7 @@ GEN_IMAGES := android-arm android-arm64 \
manylinux_2_28-x64 \ manylinux_2_28-x64 \
manylinux2014-x64 manylinux2014-x86 \ manylinux2014-x64 manylinux2014-x86 \
manylinux2014-aarch64 linux-arm64-lts \ manylinux2014-aarch64 linux-arm64-lts \
web-wasm web-wasi linux-mips linux-mips-uclibc linux-mips-lts windows-arm64 windows-armv7 \ web-wasm web-wasi web-wasi-threads linux-mips linux-mips-uclibc linux-mips-lts windows-arm64 windows-armv7 \
windows-static-x86 windows-static-x64 windows-static-x64-posix \ windows-static-x86 windows-static-x64 windows-static-x64-posix \
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \ windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \
linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-armv7a-lts linux-x86_64-full \ linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-armv7a-lts linux-x86_64-full \
@@ -43,7 +50,7 @@ GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
# These images are expected to have explicit rules for *both* build and testing # These images are expected to have explicit rules for *both* build and testing
NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux2014-x64 manylinux2014-x86 \ NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux2014-x64 manylinux2014-x86 \
manylinux2014-aarch64 web-wasm manylinux2014-aarch64 web-wasm web-wasi-threads
# Docker composite files # Docker composite files
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.buildroot \ DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.buildroot \
@@ -118,7 +125,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS
web-wasm: web-wasm/Dockerfile web-wasm: web-wasm/Dockerfile
mkdir -p $@/imagefiles && cp -r imagefiles $@/ mkdir -p $@/imagefiles && cp -r imagefiles $@/
cp -r test web-wasm/ cp -r test web-wasm/
$(DOCKER) build -t $(ORG)/web-wasm:$(TAG) \ $(DOCKER) $(BUILD_CMD) -t $(ORG)/web-wasm:$(TAG) \
-t $(ORG)/web-wasm:latest \ -t $(ORG)/web-wasm:latest \
--build-arg IMAGE=$(ORG)/web-wasm \ --build-arg IMAGE=$(ORG)/web-wasm \
--build-arg VERSION=$(TAG) \ --build-arg VERSION=$(TAG) \
@@ -136,6 +143,26 @@ web-wasm.test: web-wasm
rm -rf web-wasm/test rm -rf web-wasm/test
# #
# web-wasi-threads
#
web-wasi-threads: web-wasi web-wasi-threads/Dockerfile
mkdir -p $@/imagefiles && cp -r imagefiles $@/
cp -r test web-wasi-threads/
$(DOCKER) $(BUILD_CMD) -t $(ORG)/web-wasi-threads:$(TAG) \
-t $(ORG)/web-wasi-threads:latest \
--build-arg IMAGE=$(ORG)/web-wasi-threads \
--build-arg VERSION=$(TAG) \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
web-wasi-threads
web-wasi-threads.test: web-wasi-threads
$(DOCKER) run $(RM) $(ORG)/web-wasi-threads:latest > $(BIN)/dockcross-web-wasi-threads \
&& chmod +x $(BIN)/dockcross-web-wasi-threads
$(BIN)/dockcross-web-wasi-threads -i $(ORG)/web-wasi-threads:latest python3 test/run.py
rm -rf web-wasi-threads/test
#
# manylinux2014-aarch64 # manylinux2014-aarch64
# #
manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile
@@ -225,7 +252,7 @@ manylinux2014-x86.test: manylinux2014-x86
# base # base
# #
base: Dockerfile imagefiles/ base: Dockerfile imagefiles/
$(DOCKER) build -t $(ORG)/base:latest \ $(DOCKER) $(BUILD_CMD) -t $(ORG)/base:latest \
-t $(ORG)/base:$(TAG) \ -t $(ORG)/base:$(TAG) \
--build-arg IMAGE=$(ORG)/base \ --build-arg IMAGE=$(ORG)/base \
--build-arg VCS_URL=`git config --get remote.origin.url` \ --build-arg VCS_URL=`git config --get remote.origin.url` \
@@ -247,7 +274,7 @@ $(VERBOSE).SILENT: display_images
$(STANDARD_IMAGES): %: %/Dockerfile base $(STANDARD_IMAGES): %: %/Dockerfile base
mkdir -p $@/imagefiles && cp -r imagefiles $@/ mkdir -p $@/imagefiles && cp -r imagefiles $@/
$(DOCKER) build -t $(ORG)/$@:latest \ $(DOCKER) $(BUILD_CMD) -t $(ORG)/$@:latest \
-t $(ORG)/$@:$(TAG) \ -t $(ORG)/$@:$(TAG) \
--build-arg ORG=$(ORG) \ --build-arg ORG=$(ORG) \
--build-arg IMAGE=$(ORG)/$@ \ --build-arg IMAGE=$(ORG)/$@ \

@@ -122,6 +122,7 @@ The dockcross script will execute the given command-line inside the container, a
| dockcross/linux-x64-tinycc | x86_64 | tinycc + GCC | Linux | | dockcross/linux-x64-tinycc | x86_64 | tinycc + GCC | Linux |
| dockcross/web-wasm | Wasm | LLVM | Web (JS) | | dockcross/web-wasm | Wasm | LLVM | Web (JS) |
| dockcross/web-wasi | Wasm | LLVM | Web (Universal) | | dockcross/web-wasi | Wasm | LLVM | Web (Universal) |
| dockcross/web-wasi-threads | Wasm | LLVM | Web (Universal) |
| dockcross/windows-shared-x86 | x86 | GCC | Windows | | dockcross/windows-shared-x86 | x86 | GCC | Windows |
| dockcross/windows-shared-x64 | x86_64 | GCC | Windows | | dockcross/windows-shared-x64 | x86_64 | GCC | Windows |
| dockcross/windows-shared-x64-posix | x86_64 | GCC | Windows | | dockcross/windows-shared-x64-posix | x86_64 | GCC | Windows |
@@ -156,7 +157,7 @@ The list of docker images that are **no longer maintained**.
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/base/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/base) ![Docker Stars](https://img.shields.io/docker/stars/dockcross/base) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/base/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/base) ![Docker Stars](https://img.shields.io/docker/stars/dockcross/base)
Base image for other toolchain images. From Debian Jessie with GCC, make, autotools, CMake, Ninja, Git, and Python. Base image for other toolchain images. From Debian Bookworm with GCC, make, autotools, CMake, Ninja, Git, and Python.
### dockcross/android-arm ### dockcross/android-arm
@@ -403,6 +404,12 @@ The [Emscripten](https://emscripten.org/) [WebAssembly](https://webassembly.org/
The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler. The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler.
### dockcross/web-wasi-threads
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/web-wasi-threads/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/web-wasi-threads)
The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler with the toolchain configured to enable the wasm threading proposal.
### dockcross/windows-static-x64 ### dockcross/windows-static-x64
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/windows-static-x64/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/windows-static-x64) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/windows-static-x64/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/windows-static-x64)
@@ -576,7 +583,7 @@ The key difference is that [dockbuild](https://github.com/dockbuild/dockbuild#re
## Build images by yourself ## Build images by yourself
Prebuilt images available on Docker hub are single architecture amd64 images. Those images work evan on different architectures: for example, if you run a dockcross image on Docker running on an Apple M1, the image will run in emulation mode, meaning that it will still work as expected, although it will be slower than running on native hardware (you can expect a factor or 10 or more). Prebuilt images available on Docker hub are single architecture amd64 images. Those images work even on different architectures: for example, if you run a dockcross image on Docker running on an Apple M1, the image will run in emulation mode, meaning that it will still work as expected, although it will be slower than running on native hardware (you can expect a factor or 10 or more).
To overcome this limitation, you can build your own images on non-amd64 architectures. To do so, you can use the `Makefile` provided in this repository. For example, to build the `linux-armv7` image, and provided that your Docker hub organization name is `ACME`, you can run: To overcome this limitation, you can build your own images on non-amd64 architectures. To do so, you can use the `Makefile` provided in this repository. For example, to build the `linux-armv7` image, and provided that your Docker hub organization name is `ACME`, you can run:

@@ -2,7 +2,7 @@ ARG ORG=dockcross
FROM ${ORG}/base:latest FROM ${ORG}/base:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com" MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
RUN \ RUN \
sed -i '/debian-security/d' /etc/apt/sources.list && \ echo Enabled: no >> /etc/apt/sources.list.d/debian.sources && \
dpkg --add-architecture arm64 && \ dpkg --add-architecture arm64 && \
apt-get update apt-get update

@@ -1,5 +1,6 @@
RUN \ RUN \
set -x && \ set -x && \
yum upgrade -y almalinux-release && \
yum -y install \ yum -y install \
gpg \ gpg \
python3-devel \ python3-devel \

@@ -2,8 +2,8 @@
# #
# Common WebAssembly tools. # Common WebAssembly tools.
# main 2022-12-27 # main 2024-04-02
ENV BINARYEN_GIT_TAG cec66beba45668dbad74abd2396bb80d33595ff0 ENV BINARYEN_GIT_TAG 4e2ebbd6de6f99e5972654b3f50ddbc1c6839a73
RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \ RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
cd binaryen && \ cd binaryen && \
git checkout ${BINARYEN_GIT_TAG} && \ git checkout ${BINARYEN_GIT_TAG} && \
@@ -22,8 +22,8 @@ RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
cd ../ && \ cd ../ && \
rm -rf binaryen* rm -rf binaryen*
# main 2023-03-16 # main 2024-04-02
ENV WABT_GIT_TAG 090d4674c86b00e31d18e77f2c8f8570a68e1cf1 ENV WABT_GIT_TAG 356931a867c7d642bc282fff46a1c95ab0e843f3
RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \ RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \
cd wabt && \ cd wabt && \
git checkout ${WABT_GIT_TAG} && \ git checkout ${WABT_GIT_TAG} && \
@@ -47,6 +47,7 @@ RUN mkdir /wasi-runtimes
ENV WASMTIME_HOME /wasi-runtimes/wasmtime ENV WASMTIME_HOME /wasi-runtimes/wasmtime
RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/ COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/
COPY imagefiles/wasmtime-pwd-threads.sh ${WASMTIME_HOME}/bin/
ENV PATH "$WASMTIME_HOME/bin:$PATH" ENV PATH "$WASMTIME_HOME/bin:$PATH"
# For wasmer # For wasmer

@@ -14,9 +14,44 @@ if ! command -v gpg &> /dev/null; then
fi fi
GOSU_VERSION=1.12 GOSU_VERSION=1.12
dpkgArch=$(if test "$(uname -m)" = "x86_64"; then echo amd64; else echo i386; fi)
url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}" ARCH=$(uname -m)
url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc" case "$ARCH" in
x86_64)
GOSU_ARCH=amd64
;;
aarch64)
GOSU_ARCH=arm64
;;
armv7l)
GOSU_ARCH=armhf
;;
armv6l)
GOSU_ARCH=armel
;;
i686|i386)
GOSU_ARCH=i386
;;
mips64el)
GOSU_ARCH=mips64el
;;
ppc64el)
GOSU_ARCH=ppc64el
;;
riscv64)
GOSU_ARCH=riscv64
;;
s390x)
GOSU_ARCH=s390x
;;
*)
echo "Error: unsupported arch (${ARCH}) by gosu (https://github.com/tianon/gosu/releases)" >&2
exit 1
;;
esac
url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}"
url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}.asc"
# download and verify the signature # download and verify the signature
export GNUPGHOME="$(mktemp -d)" export GNUPGHOME="$(mktemp -d)"

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Mount the PWD and the /work mount dir to enable access in try_run commands
exec ${WASMTIME_HOME}/bin/wasmtime -S threads=y run --dir=. --dir=$PWD --dir=/work/ "$@"

@@ -38,7 +38,7 @@ ENV QEMU_SET_ENV "LD_LIBRARY_PATH=${CROSS_ROOT}/lib:${QEMU_LD_PREFIX}"
COPY Toolchain.cmake ${CROSS_ROOT}/ COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/ ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabi/pkgconfig
# Linux kernel cross compilation variables # Linux kernel cross compilation variables
ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV PATH ${PATH}:${CROSS_ROOT}/bin

@@ -39,11 +39,11 @@ WORKDIR /work
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/ COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
ENV PKG_CONFIG_PATH /usr/lib/riscv64-unknown-linux-gnu/pkgconfig ENV PKG_CONFIG_PATH /usr/lib/riscv32-unknown-linux-gnu/pkgconfig
# Linux kernel cross compilation variables # Linux kernel cross compilation variables
ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH powerpc ENV ARCH riscv32
#include "common.label-and-env" #include "common.label-and-env"

@@ -44,6 +44,6 @@ ENV PKG_CONFIG_PATH /usr/lib/riscv64-unknown-linux-gnu/pkgconfig
# Linux kernel cross compilation variables # Linux kernel cross compilation variables
ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH powerpc ENV ARCH riscv64
#include "common.label-and-env" #include "common.label-and-env"

@@ -3,13 +3,13 @@ FROM ${ORG}/base:latest
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com" LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
ARG CLANG_VERSION=17 ARG CLANG_VERSION=15
ENV CLANG_VERSION=${CLANG_VERSION} ENV CLANG_VERSION=${CLANG_VERSION}
RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list \ RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list.d/llvm.list \
&& echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list \ && echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list \ && echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list \ && echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list.d/llvm.list \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& apt-get update \ && apt-get update \
&& apt-get -y install clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION} liblld-${CLANG_VERSION}-dev \ && apt-get -y install clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION} liblld-${CLANG_VERSION}-dev \
@@ -18,6 +18,7 @@ RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /et
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 90 \ && update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 90 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 90 \ && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 90 \
&& update-alternatives --remove-all cpp \
&& update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${CLANG_VERSION} 90 \ && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${CLANG_VERSION} 90 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 90 \ && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 90 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 90 \ && update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 90 \

@@ -0,0 +1,11 @@
ARG ORG=dockcross
FROM ${ORG}/web-wasi:latest
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
ENV CROSS_TRIPLE=wasm32-wasi-threads
COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
#include "common.label-and-env"

@@ -0,0 +1,17 @@
set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})
set(CMAKE_SYSROOT $ENV{WASI_SYSROOT})
set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-sysroot.sh)
set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-sysroot.sh)
set(CMAKE_AR llvm-ar-$ENV{LLVM_VERSION})
set(CMAKE_RANLIB llvm-ranlib-$ENV{LLVM_VERSION})
set(CMAKE_ASM_COMPILER clang-$ENV{LLVM_VERSION})
set(CMAKE_C_COMPILER_TARGET $ENV{CROSS_TRIPLE})
set(CMAKE_CXX_COMPILER_TARGET $ENV{CROSS_TRIPLE})
set(CMAKE_ASM_COMPILER_TARGET $ENV{CROSS_TRIPLE})
set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd-threads.sh)

@@ -3,7 +3,7 @@ FROM ${ORG}/base:latest
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com" LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
ENV LLVM_VERSION 16 ENV LLVM_VERSION 18
# Build LLVM / Clang that supports our glibc # Build LLVM / Clang that supports our glibc
RUN apt-get update && \ RUN apt-get update && \
@@ -11,14 +11,14 @@ RUN apt-get update && \
apt-get install -y && \ apt-get install -y && \
\ \
curl -sS https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm.gpg && \ curl -sS https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm.gpg && \
echo "deb [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \ echo "deb [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \ echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
\ \
apt-get update && \ apt-get update && \
apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} && \ apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
ENV WASI_VERSION 20 ENV WASI_VERSION 22
ENV WASI_VERSION_FULL ${WASI_VERSION}.0 ENV WASI_VERSION_FULL ${WASI_VERSION}.0
RUN cd /usr/ && \ RUN cd /usr/ && \
curl -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz && \ curl -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz && \

@@ -1,4 +1,4 @@
ARG DOCKER_IMAGE_VERSION=3.1.46 ARG DOCKER_IMAGE_VERSION=3.1.56
FROM emscripten/emsdk:$DOCKER_IMAGE_VERSION FROM emscripten/emsdk:$DOCKER_IMAGE_VERSION
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com" LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"