Skip to content

Commit a084bd6

Browse files
blankdotsbrainstorm
andcommitted
use openssl 3.1 and small adjutmets for multiplatform
Co-authored-by: Roman Valls Guimera <[email protected]>
1 parent 4ddc872 commit a084bd6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG EMSCRIPTEN_VERSION=3.1.51
1+
ARG EMSCRIPTEN_VERSION=3.1.54
22
ARG EMSDK_IMAGE=docker.io/emscripten/emsdk
33

44
# Build libsodium
@@ -16,7 +16,7 @@ RUN tar xvf libsodium-${LIBSODIUM_VERSION}.tar.gz \
1616
# Build openssl
1717
FROM ${EMSDK_IMAGE}:${EMSCRIPTEN_VERSION} AS OPENSSL
1818

19-
ARG OPENSSL_VERSION=1.1.1w
19+
ARG OPENSSL_VERSION=3.1.5
2020

2121
ADD https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz .
2222
ADD https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz.sha256 .
@@ -28,7 +28,7 @@ RUN bash -c 'echo "$(cat openssl-${OPENSSL_VERSION}.tar.gz.sha256) openssl-${OPE
2828
&& sed -i 's|^CROSS_COMPILE.*$|CROSS_COMPILE=|g' Makefile \
2929
&& sed -i '/^CFLAGS/ s/$/ -D__STDC_NO_ATOMICS__=1/' Makefile \
3030
&& sed -i '/^CXXFLAGS/ s/$/ -D__STDC_NO_ATOMICS__=1/' Makefile \
31-
&& emmake make -j 2 all \
31+
&& emmake make -j$(nproc) all \
3232
&& emmake make install
3333

3434
# Build libcrypt4gh
@@ -44,7 +44,7 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
4444
COPY --from=SODIUM /src/libsodium-stable/libsodium-js-sumo/include/ /emsdk/upstream/include/
4545
COPY --from=SODIUM /src/libsodium-stable/libsodium-js-sumo/lib/ /emsdk/upstream/lib/
4646

47-
ADD https://api.github.com/repos/cscfi/libcrypt4gh/compare/main...HEAD /dev/null
47+
ADD https://api.github.com/repos/CSCfi/libcrypt4gh/compare/main...HEAD /dev/null
4848
RUN git clone https://github.com/CSCfi/libcrypt4gh
4949

5050
# We'll skip linking libraries since emcc only produces static libraries
@@ -70,7 +70,7 @@ COPY --from=OPENSSL /emsdk/upstream/lib/ /emsdk/upstream/lib/
7070
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
7171
apt-get update -q \
7272
&& apt-get upgrade -yq -o Dpkg::Options::="--force-confold" \
73-
&& apt-get install -yq autoconf build-essential
73+
&& apt-get install -yq autoconf build-essential pkg-config
7474

7575
ADD https://api.github.com/repos/cscfi/libcrypt4gh-keys/compare/main...HEAD /dev/null
7676
RUN git clone https://github.com/CSCfi/libcrypt4gh-keys.git

build_wasm.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

3-
EMCC_CFLAGS="-I/emsdk/upstream/include -L/emsdk/upstream/lib -sINITIAL_MEMORY=26214400" EMCC_FORCE_STDLIBS=libc emmake make $1
3+
EMCC_CFLAGS="-I/emsdk/upstream/include -L/emsdk/upstream/lib -sINITIAL_MEMORY=26214400" EMCC_FORCE_STDLIBS="libc emmake make" $1

0 commit comments

Comments
 (0)