From be5022cb4bdaf4e8e6ce043c85814a0c31de9447 Mon Sep 17 00:00:00 2001 From: Danny van Dyk Date: Sun, 9 Aug 2026 12:43:55 +0100 Subject: [PATCH 1/4] Build GSL 2.8 from source on both manylinux_2_34 architectures --- manylinux_2_34/aarch64/Dockerfile | 12 +++++++----- manylinux_2_34/x86_64/Dockerfile | 12 ++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/manylinux_2_34/aarch64/Dockerfile b/manylinux_2_34/aarch64/Dockerfile index 44f0e30..09eea34 100644 --- a/manylinux_2_34/aarch64/Dockerfile +++ b/manylinux_2_34/aarch64/Dockerfile @@ -1,8 +1,10 @@ FROM quay.io/pypa/manylinux_2_34_aarch64:2026.04.04-1 +# GSL is built from source below on every architecture; the distribution's package is +# older (2.6) and is deliberately not installed. RUN yum -y install chrpath cmake git libtool \ - && yum -y clean all \ - && rm -rf /var/cache/yum + && yum -y clean all \ + && rm -rf /var/cache/yum # installation destination of the pkg-config file is hardcoded to /usr/lib/pkgconfig RUN mkdir -p /yaml/build \ @@ -21,9 +23,9 @@ RUN mkdir -p /yaml/build \ # install GSL RUN mkdir /gsl \ && pushd /gsl \ - && curl -L -O https://ftp.gnu.org/gnu/gsl/gsl-2.7.tar.gz \ - && tar zxf /gsl/gsl-2.7.tar.gz \ - && pushd gsl-2.7 \ + && curl -L -O https://ftp.gnu.org/gnu/gsl/gsl-2.8.tar.gz \ + && tar zxf /gsl/gsl-2.8.tar.gz \ + && pushd gsl-2.8 \ && ./configure --prefix=/usr \ && make -j4 \ && make install \ diff --git a/manylinux_2_34/x86_64/Dockerfile b/manylinux_2_34/x86_64/Dockerfile index 82d8f49..fcd9b73 100644 --- a/manylinux_2_34/x86_64/Dockerfile +++ b/manylinux_2_34/x86_64/Dockerfile @@ -1,6 +1,10 @@ FROM quay.io/pypa/manylinux_2_34_x86_64:2026.04.04-1 -RUN yum -y install chrpath cmake git gsl gsl-devel libtool +# GSL is built from source below on every architecture; the distribution's package is +# older (2.6) and is deliberately not installed. +RUN yum -y install chrpath cmake git libtool \ + && yum -y clean all \ + && rm -rf /var/cache/yum # installation destination of the pkg-config file is hardcoded to /usr/lib/pkgconfig # - using -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to avoid https://github.com/jbeder/yaml-cpp/issues/1352 @@ -20,9 +24,9 @@ RUN mkdir -p /yaml/build \ # install GSL RUN mkdir /gsl \ && pushd /gsl \ - && curl -L -O https://ftp.gnu.org/gnu/gsl/gsl-2.7.tar.gz \ - && tar zxf /gsl/gsl-2.7.tar.gz \ - && pushd gsl-2.7 \ + && curl -L -O https://ftp.gnu.org/gnu/gsl/gsl-2.8.tar.gz \ + && tar zxf /gsl/gsl-2.8.tar.gz \ + && pushd gsl-2.8 \ && ./configure --prefix=/usr \ && make -j4 \ && make install \ From b5572ba767c313163e7bae49c50da3e3dafacd8c Mon Sep 17 00:00:00 2001 From: Danny van Dyk Date: Sun, 9 Aug 2026 12:44:05 +0100 Subject: [PATCH 2/4] Repair and collapse the macOS dependency bundle onto a single arm64 leg --- .github/workflows/macos-build+deploy.yaml | 20 ++++++---- macos/{sonoma => arm64}/build-boost.bash | 14 ++++--- macos/arm64/build-fftw3.bash | 19 +++++++++ macos/arm64/build-gsl.bash | 19 +++++++++ macos/{sonoma => arm64}/build-yaml-cpp.bash | 9 +++-- macos/sonoma/build-gsl.bash | 18 --------- macos/ventura/build-boost.bash | 43 --------------------- macos/ventura/build-gsl.bash | 18 --------- macos/ventura/build-yaml-cpp.bash | 18 --------- 9 files changed, 64 insertions(+), 114 deletions(-) rename macos/{sonoma => arm64}/build-boost.bash (78%) mode change 100755 => 100644 create mode 100644 macos/arm64/build-fftw3.bash create mode 100644 macos/arm64/build-gsl.bash rename macos/{sonoma => arm64}/build-yaml-cpp.bash (68%) mode change 100755 => 100644 delete mode 100755 macos/sonoma/build-gsl.bash delete mode 100755 macos/ventura/build-boost.bash delete mode 100755 macos/ventura/build-gsl.bash delete mode 100755 macos/ventura/build-yaml-cpp.bash diff --git a/.github/workflows/macos-build+deploy.yaml b/.github/workflows/macos-build+deploy.yaml index 2a6fae6..017566b 100644 --- a/.github/workflows/macos-build+deploy.yaml +++ b/.github/workflows/macos-build+deploy.yaml @@ -17,22 +17,24 @@ jobs: fail-fast: false matrix: include: - - { version: ventura, arch: x86_64, runner: macos-13, jobs: 4, prefix: /usr/local, CXXFLAGS="-O2 -g -march=x86-64 -fPIC -DPIC" } - - { version: sonoma, arch: arm64, runner: macos-14, jobs: 3, prefix: /opt/homebrew, CXXFLAGS="-O2 -g -march=armv8.5a -fPIC -DPIC" } + - { version: arm64, arch: arm64, runner: macos-15, jobs: 3, prefix: /opt/homebrew, cxxflags: "-O2 -g -march=armv8.5a -fPIC -DPIC", deployment_target: "14.0" } runs-on: ${{ matrix.runner }} env: JOBS: ${{ matrix.jobs }} DESTDIR: /tmp/DESTDIR OUTPUTDIR: /tmp/OUTPUT PREFIX: ${{ matrix.prefix }} - PYTHON_VERSIONS: "3.9 3.10 3.11 3.12" + PYTHON_VERSIONS: "3.12 3.13 3.14" + CFLAGS: ${{ matrix.cxxflags }} + CXXFLAGS: ${{ matrix.cxxflags }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target }} permissions: contents: read packages: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install build dependencies and workflow dependencies shell: bash @@ -54,6 +56,10 @@ jobs: name: Build GSL shell: bash run: ./macos/${{ matrix.version }}/build-gsl.bash + - + name: Build FFTW3 + shell: bash + run: ./macos/${{ matrix.version }}/build-fftw3.bash - name: Build Boost shell: bash @@ -63,7 +69,7 @@ jobs: shell: bash run: | cd ${DESTDIR} - tar zcf ${OUTPUTDIR}/${{ matrix.version }}-${{ matrix.arch }}.tar.gz * + tar zcf ${OUTPUTDIR}/macos-${{ matrix.version }}.tar.gz * - name: Push tarball to ghcr.io shell: bash @@ -71,6 +77,6 @@ jobs: oras login --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}" ghcr.io cd ${OUTPUTDIR} oras push \ - ghcr.io/eos/docker.io:${{ matrix.version }}-${{ matrix.arch }}-${GITHUB_SHA::7} \ + ghcr.io/eos/docker.io:macos-${{ matrix.version }}-${GITHUB_SHA::7} \ -a "org.opencontainers.image.source=https://github.com/eos/docker.io" \ - ${{ matrix.version }}-${{ matrix.arch}}.tar.gz + macos-${{ matrix.version }}.tar.gz diff --git a/macos/sonoma/build-boost.bash b/macos/arm64/build-boost.bash old mode 100755 new mode 100644 similarity index 78% rename from macos/sonoma/build-boost.bash rename to macos/arm64/build-boost.bash index 558bf33..44e4b98 --- a/macos/sonoma/build-boost.bash +++ b/macos/arm64/build-boost.bash @@ -1,3 +1,4 @@ +set -eo pipefail set -x mkdir -p /tmp/boost @@ -5,19 +6,19 @@ pushd /tmp/boost echo Download the tarball -curl -L -O https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.gz +curl -L -O https://archives.boost.io/release/1.90.0/source/boost_1_90_0.tar.gz echo Untar -tar zxf boost_1_85_0.tar.gz +tar zxf boost_1_90_0.tar.gz echo Build Boost -pushd boost_1_85_0 +pushd boost_1_90_0 gsed -i -e '/^#include user-config.jam < Date: Sun, 9 Aug 2026 12:44:24 +0100 Subject: [PATCH 3/4] Stop assuming a Homebrew Python for libboost_python on macOS The build failed with 'pyconfig.h file not found': the script assumed brew-installed python@3.12/3.13/3.14 under $PREFIX/opt/..., but nothing ever installed those formulae. Use actions/setup-python to expose the runner's own pre-cached CPython builds instead (no Homebrew, no extra download) and query sysconfig for their real include/lib paths, since their layout differs from Homebrew's Frameworks convention. Also drops autoconf/automake/libtool/m4 from the brew install list: none of the four dependencies need them, since all four ship pre-generated build systems in their release tarballs. Bump actions/checkout to v7 to clear the Node.js 20 deprecation warning. Also restores the executable bit on the macOS arm64 build scripts, lost when they were first written out. --- .github/workflows/macos-build+deploy.yaml | 12 ++++++++++-- macos/arm64/build-boost.bash | 14 ++++++++++---- macos/arm64/build-fftw3.bash | 0 macos/arm64/build-gsl.bash | 0 macos/arm64/build-yaml-cpp.bash | 0 5 files changed, 20 insertions(+), 6 deletions(-) mode change 100644 => 100755 macos/arm64/build-boost.bash mode change 100644 => 100755 macos/arm64/build-fftw3.bash mode change 100644 => 100755 macos/arm64/build-gsl.bash mode change 100644 => 100755 macos/arm64/build-yaml-cpp.bash diff --git a/.github/workflows/macos-build+deploy.yaml b/.github/workflows/macos-build+deploy.yaml index 017566b..55b692c 100644 --- a/.github/workflows/macos-build+deploy.yaml +++ b/.github/workflows/macos-build+deploy.yaml @@ -34,14 +34,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install build dependencies and workflow dependencies shell: bash run: | brew install \ - autoconf automake cmake gnu-sed libtool m4 make pkg-config \ + cmake gnu-sed make pkg-config \ oras + - + name: Set up Python (for libboost_python) + uses: actions/setup-python@v7 + with: + python-version: | + 3.12 + 3.13 + 3.14 - name: Create directories shell: bash diff --git a/macos/arm64/build-boost.bash b/macos/arm64/build-boost.bash old mode 100644 new mode 100755 index 44e4b98..7438e7b --- a/macos/arm64/build-boost.bash +++ b/macos/arm64/build-boost.bash @@ -19,9 +19,15 @@ echo "Build Boost (Python-independent parts)" ./b2 install link=shared threading=single cxxflags="${CXXFLAGS}" --prefix=${DESTDIR}/${PREFIX} -j ${JOBS} for pyver in ${PYTHON_VERSIONS} ; do echo "Build Boost (libboost_python${pyver/./})" - pyinc=${PREFIX}/opt/python@${pyver}/Frameworks/Python.framework/Versions/${pyver}/include/python${pyver}/ - pylib=${PREFIX}/opt/python@${pyver}/Frameworks/Python.framework/Versions/${pyver}/lib - export PYTHON=${PREFIX}/bin/python${pyver} + # Use the runner's own CPython (installed by actions/setup-python from its + # pre-cached tool versions), not a Homebrew-installed Python: it is already + # present, so building/fetching one via Homebrew is pure waste. Query the + # interpreter itself for its layout instead of assuming a particular + # installation's directory structure (Homebrew's framework layout differs + # from the toolcache's). + export PYTHON=$(command -v python${pyver}) + pyinc=$(${PYTHON} -c "import sysconfig; print(sysconfig.get_paths()['include'])") + pylib=$(${PYTHON} -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") cat > user-config.jam < Date: Sun, 9 Aug 2026 13:10:20 +0100 Subject: [PATCH 4/4] Bump manylinux_2_34 workflow actions off Node.js 20 runtimes --- .../manylinux_2_34-build+deploy.yaml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/manylinux_2_34-build+deploy.yaml b/.github/workflows/manylinux_2_34-build+deploy.yaml index 6667135..837d949 100644 --- a/.github/workflows/manylinux_2_34-build+deploy.yaml +++ b/.github/workflows/manylinux_2_34-build+deploy.yaml @@ -23,11 +23,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: eoshep/manylinux_2_34 tags: | @@ -35,20 +35,20 @@ jobs: type=raw,value=latest - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v4 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7 with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} context: manylinux_2_34/${{ matrix.arch }} @@ -63,7 +63,7 @@ jobs: touch "/tmp/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: digest-${{ matrix.arch }} path: /tmp/digests/* @@ -77,18 +77,18 @@ jobs: steps: - name: Download digests - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: pattern: digest-* path: /tmp/digests merge-multiple: true - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: eoshep/manylinux_2_34 tags: | @@ -96,7 +96,7 @@ jobs: type=raw,value=latest - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -109,4 +109,4 @@ jobs: - name: Inspect image run: | - docker buildx imagetools inspect eoshep/manylinux_2_34:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect eoshep/manylinux_2_34:${{ steps.meta.outputs.version }}