From 841103f92d7c4143266e097c78b85f4405b44fba Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Sat, 21 Mar 2026 14:09:10 -0600 Subject: [PATCH 01/13] Try switching to manylinux for glibc 2.28 --- .github/workflows/Dockerfile | 27 ++++++++++++------------- .github/workflows/build-linux-debug.yml | 2 +- .github/workflows/build-linux.yml | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index a8bb2227ab..4b8649bc93 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -1,31 +1,30 @@ -# Based on old ubuntu to create more compatible binaries +# Based on manylinux_2_28 (AlmaLinux 8, GLIBC 2.28) for maximum HPC compatibility +# Binaries built here will run on RHEL/Rocky/Alma 8+, Ubuntu 20.04+, and most HPC clusters # To build (e.g. for ShapeWorks 6.7): -# docker build --progress=plain -t akenmorris/ubuntu-build-box-jammy-sw67 . +# docker build --progress=plain -t akenmorris/manylinux-build-box-sw67 . # To publish: -# docker push akenmorris/ubuntu-build-box-jammy-sw67 +# docker push akenmorris/manylinux-build-box-sw67 -FROM ubuntu:jammy-20250819 AS env +FROM quay.io/pypa/manylinux_2_28_x86_64 AS env MAINTAINER akenmorris@gmail.com # Set environment variables ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=Etc/UTC +# Enable PowerTools repo for additional development packages +RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertools -# Update -RUN apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install build-essential software-properties-common -y && add-apt-repository ppa:ubuntu-toolchain-r/test -y && apt-get update -y +# Update and install build tools +RUN dnf update -y && dnf groupinstall -y "Development Tools" # Install git and git-lfs -RUN add-apt-repository ppa:git-core/ppa -RUN apt-get update -RUN apt-get install git curl -y -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash -RUN apt-get install git-lfs -y +RUN dnf install -y git curl +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash +RUN dnf install -y git-lfs # Install other dependencies -RUN apt-get install rsync freeglut3-dev libgl1-mesa-dev libegl1-mesa zip libcups2 pigz wget ccache -y +RUN dnf install -y rsync freeglut-devel mesa-libGL-devel mesa-libEGL-devel zip cups-libs pigz wget ccache # Install conda RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/Miniconda3-latest-Linux-x86_64.sh \ diff --git a/.github/workflows/build-linux-debug.yml b/.github/workflows/build-linux-debug.yml index 84a107ae73..7cdf39744e 100644 --- a/.github/workflows/build-linux-debug.yml +++ b/.github/workflows/build-linux-debug.yml @@ -24,7 +24,7 @@ jobs: build: runs-on: ubuntu-latest - container: akenmorris/ubuntu-build-box-jammy-sw67 + container: akenmorris/manylinux-build-box-sw67 steps: diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index a0c2fa6efd..f349690f81 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -25,7 +25,7 @@ jobs: build: runs-on: ubuntu-latest - container: akenmorris/ubuntu-build-box-jammy-sw67 + container: akenmorris/manylinux-build-box-sw67 steps: From 995754b9a8852a8b08c6711cd79a3d955b72eff9 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Sun, 22 Mar 2026 16:22:11 -0600 Subject: [PATCH 02/13] Add gcc-toolset-12 to manylinux Dockerfile for GLIBCXX compatibility with conda Qt5/ICU --- .github/workflows/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index 4b8649bc93..5ed81b94db 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -10,13 +10,19 @@ FROM quay.io/pypa/manylinux_2_28_x86_64 AS env MAINTAINER akenmorris@gmail.com # Set environment variables -ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH=/opt/rh/gcc-toolset-12/root/usr/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # Enable PowerTools repo for additional development packages RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertools # Update and install build tools -RUN dnf update -y && dnf groupinstall -y "Development Tools" +# gcc-toolset-12 provides modern GCC 12 while keeping GLIBC 2.28 for binary compatibility. +# The conda Qt5/ICU packages require GLIBCXX_3.4.28+ which system GCC 8 doesn't provide. +RUN dnf update -y && dnf groupinstall -y "Development Tools" \ + && dnf install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils + +# Ensure gcc-toolset-12's libstdc++ is available at link time +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # Install git and git-lfs RUN dnf install -y git curl From af36a7c8a5cb9839fa1e570f32dfdf00661809a1 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Sun, 22 Mar 2026 20:50:35 -0600 Subject: [PATCH 03/13] Include Dockerfile in dependency cache key to invalidate stale Ubuntu-built cache --- .github/workflows/build-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index f349690f81..994ee9482b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -64,7 +64,7 @@ jobs: uses: actions/cache/restore@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: try import vtk shell: bash -l {0} @@ -81,7 +81,7 @@ jobs: uses: actions/cache/save@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space4 run: df -h From 4d728d81bf468b2254e51ed2a2692e06bfb23336 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Sun, 22 Mar 2026 21:02:15 -0600 Subject: [PATCH 04/13] Include Dockerfile in debug build dependency cache key --- .github/workflows/build-linux-debug.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-linux-debug.yml b/.github/workflows/build-linux-debug.yml index 7cdf39744e..5cdc52f247 100644 --- a/.github/workflows/build-linux-debug.yml +++ b/.github/workflows/build-linux-debug.yml @@ -66,7 +66,7 @@ jobs: uses: actions/cache/restore@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space3.5 run: df -h @@ -107,7 +107,7 @@ jobs: uses: actions/cache/save@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space5 run: df -h From e6bc0fc9081d4e14e6cb96fef16ac5b53404008b Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:10:05 -0600 Subject: [PATCH 05/13] Fix: set LIBRARY_PATH (the link-time equivalent) so gcc-toolset-12's libs are found before conda's. --- .github/workflows/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index 5ed81b94db..a0f686236f 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -21,7 +21,9 @@ RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertoo RUN dnf update -y && dnf groupinstall -y "Development Tools" \ && dnf install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils -# Ensure gcc-toolset-12's libstdc++ is available at link time +# LIBRARY_PATH: ensures the linker finds gcc-toolset-12's libstdc++ (with GLIBCXX_3.4.30) +# before conda's older libstdc++. LD_LIBRARY_PATH alone only affects runtime, not link time. +ENV LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LIBRARY_PATH:+:$LIBRARY_PATH} ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # Install git and git-lfs From c53ca1f0824cb3255abd6135f33f9db5ce3db4de Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:12:46 -0600 Subject: [PATCH 06/13] dockerfile updates --- .github/workflows/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index a0f686236f..1a9f416b92 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -7,7 +7,7 @@ # docker push akenmorris/manylinux-build-box-sw67 FROM quay.io/pypa/manylinux_2_28_x86_64 AS env -MAINTAINER akenmorris@gmail.com +LABEL maintainer="akenmorris@gmail.com" # Set environment variables ENV PATH=/opt/rh/gcc-toolset-12/root/usr/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin @@ -23,7 +23,7 @@ RUN dnf update -y && dnf groupinstall -y "Development Tools" \ # LIBRARY_PATH: ensures the linker finds gcc-toolset-12's libstdc++ (with GLIBCXX_3.4.30) # before conda's older libstdc++. LD_LIBRARY_PATH alone only affects runtime, not link time. -ENV LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LIBRARY_PATH:+:$LIBRARY_PATH} +ENV LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # Install git and git-lfs From 3cff73a102721e3bba8fdd0b7d07e2ba3bdafc36 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:18:12 -0600 Subject: [PATCH 07/13] Fail CI build if conda environment setup fails --- .github/workflows/gha_conda.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gha_conda.sh b/.github/workflows/gha_conda.sh index 846941378c..99fcbe4467 100755 --- a/.github/workflows/gha_conda.sh +++ b/.github/workflows/gha_conda.sh @@ -13,7 +13,7 @@ else cd ${GITHUB_WORKSPACE} # run install - source ./install_shapeworks.sh --developer + source ./install_shapeworks.sh --developer || exit 1 conda clean -p -t -y pip cache info pip cache purge From b47902765a799c106218d0f77fb0963eb486872f Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:21:30 -0600 Subject: [PATCH 08/13] Downgrade open3d-cpu for manylinux with glibc 2.28 --- install_shapeworks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_shapeworks.sh b/install_shapeworks.sh index 3002ac6cdf..45d6068bf6 100644 --- a/install_shapeworks.sh +++ b/install_shapeworks.sh @@ -182,7 +182,7 @@ function install_conda() { # for network analysis # open3d needs to be installed differently on each platform so it's not part of python_requirements.txt if [[ "$(uname)" == "Linux" ]]; then - if ! pip install open3d-cpu==0.19.0; then return 1; fi + if ! pip install open3d-cpu==0.18.0; then return 1; fi elif [[ "$(uname)" == "Darwin" ]]; then if ! pip install open3d==0.19.0; then return 1; fi From 73100b4a9c8533e1dbdda1c5ad0a54e18a00d96f Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:29:41 -0600 Subject: [PATCH 09/13] Downgrade the other open3ds --- install_shapeworks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_shapeworks.sh b/install_shapeworks.sh index 45d6068bf6..e01ed828fd 100644 --- a/install_shapeworks.sh +++ b/install_shapeworks.sh @@ -184,7 +184,7 @@ function install_conda() { if [[ "$(uname)" == "Linux" ]]; then if ! pip install open3d-cpu==0.18.0; then return 1; fi elif [[ "$(uname)" == "Darwin" ]]; then - if ! pip install open3d==0.19.0; then return 1; fi + if ! pip install open3d==0.18.0; then return 1; fi if [[ "$(uname -m)" == "arm64" ]]; then pushd $CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu @@ -194,7 +194,7 @@ function install_conda() { ln -sf "$CONDA_PREFIX/lib/libomp.dylib" "$CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu/../../../libomp.dylib" fi else - if ! pip install open3d==0.19.0; then return 1; fi + if ! pip install open3d==0.18.0; then return 1; fi fi for package in DataAugmentationUtilsPackage DatasetUtilsPackage MONAILabelPackage DeepSSMUtilsPackage DocumentationUtilsPackage ShapeCohortGenPackage shapeworks ; do From c5c73cb962418fded935c4fed09cbd87cc9fadca Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 00:46:29 -0600 Subject: [PATCH 10/13] Make open3d optional for manylinux compatibility open3d-cpu 0.19.0 requires glibc 2.31 (manylinux_2_31) which is incompatible with the manylinux_2_28 build environment. Make open3d installation optional and use lazy imports so the shapeworks package loads without open3d. Network analysis features will show a clear error message if open3d is not available. --- .../shapeworks/shapeworks/network_analysis.py | 13 ++++++- .../shapeworks/network_analysis_figures.py | 13 ++++++- install_shapeworks.sh | 34 +++++++++++++------ 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/Python/shapeworks/shapeworks/network_analysis.py b/Python/shapeworks/shapeworks/network_analysis.py index d5d926ba3d..46e79c7ca0 100644 --- a/Python/shapeworks/shapeworks/network_analysis.py +++ b/Python/shapeworks/shapeworks/network_analysis.py @@ -4,7 +4,6 @@ import trimesh import itertools -import open3d as o3d import scipy import spm1d import vtk @@ -19,6 +18,8 @@ import shapeworks as sw np.random.seed(0) +# open3d is imported lazily when needed (not available on all platforms) + class NetworkAnalysis: def __init__(self, project): @@ -85,6 +86,16 @@ def compute_mean_shape(self): return mesh_points, mesh_normals, mean_shape, surface def run(self): + # Import open3d here (lazy import - not available on all platforms) + try: + import open3d as o3d + except ImportError: + raise ImportError( + "open3d is required for network analysis but is not installed. " + "This feature may not be available on your platform/Python version. " + "Try: pip install open3d-cpu (Linux) or pip install open3d (macOS/Windows)" + ) + project = self.project analyze = self.analyze num_pts = analyze.get_num_particles() diff --git a/Python/shapeworks/shapeworks/network_analysis_figures.py b/Python/shapeworks/shapeworks/network_analysis_figures.py index d05b37f960..970303c2fe 100644 --- a/Python/shapeworks/shapeworks/network_analysis_figures.py +++ b/Python/shapeworks/shapeworks/network_analysis_figures.py @@ -10,7 +10,6 @@ import trimesh # import itertools # import operator -import open3d as o3d import scipy # import spm1d import vtk @@ -24,11 +23,23 @@ import vedo import cv2 +# open3d is imported lazily when needed (not available on all platforms) + class NetworkAnalysisFigures: def __init__(self, network_analysis): self.network_analysis = network_analysis def run(self): + # Import open3d here (lazy import - not available on all platforms) + try: + import open3d as o3d + except ImportError: + raise ImportError( + "open3d is required for network analysis figures but is not installed. " + "This feature may not be available on your platform/Python version. " + "Try: pip install open3d-cpu (Linux) or pip install open3d (macOS/Windows)" + ) + # In[4]: analyze = self.network_analysis.analyze diff --git a/install_shapeworks.sh b/install_shapeworks.sh index e01ed828fd..cdb64bfcb0 100644 --- a/install_shapeworks.sh +++ b/install_shapeworks.sh @@ -179,22 +179,34 @@ function install_conda() { if ! python -m light_the_torch install torch==2.8.0 torchaudio==2.8.0 torchvision==0.23.0; then return 1; fi fi - # for network analysis + # for network analysis (optional - not available on all platforms/Python versions) # open3d needs to be installed differently on each platform so it's not part of python_requirements.txt + OPEN3D_INSTALLED=NO if [[ "$(uname)" == "Linux" ]]; then - if ! pip install open3d-cpu==0.18.0; then return 1; fi + if pip install open3d-cpu==0.19.0; then + OPEN3D_INSTALLED=YES + else + echo "WARNING: open3d-cpu could not be installed. Network analysis features will not be available." + fi elif [[ "$(uname)" == "Darwin" ]]; then - if ! pip install open3d==0.18.0; then return 1; fi - - if [[ "$(uname -m)" == "arm64" ]]; then - pushd $CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu - install_name_tool -change /opt/homebrew/opt/libomp/lib/libomp.dylib @rpath/libomp.dylib pybind.cpython-312-darwin.so - install_name_tool -add_rpath @loader_path/../../../ pybind.cpython-312-darwin.so - popd - ln -sf "$CONDA_PREFIX/lib/libomp.dylib" "$CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu/../../../libomp.dylib" + if pip install open3d==0.19.0; then + OPEN3D_INSTALLED=YES + if [[ "$(uname -m)" == "arm64" ]]; then + pushd $CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu + install_name_tool -change /opt/homebrew/opt/libomp/lib/libomp.dylib @rpath/libomp.dylib pybind.cpython-312-darwin.so + install_name_tool -add_rpath @loader_path/../../../ pybind.cpython-312-darwin.so + popd + ln -sf "$CONDA_PREFIX/lib/libomp.dylib" "$CONDA_PREFIX/lib/python3.12/site-packages/open3d/cpu/../../../libomp.dylib" + fi + else + echo "WARNING: open3d could not be installed. Network analysis features will not be available." fi else - if ! pip install open3d==0.18.0; then return 1; fi + if pip install open3d==0.19.0; then + OPEN3D_INSTALLED=YES + else + echo "WARNING: open3d could not be installed. Network analysis features will not be available." + fi fi for package in DataAugmentationUtilsPackage DatasetUtilsPackage MONAILabelPackage DeepSSMUtilsPackage DocumentationUtilsPackage ShapeCohortGenPackage shapeworks ; do From 5921380e032d04cf49a7be801971d9f34d95e6d3 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 10:16:27 -0600 Subject: [PATCH 11/13] Update dockerfile to use GCC 13 --- .github/workflows/Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index 1a9f416b92..46b0379500 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -10,21 +10,16 @@ FROM quay.io/pypa/manylinux_2_28_x86_64 AS env LABEL maintainer="akenmorris@gmail.com" # Set environment variables -ENV PATH=/opt/rh/gcc-toolset-12/root/usr/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # Enable PowerTools repo for additional development packages RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertools # Update and install build tools -# gcc-toolset-12 provides modern GCC 12 while keeping GLIBC 2.28 for binary compatibility. -# The conda Qt5/ICU packages require GLIBCXX_3.4.28+ which system GCC 8 doesn't provide. +# gcc-toolset-13 provides GCC 13 with GLIBCXX_3.4.31, required by conda Qt5/ICU packages. +# This keeps GLIBC 2.28 for binary compatibility while providing modern C++ library symbols. RUN dnf update -y && dnf groupinstall -y "Development Tools" \ - && dnf install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils - -# LIBRARY_PATH: ensures the linker finds gcc-toolset-12's libstdc++ (with GLIBCXX_3.4.30) -# before conda's older libstdc++. LD_LIBRARY_PATH alone only affects runtime, not link time. -ENV LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib -ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + && dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils gcc-toolset-13-libstdc++-devel # Install git and git-lfs RUN dnf install -y git curl @@ -45,6 +40,15 @@ RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh - && echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc \ && echo "conda activate base" >> ~/.bashrc +# Install modern libstdc++ with GLIBCXX_3.4.30+ required by conda Qt5/ICU packages +# gcc-toolset-13 only provides static libstdc++, so we use conda-forge's libstdcxx-ng +RUN /opt/conda/bin/conda install -y -c conda-forge libstdcxx-ng=13 \ + && LIBSTDCXX=$(ls /opt/conda/lib/libstdc++.so.6.0.* | head -1) \ + && cp -f "$LIBSTDCXX" /usr/lib64/ \ + && rm -f /usr/lib64/libstdc++.so.6 \ + && ln -s $(basename "$LIBSTDCXX") /usr/lib64/libstdc++.so.6 \ + && ldconfig + # Get and decompress linuxdeployqt, it's complicated to use fuse with docker due to the kernel module RUN curl -L -o $HOME/linuxdeployqt.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/5/linuxdeployqt-5-x86_64.AppImage && chmod +x $HOME/linuxdeployqt.AppImage ; cd $HOME ; ./linuxdeployqt.AppImage --appimage-extract RUN ln -s /root/squashfs-root/usr/bin/linuxdeployqt /usr/bin From 796d82f96d71a79fb1c78bc1565944397ce1196f Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 15:39:23 -0600 Subject: [PATCH 12/13] Disable LTO for Python module to avoid GCC 13 ICE --- Libs/Python/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libs/Python/CMakeLists.txt b/Libs/Python/CMakeLists.txt index d01de1a59b..44120688e0 100644 --- a/Libs/Python/CMakeLists.txt +++ b/Libs/Python/CMakeLists.txt @@ -1,4 +1,5 @@ -pybind11_add_module(shapeworks_py +# NO_EXTRAS disables LTO which can cause GCC internal compiler errors +pybind11_add_module(shapeworks_py NO_EXTRAS ShapeworksPython.cpp PythonAnalyze.cpp PythonGroom.cpp From c0e85096cf5a8e404fc83e21598725cc217d25d3 Mon Sep 17 00:00:00 2001 From: Alan Morris Date: Mon, 23 Mar 2026 16:36:52 -0600 Subject: [PATCH 13/13] Keep libfreetype in package for harfbuzz compatibility --- Support/package.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Support/package.sh b/Support/package.sh index e6e52fe158..34a93ebf90 100755 --- a/Support/package.sh +++ b/Support/package.sh @@ -138,7 +138,8 @@ else linuxdeployqt ShapeWorksStudio -verbose=2 cd .. - rm lib/libxcb* lib/libX* lib/libfont* lib/libfreetype* + # Keep libfreetype as harfbuzz depends on it (FT_Get_Transform requires freetype 2.11+) + rm lib/libxcb* lib/libX* lib/libfont* rm -rf geometry-central doc fi