Skip to content

Commit 0027b31

Browse files
committed
Fix weekly build: pin lasem to 0.4.3
The mathematical 1.6.18 gem fails to load at runtime with: mathematical.so: undefined symbol: lsm_dom_view_render (LoadError) mathematical's native extension was written against the pre-0.4.4 lasem API and still calls lsm_dom_view_render, which was removed upstream in lasem 0.4.4. Since the Dockerfiles build lasem from the GNOME tarball and install it to /usr, the runtime loader resolves liblasem-0.4.so.4 to the system copy and the symbol lookup fails. Pin lasem to 0.4.3 (last release that still exports the symbol) in both Dockerfiles/ubuntu2204 and Dockerfiles/debian. Verified locally: both images build clean and `ruby -e 'require "mathematical"; ...'` returns ok at build time and in a fresh container. Fixes the Weekly Build and Release workflow failure in run 24013750278. Signed-off-by: Rafael Sene <rafael@riscv.org>
1 parent a78b750 commit 0027b31

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

Dockerfiles/debian

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN set -eux; \
3030
libzstd-dev \
3131
libjpeg-dev \
3232
librsvg2-dev \
33+
libgs-dev \
3334
"; \
3435
runtimeDeps=" \
3536
bison \
@@ -41,6 +42,7 @@ RUN set -eux; \
4142
pandoc \
4243
graphviz \
4344
default-jre-headless \
45+
ghostscript \
4446
libcairo2 \
4547
libgdk-pixbuf-2.0-0 \
4648
libpango-1.0-0 \
@@ -66,14 +68,15 @@ RUN set -eux; \
6668
apt-get install -y --no-install-recommends $buildDeps $runtimeDeps; \
6769
\
6870
# Build liblasem from the upstream release tarball; bookworm does not ship the needed runtime.
69-
lasemVersion=0.4.4; \
71+
lasemVersion=0.4.3; \
7072
curl -fsSL "https://download.gnome.org/sources/lasem/0.4/lasem-${lasemVersion}.tar.xz" -o /tmp/lasem.tar.xz; \
7173
mkdir -p /tmp/lasem-src; \
7274
tar -xJf /tmp/lasem.tar.xz -C /tmp/lasem-src --strip-components=1; \
7375
cd /tmp/lasem-src; \
7476
./configure --prefix=/usr --disable-gtk-doc --enable-introspection=no; \
7577
make -j"$(nproc)"; \
7678
make install; \
79+
ln -s /usr/lib/liblasem-0.4.so.4 /usr/lib/liblasem.so; \
7780
ldconfig; \
7881
cd /build; \
7982
rm -rf /tmp/lasem.tar.xz /tmp/lasem-src; \

Dockerfiles/ubuntu2204

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ RUN set -eux; \
2929
libzstd-dev \
3030
libjpeg-dev \
3131
librsvg2-dev \
32+
libgs-dev \
3233
"; \
3334
runtimeDeps=" \
3435
bison \
@@ -41,8 +42,9 @@ RUN set -eux; \
4142
pandoc \
4243
graphviz \
4344
default-jre \
45+
ghostscript \
4446
libcairo2 \
45-
libgdk-pixbuf2.0-0 \
47+
libgdk-pixbuf-2.0-0 \
4648
libpango-1.0-0 \
4749
libpangocairo-1.0-0 \
4850
libpangoft2-1.0-0 \
@@ -53,6 +55,7 @@ RUN set -eux; \
5355
libzstd1 \
5456
libjpeg-turbo8 \
5557
librsvg2-2 \
58+
libxft2 \
5659
make \
5760
pkg-config \
5861
ruby \
@@ -69,19 +72,20 @@ RUN set -eux; \
6972
apt-get install -y --no-install-recommends $buildDeps $runtimeDeps; \
7073
\
7174
# Build liblasem from the upstream release tarball; Ubuntu 22.04 does not ship the needed runtime.
72-
lasemVersion=0.4.4; \
75+
lasemVersion=0.4.3; \
7376
curl -fsSL "https://download.gnome.org/sources/lasem/0.4/lasem-${lasemVersion}.tar.xz" -o /tmp/lasem.tar.xz; \
7477
mkdir -p /tmp/lasem-src; \
7578
tar -xJf /tmp/lasem.tar.xz -C /tmp/lasem-src --strip-components=1; \
7679
cd /tmp/lasem-src; \
7780
./configure --prefix=/usr --disable-gtk-doc --enable-introspection=no; \
7881
make -j"$(nproc)"; \
7982
make install; \
83+
ln -s /usr/lib/liblasem-0.4.so.4 /usr/lib/liblasem.so; \
8084
ldconfig; \
8185
cd /build; \
8286
rm -rf /tmp/lasem.tar.xz /tmp/lasem-src; \
8387
\
84-
pip3 install --no-cache-dir \
88+
pip3 install --no-cache-dir --break-system-packages \
8589
sympy \
8690
pyyaml \
8791
jsonschema; \
@@ -113,6 +117,9 @@ RUN set -eux; \
113117
npm install -g wavedrom-cli@2.6.8 bytefield-svg@1.8.0; \
114118
npm cache clean --force; \
115119
\
120+
# Ensure /tmp is writable by everyone \
121+
chmod 1777 /tmp; \
122+
\
116123
apt-get purge -y --auto-remove $buildDeps; \
117124
rm -rf /var/lib/apt/lists/* \
118125
/usr/share/doc/* \

0 commit comments

Comments
 (0)