Skip to content

Commit 96ca502

Browse files
hyperpolymathclaude
andcommitted
fix(chapel-ci): pin CHPL_TARGET_CPU=none to match prebuilt runtime tuple
After bypassing the --no-codegen-specific ChapelSysCTypes lookup bug in the previous commit, the real chpl link surfaced the next layer: error: The runtime has not been built for this configuration. Run $CHPL_HOME/util/chplenv/printchplbuilds.py for information on available runtimes. The chapel/2.3.0 .deb ships a runtime built for exactly one target tuple: linux64/llvm/x86_64/cpu-none/loc-flat/comm-none/tasks-qthreads/... chpl's host-CPU auto-probe defaults to `native`, which does not match `cpu-none` and so chpl bails before the link. Source fix: pin the four CHPL_TARGET_* variables to the tuple the .deb actually ships with. Applied to all 4 Chapel install steps (chapel-build / chapel-smoke / chapel-tests / chapel-detachable-build) so the env is uniform across the workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent daec640 commit 96ca502

1 file changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/chapel-ci.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,25 @@ jobs:
167167
echo "$CHAPEL_DEB_SHA256 /tmp/chapel.deb" | sha256sum --check
168168
sudo apt-get update
169169
sudo apt-get install -y /tmp/chapel.deb
170-
# The Chapel .deb installs CHPL_HOME under /usr/share/chapel/<minor>.
171-
# `chpl` reads CHPL_HOME from the env to locate bundled modules
172-
# (ChapelSysCTypes lives there); without it the typecheck step
173-
# fails with "Could not find bundled module 'ChapelSysCTypes'".
170+
# The Chapel .deb installs CHPL_HOME under /usr/share/chapel/<minor>
171+
# and ships a runtime built for ONE target tuple:
172+
# linux64/llvm/x86_64/cpu-none/loc-flat/comm-none/tasks-qthreads/...
173+
# We pin CHPL_TARGET_CPU=none so chpl matches that prebuilt runtime;
174+
# otherwise the host-CPU auto-probe picks `native` and chpl bails
175+
# with "The runtime has not been built for this configuration".
174176
CHPL_HOME="$(dirname "$(dirname "$(realpath "$(which chpl)")")")"
175-
# Probe a few canonical install layouts in case the symlink target
176-
# is /usr/bin instead of /usr/share/chapel/<minor>/bin.
177177
if [ ! -d "$CHPL_HOME/modules" ]; then
178178
for cand in /usr/share/chapel/2.3 /usr/share/chapel/2 /usr/lib/chapel/2.3; do
179179
if [ -d "$cand/modules" ]; then CHPL_HOME="$cand"; break; fi
180180
done
181181
fi
182-
echo "CHPL_HOME=$CHPL_HOME" | tee -a "$GITHUB_ENV"
182+
{
183+
echo "CHPL_HOME=$CHPL_HOME"
184+
echo "CHPL_TARGET_PLATFORM=linux64"
185+
echo "CHPL_TARGET_COMPILER=llvm"
186+
echo "CHPL_TARGET_ARCH=x86_64"
187+
echo "CHPL_TARGET_CPU=none"
188+
} | tee -a "$GITHUB_ENV"
183189
chpl --version
184190
test -d "$CHPL_HOME/modules" || { echo "::error::CHPL_HOME bundled modules not found"; exit 1; }
185191
@@ -276,7 +282,13 @@ jobs:
276282
if [ -d "$cand/modules" ]; then CHPL_HOME="$cand"; break; fi
277283
done
278284
fi
279-
echo "CHPL_HOME=$CHPL_HOME" | tee -a "$GITHUB_ENV"
285+
{
286+
echo "CHPL_HOME=$CHPL_HOME"
287+
echo "CHPL_TARGET_PLATFORM=linux64"
288+
echo "CHPL_TARGET_COMPILER=llvm"
289+
echo "CHPL_TARGET_ARCH=x86_64"
290+
echo "CHPL_TARGET_CPU=none"
291+
} | tee -a "$GITHUB_ENV"
280292
test -d "$CHPL_HOME/modules" || { echo "::error::CHPL_HOME bundled modules not found"; exit 1; }
281293
282294
- name: Install just
@@ -333,7 +345,13 @@ jobs:
333345
if [ -d "$cand/modules" ]; then CHPL_HOME="$cand"; break; fi
334346
done
335347
fi
336-
echo "CHPL_HOME=$CHPL_HOME" | tee -a "$GITHUB_ENV"
348+
{
349+
echo "CHPL_HOME=$CHPL_HOME"
350+
echo "CHPL_TARGET_PLATFORM=linux64"
351+
echo "CHPL_TARGET_COMPILER=llvm"
352+
echo "CHPL_TARGET_ARCH=x86_64"
353+
echo "CHPL_TARGET_CPU=none"
354+
} | tee -a "$GITHUB_ENV"
337355
test -d "$CHPL_HOME/modules" || { echo "::error::CHPL_HOME bundled modules not found"; exit 1; }
338356
339357
- name: Install just
@@ -402,7 +420,13 @@ jobs:
402420
if [ -d "$cand/modules" ]; then CHPL_HOME="$cand"; break; fi
403421
done
404422
fi
405-
echo "CHPL_HOME=$CHPL_HOME" | tee -a "$GITHUB_ENV"
423+
{
424+
echo "CHPL_HOME=$CHPL_HOME"
425+
echo "CHPL_TARGET_PLATFORM=linux64"
426+
echo "CHPL_TARGET_COMPILER=llvm"
427+
echo "CHPL_TARGET_ARCH=x86_64"
428+
echo "CHPL_TARGET_CPU=none"
429+
} | tee -a "$GITHUB_ENV"
406430
test -d "$CHPL_HOME/modules" || { echo "::error::CHPL_HOME bundled modules not found"; exit 1; }
407431
408432
- name: Install just

0 commit comments

Comments
 (0)