Skip to content

Commit d9f2ccc

Browse files
committed
Debug + windows cbindgen install
Linux: print CC/HOSTCC/CFLAGS/MARCH/XC_HOST before make so next CI run reveals why libwhich.o gets gcc invoked with x86_64 as a positional arg (failing with 'linker input file not found'). Local repro is missing so the only handle is CI-side observability. Windows: upstream dockcross/windows-shared-x64-posix has rustc+cargo but not cbindgen — that comes from jgillis/dockcross 6a0fa8d, which is unpublished. Install cbindgen ourselves to match the Linux variants. Signed-off-by: Joris Gillis <joris@yacoda.com>
1 parent 26f7240 commit d9f2ccc

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

Dockerfile.windows

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ ARG BASE_IMAGE=dockcross/windows-shared-x64-posix:latest
2424

2525
FROM ${BASE_IMAGE}
2626

27-
# Smoke test at image-build time. Confirms the dockcross base has the
28-
# polyglot pieces we expect (gcc cross to mingw, rustc, cargo, cbindgen).
27+
# Upstream dockcross/windows-shared-x64-posix has rustc+cargo but NOT
28+
# cbindgen (only jgillis/dockcross 6a0fa8d does — and that fork isn't
29+
# published as a public image). Install cbindgen ourselves to match the
30+
# Linux variants of this image.
31+
RUN cargo install cbindgen --version 0.28.0 \
32+
&& rm -rf "${CARGO_HOME:-/root/.cargo}/registry" "${CARGO_HOME:-/root/.cargo}/git" 2>/dev/null || true
33+
34+
# Smoke test at image-build time. Confirms the polyglot pieces are in place.
2935
RUN ${CC} --version | head -1 && \
3036
${CXX} --version | head -1 && \
3137
rustc --version && \

scripts/build-julia.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ echo -n "glibc: "; ldd --version 2>&1 | head -1 || true
5151
set -o pipefail
5252
echo
5353

54+
echo "=== Env vars Julia's Make.inc reads ==="
55+
for v in ARCH CC CXX FC HOSTCC HOSTCXX MARCH MCPU MTUNE CFLAGS CXXFLAGS \
56+
CPPFLAGS LDFLAGS XC_HOST CROSS_TRIPLE CROSS_ROOT MAKEFLAGS MFLAGS; do
57+
eval "val=\${$v-<unset>}"
58+
printf ' %-15s = %s\n' "$v" "$val"
59+
done
60+
echo
61+
echo "=== Make's view (single-shot, no build) ==="
62+
# Print what Julia's outer make computes for the suspect vars without
63+
# actually building anything. Helps diagnose the libwhich x86_64 issue.
64+
make --no-print-directory print-CC print-HOSTCC print-CFLAGS \
65+
print-MARCH print-MCPU print-MTUNE 2>&1 \
66+
| head -20 || true
67+
echo
68+
5469
# Apply DISABLE_LIBUNWIND fix patches in-place via python string replacement.
5570
# This is more robust than `patch` against minor line-number drift across
5671
# Julia versions (the same fix submitted as JuliaLang/julia#61899). When the

0 commit comments

Comments
 (0)