Skip to content

Commit efa103c

Browse files
committed
Build at /work to match local successful build path
User's local Julia cross-build that produced julia.exe ran at /work/julia-1.12.6/. My polyglot Dockerfile used /build/julia-1.12.6/. Both LLVM CMake and Julia's deps Makefiles cache absolute paths in CMakeCache.txt; on a path-sensitive lookup the difference between /work and /build could explain why CI hits the vt_gen failure (NATIVE sub-build doesn't produce NATIVE/bin/llvm-min-tblgen) while local doesn't. Cheap experiment: match the proven-good WORKDIR. Signed-off-by: Joris Gillis <joris@yacoda.com>
1 parent d2c6f5e commit efa103c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ FROM toolchain AS julia-builder
212212
ARG JULIA_VERSION=1.12.6
213213
ARG BUILD_JOBS=1
214214

215-
WORKDIR /build
215+
# Build under /work (not /build) to match the WORKDIR of the original
216+
# successful local build at ~/work/julia-build/. CMake caches absolute
217+
# paths in CMakeCache.txt; if Julia's deps/llvm.mk or the sub-make have
218+
# any path-sensitive lookup, matching the proven-good path is the cheap
219+
# safe choice.
220+
WORKDIR /work
216221
RUN curl -fsSL -o "julia-${JULIA_VERSION}-full.tar.gz" \
217222
"https://github.com/JuliaLang/julia/releases/download/v${JULIA_VERSION}/julia-${JULIA_VERSION}-full.tar.gz" \
218223
&& tar xzf "julia-${JULIA_VERSION}-full.tar.gz" \
@@ -248,7 +253,7 @@ MMTK_PLAN := None
248253
JULIA_CPU_TARGET := generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1)
249254
EOF
250255

251-
WORKDIR /build/julia-${JULIA_VERSION}
256+
WORKDIR /work/julia-${JULIA_VERSION}
252257
# BUILD_JOBS=1 to avoid the BuildKit `docker build` parallel-make race
253258
# (stray $(ARCH) token leaks into a gcc invocation in dep configures).
254259
# Cross-build is slow regardless — LLVM dominates.
@@ -268,7 +273,7 @@ FROM toolchain
268273
ARG JULIA_VERSION=1.12.6
269274

270275
# Carry the cross-built Julia install (usr/ is the install prefix).
271-
COPY --from=julia-builder /build/julia-${JULIA_VERSION}/usr /opt/julia
276+
COPY --from=julia-builder /work/julia-${JULIA_VERSION}/usr /opt/julia
272277
ENV JULIA_HOME=/opt/julia \
273278
JULIA_PATH=/opt/julia \
274279
JULIA_VERSION=${JULIA_VERSION}

0 commit comments

Comments
 (0)