Skip to content

Commit ea0aa8d

Browse files
committed
Build cmake earlier on dist-x86_64-musl
musl-toolchain.sh is called with REPLACE_CC=1, so it will replace the host compiler and the subsequent cmake build will fail because it cannot find the openssl headers. Move the cmake build earlier, so it happens before the compiler is replaced.
1 parent 34352d4 commit ea0aa8d

File tree

1 file changed

+4
-3
lines changed
  • src/ci/docker/host-x86_64/dist-x86_64-musl

1 file changed

+4
-3
lines changed

src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020

2121
WORKDIR /build/
2222

23+
# Build cmake before musl toolchain, as we replace the compiler during that step.
24+
COPY scripts/cmake.sh /scripts/
25+
RUN /scripts/cmake.sh
26+
2327
COPY scripts/musl-toolchain.sh /build/
2428
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
2529
RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
@@ -29,9 +33,6 @@ RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--
2933
COPY scripts/sccache.sh /scripts/
3034
RUN sh /scripts/sccache.sh
3135

32-
COPY scripts/cmake.sh /scripts/
33-
RUN /scripts/cmake.sh
34-
3536
ENV HOSTS=x86_64-unknown-linux-musl
3637

3738
ENV RUST_CONFIGURE_ARGS \

0 commit comments

Comments
 (0)