Skip to content

Commit 4edb6a9

Browse files
committed
Fix macOS Dakota install hang via realpath dedupe
Dakota's install_macos_libs.py re-walks dylib deps with raw path-string dedupe, which blows up exponentially on 6.24's dependency graph (6h timeout). Patch it to dedupe by resolved real path before recursing.
1 parent e17c293 commit 4edb6a9

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/bundle_with_dakota_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
cd dakota-${{ inputs.DAKOTA_VERSION }}-public-src-cli
162162
163163
patch -p1 < $CAROLINA_DIR/dakota_manylinux_install_files/CMakeLists_includes.patch
164+
patch -p1 < $CAROLINA_DIR/dakota_manylinux_install_files/install_macos_libs.patch
164165
165166
PYTHON_INCLUDE_DIR="$(python -c "from sysconfig import get_paths as gp; g=gp(); print(f\"{g['include']} \")")"
166167
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- a/cmake/install_macos_libs.py 2026-06-12 10:03:21
2+
+++ b/cmake/install_macos_libs.py 2026-06-12 10:03:42
3+
@@ -172,11 +172,14 @@
4+
logging.debug(f"Copy: Deps of {filename} to process: {', '.join(deps_to_use)}")
5+
6+
newly_copied = []
7+
+ seen_real = {os.path.realpath(c) for c in copied}
8+
for dep in deps_to_use:
9+
- if dep in copied or dep == filename:
10+
+ dep_real = os.path.realpath(dep)
11+
+ if dep_real in seen_real or dep == filename:
12+
logging.debug(f"Copy: dependency {dep} skipped")
13+
continue
14+
else:
15+
+ seen_real.add(dep_real)
16+
p = pathlib.Path(dep)
17+
dest_filename = os.path.join(dest, p.name)
18+
if not any(dep.startswith(e) for e in exclude):

script/build_boost_dakota.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ tar xf "$CACHE_DIR"/$dakota_file
116116
cd "dakota-${DAKOTA_VERSION}-public-src-cli"
117117

118118
patch -p1 < ../../../dakota_manylinux_install_files/CMakeLists_includes.patch
119+
patch -p1 < ../../../dakota_manylinux_install_files/install_macos_libs.patch
119120

120121
mkdir -p build
121122
cd build

0 commit comments

Comments
 (0)