mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 11:46:20 +00:00
Arch Linux ships a stripped ld-linux-x86-64.so.2, so Valgrind cannot find the memcmp/memcpy/strlen symbols it must redirect and exits at startup with "Fatal error at startup: a function redirection which is mandatory for this platform-tool combination cannot be set up". debuginfod is already installed in the image but was never wired up. Set DEBUGINFOD_URLS to the official Arch debuginfod server so Valgrind fetches the missing glibc debug symbols on demand and caches them.
82 lines
1.8 KiB
Docker
82 lines
1.8 KiB
Docker
FROM archlinux:latest
|
|
|
|
ENV TERM=xterm
|
|
ENV CC="ccache gcc"
|
|
# Arch ships a stripped ld-linux; Valgrind needs glibc debug symbols to
|
|
# redirect memcmp/memcpy/strlen. debuginfod fetches them on demand.
|
|
ENV DEBUGINFOD_URLS=https://debuginfod.archlinux.org
|
|
|
|
RUN pacman -Syyu --noconfirm
|
|
|
|
# reflector is optional - if it fails due to network issues, continue with default mirrorlist
|
|
RUN pacman -S --needed --noconfirm reflector && \
|
|
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
|
|
RUN pacman-key --init
|
|
RUN pacman -S --needed --noconfirm \
|
|
autoconf \
|
|
autoconf-archive \
|
|
automake \
|
|
base-devel \
|
|
ca-certificates \
|
|
ccache \
|
|
check \
|
|
cmake \
|
|
cmocka \
|
|
lcov \
|
|
curl \
|
|
debuginfod \
|
|
doxygen \
|
|
expat \
|
|
gcc \
|
|
git \
|
|
gpgme \
|
|
gtk3 \
|
|
libgcrypt \
|
|
libmicrohttpd \
|
|
libnotify \
|
|
libsignal-protocol-c \
|
|
libotr \
|
|
libtool \
|
|
libxss \
|
|
make \
|
|
openssl \
|
|
pkg-config \
|
|
python \
|
|
wget \
|
|
sqlite \
|
|
valgrind \
|
|
gdk-pixbuf2 \
|
|
qrencode
|
|
|
|
RUN mkdir -p /usr/src/{stabber,profanity}
|
|
|
|
RUN useradd -mb /usr/src --shell=/bin/false aur && usermod -L aur
|
|
USER aur
|
|
|
|
WORKDIR /usr/src/aur
|
|
|
|
# NOTE: These will change their extension to .tar.zst if a new snapshot is built
|
|
# due to:
|
|
# https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/
|
|
RUN wget https://aur.archlinux.org/cgit/aur.git/snapshot/libstrophe-git.tar.gz
|
|
|
|
RUN tar -zxvf libstrophe-git.tar.gz
|
|
|
|
RUN pushd libstrophe-git && makepkg && popd
|
|
|
|
USER root
|
|
|
|
RUN pacman -U --noconfirm libstrophe-git/libstrophe-git-*.pkg.tar.zst
|
|
|
|
WORKDIR /usr/src
|
|
RUN git clone --depth 1 https://git.jabber.space/devs/stabber
|
|
|
|
WORKDIR /usr/src/stabber
|
|
RUN ./bootstrap.sh
|
|
RUN ./configure --prefix=/usr --disable-dependency-tracking
|
|
RUN make -j$(nproc)
|
|
RUN make install
|
|
|
|
WORKDIR /usr/src/profanity
|
|
COPY . /usr/src/profanity
|