Files
Jungfraujoch/docker/common/install-eigen.sh
T
jungfrauandClaude Opus 5 c94fe9e740 docker: one copy of the shared build steps, and a pinned CMake
OpenSSL, libdbus, Qt and Eigen were built from byte-identical shell in all four
images. They now live once in docker/common/ and each Dockerfile runs them, which
is why the build context is docker/ rather than docker/<variant>/. The four copies
are what let the git HTTP/1.1 fix land in both Ubuntu images and neither Rocky one.

CMake is pinned and installed from cmake.org instead of coming from the distro.
The base images ship three different versions (EL8 3.26.5, EL9 3.31.8, Jammy 3.22
via a Kitware repo held at 3.26, Noble 3.28.3) and they move at every base refresh;
that spread is what makes a configure fail on one image and pass on the next, as
the CMP0169 deprecation that only appears on 3.31 did. The Kitware apt repo that
existed solely to hold CMake at 3.26 is gone with it.

Also: duplicate zlib-static (both rockys) and libxcb-devel (rocky9) package
entries, and an ENV PATH=/usr/bin that never changed anything (ubuntu2204).

Dockerfiles drop from 872 to 684 lines against ~110 lines of shared script. All
four build clean through the eigen step; Qt is unchanged text and is covered by
the image rebuild.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B6iekpDa2xiKobEj1R5xnp
2026-09-12 14:33:10 -04:00

15 lines
758 B
Bash
Executable File

#!/usr/bin/env bash
# Eigen, the external find_package(Eigen3 3.4) dependency, into /opt/eigen-3.4. Header-only;
# 3.4.x is required because Eigen's same-major-version rule rejects 5.x.
#
# Shared by all four build images (docker/*/Dockerfile). The build context is docker/, so each
# Dockerfile reaches this with COPY common/. Version inputs come from that Dockerfile's ARGs.
set -eux; \
cd /tmp; \
git clone --depth 1 --branch ${EIGEN_VERSION} https://gitlab.com/libeigen/eigen.git; \
cmake -G Ninja -S eigen -B eigen-build -DCMAKE_INSTALL_PREFIX=/opt/eigen-3.4 \
-DEIGEN_BUILD_BLAS=OFF -DEIGEN_BUILD_LAPACK=OFF -DEIGEN_BUILD_DOC=OFF -DBUILD_TESTING=OFF; \
cmake --install eigen-build; \
cd /; rm -rf /tmp/eigen /tmp/eigen-build