This commit is contained in:
Douglas Teles
2026-03-25 13:40:52 -03:00
parent 1a65e2992e
commit dae539ff29
3 changed files with 52 additions and 8 deletions

26
Dockerfile Normal file → Executable file
View File

@@ -3,20 +3,27 @@ FROM archlinux:latest
SHELL ["/usr/bin/bash", "-c"]
# Update system and install base packages
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm --needed \
# Fix: archlinux:latest has corrupt pacman local db (missing desc files in overlay)
# Step 1: upgrade base system (creates new layer, fixes stale db entries)
RUN pacman-db-upgrade 2>/dev/null; \
for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -Syu --noconfirm
# Step 2: clean stale entries from previous layer, then install build deps
RUN for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -S --noconfirm --needed \
base-devel bc jdk-openjdk file gawk gettext git go gperf \
perl-json perl-xml-parser ncurses lzop make patchutils \
python python-setuptools parted unzip wget curl \
xorg-mkfontscale libxslt zip vim zstd rdfind automake \
xmlstarlet rsync which sudo rpcsvc-proto perl-parse-yapp xorg-bdftopcf
# Downgrade GCC to 14.x to avoid gnulib _Generic conflicts with GCC 15+
RUN cd /tmp && \
curl -LO 'https://archive.archlinux.org/packages/g/gcc/gcc-14.2.1%2Br134%2Bgab884fffe3fc-1-x86_64.pkg.tar.zst' && \
curl -LO 'https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-14.2.1%2Br134%2Bgab884fffe3fc-1-x86_64.pkg.tar.zst' && \
pacman -U --noconfirm --overwrite='*' /tmp/gcc-*.pkg.tar.zst && \
rm -f /tmp/gcc-*.pkg.tar.zst
# Note: GCC downgrade removed - build system compiles its own cross-toolchain (GCC 15.1).
# Host GCC is only used for host tools. Fixes from projects/ArchR/packages/ handle
# any GCC 15 incompatibilities in individual packages (spirv-tools, llvm, etc.)
# Create build user
RUN useradd -m -s /bin/bash docker && \
@@ -41,5 +48,8 @@ RUN if [ ! -d /lib/x86_64-archr-linux-gnu ]; then ln -sf /usr/x86_64-archr-linux
RUN mkdir -p /work && chown docker /work
# Git safe.directory for any user (env-file may override HOME)
RUN git config --system --add safe.directory '*'
WORKDIR /work
USER docker

View File

@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R)
# Override: downgrade to 0.24 to avoid gnulib _Generic conflicts with GCC 15+
PKG_NAME="gettext"
PKG_VERSION="0.24"
PKG_SHA256="e1620d518b26d7d3b16ac570e5018206e8b0d725fb65c02d048397718b5cf318"
PKG_LICENSE="GPL"
PKG_SITE="https://www.gnu.org/s/gettext/"
PKG_URL="https://mirrors.kernel.org/gnu/gettext/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="make:host"
PKG_DEPENDS_TARGET="autotools:host make:host gcc:host"
PKG_LONGDESC="A program internationalization library and tools."
PKG_BUILD_FLAGS="+local-cc"

View File

@@ -0,0 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R)
# Override: downgrade to 1.4.19 to avoid gnulib _Generic conflicts with GCC 15+
# m4 1.4.20 ships gnulib with _Generic macros that produce syntax errors on GCC 15
PKG_NAME="m4"
PKG_VERSION="1.4.19"
PKG_SHA256="63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96"
PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/m4/"
PKG_URL="https://mirrors.kernel.org/gnu/m4/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="ccache:host"
PKG_LONGDESC="The m4 macro processor."
PKG_BUILD_FLAGS="-cfg-libs:host"
PKG_CONFIGURE_OPTS_HOST="gl_cv_func_gettimeofday_clobber=no --target=${TARGET_NAME}"
post_makeinstall_host() {
make prefix=${SYSROOT_PREFIX}/usr install
}