From 1e21b2cba8c96e4ab930d7aad473e08ddb483a78 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 30 Jan 2021 12:29:22 +0100 Subject: Build newer version of cmake in Docker images LLVM requires CMake 3.13.4, which is only available as of Ubuntu 20.04. On images using an older version, build it manually. --- src/ci/docker/host-x86_64/arm-android/Dockerfile | 3 ++ .../host-x86_64/dist-aarch64-linux/Dockerfile | 3 ++ src/ci/docker/host-x86_64/dist-android/Dockerfile | 3 ++ .../docker/host-x86_64/dist-arm-linux/Dockerfile | 3 ++ .../docker/host-x86_64/dist-armhf-linux/Dockerfile | 3 ++ .../docker/host-x86_64/dist-armv7-linux/Dockerfile | 3 ++ .../dist-i586-gnu-i586-i686-musl/Dockerfile | 3 ++ .../docker/host-x86_64/dist-mips-linux/Dockerfile | 3 ++ .../host-x86_64/dist-mips64-linux/Dockerfile | 3 ++ .../host-x86_64/dist-mips64el-linux/Dockerfile | 3 ++ .../host-x86_64/dist-mipsel-linux/Dockerfile | 3 ++ .../host-x86_64/dist-powerpc-linux/Dockerfile | 3 ++ .../host-x86_64/dist-powerpc64-linux/Dockerfile | 3 ++ .../host-x86_64/dist-powerpc64le-linux/Dockerfile | 3 ++ .../host-x86_64/dist-riscv64-linux/Dockerfile | 3 ++ .../docker/host-x86_64/dist-s390x-linux/Dockerfile | 3 ++ .../host-x86_64/dist-x86_64-freebsd/Dockerfile | 3 ++ .../host-x86_64/dist-x86_64-illumos/Dockerfile | 3 ++ .../docker/host-x86_64/dist-x86_64-musl/Dockerfile | 3 ++ .../host-x86_64/dist-x86_64-netbsd/Dockerfile | 3 ++ src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile | 3 ++ src/ci/docker/host-x86_64/i686-gnu/Dockerfile | 3 ++ .../docker/host-x86_64/x86_64-gnu-aux/Dockerfile | 3 ++ .../host-x86_64/x86_64-gnu-distcheck/Dockerfile | 3 ++ .../docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 3 ++ src/ci/docker/scripts/cmake.sh | 34 ++++++++++++++++++++++ 26 files changed, 109 insertions(+) create mode 100755 src/ci/docker/scripts/cmake.sh (limited to 'src/ci/docker') diff --git a/src/ci/docker/host-x86_64/arm-android/Dockerfile b/src/ci/docker/host-x86_64/arm-android/Dockerfile index f675252fb16..43cdbbe92e3 100644 --- a/src/ci/docker/host-x86_64/arm-android/Dockerfile +++ b/src/ci/docker/host-x86_64/arm-android/Dockerfile @@ -36,5 +36,8 @@ ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target $TARGETS COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + COPY scripts/android-start-emulator.sh /scripts/ ENTRYPOINT ["/scripts/android-start-emulator.sh"] diff --git a/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile index 95c54ca1abc..e6b6b6e53b9 100644 --- a/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile @@ -24,6 +24,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-android/Dockerfile b/src/ci/docker/host-x86_64/dist-android/Dockerfile index 258dcea06e6..ee727359f39 100644 --- a/src/ci/docker/host-x86_64/dist-android/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-android/Dockerfile @@ -36,3 +36,6 @@ ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh + +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh diff --git a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile index 88b13eab2d0..1be3fecd88f 100644 --- a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile @@ -27,6 +27,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabi/bin ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile index 977ef08c274..66eb4137a87 100644 --- a/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile @@ -19,6 +19,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile index 65d713359d9..c13f63911f8 100644 --- a/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile @@ -19,6 +19,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile index c734202eef6..c98fc7dcfff 100644 --- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile @@ -30,6 +30,9 @@ RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV RUST_CONFIGURE_ARGS \ --musl-root-i586=/musl-i586 \ --musl-root-i686=/musl-i686 \ diff --git a/src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile index cb5c17c25ab..b0f06569a9c 100644 --- a/src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile @@ -21,6 +21,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV HOSTS=mips-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs diff --git a/src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile index 31146e3ead4..245c28e1fa3 100644 --- a/src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV HOSTS=mips64-unknown-linux-gnuabi64 ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs diff --git a/src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile index dadd50a7e66..03998c8880a 100644 --- a/src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile @@ -21,6 +21,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV HOSTS=mips64el-unknown-linux-gnuabi64 ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs diff --git a/src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile index d2d65565b10..58617270621 100644 --- a/src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV HOSTS=mipsel-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs diff --git a/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile index 651daac8613..ecaa495e97a 100644 --- a/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile @@ -25,6 +25,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/powerpc-unknown-linux-gnu/bin ENV \ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile index 6ff4d787212..a22d9a7553e 100644 --- a/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile @@ -26,6 +26,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-gnu/bin ENV \ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile index c1a621ff105..5157dd4c79b 100644 --- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile @@ -25,6 +25,9 @@ RUN ./build-powerpc64le-toolchain.sh COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV \ AR_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-ar \ CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-riscv64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-riscv64-linux/Dockerfile index dff7c475157..80b7793cb7e 100644 --- a/src/ci/docker/host-x86_64/dist-riscv64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-riscv64-linux/Dockerfile @@ -19,6 +19,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/riscv64-unknown-linux-gnu/bin ENV CC_riscv64gc_unknown_linux_gnu=riscv64-unknown-linux-gnu-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile index 1b261993cfc..5e626243952 100644 --- a/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile @@ -25,6 +25,9 @@ USER root COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/s390x-ibm-linux-gnu/bin ENV \ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile index 8413d775ac4..121dd3f455a 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile @@ -23,6 +23,9 @@ RUN /tmp/freebsd-toolchain.sh x86_64 COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV \ AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-ar \ CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-clang \ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile index 2a0f6a39c57..c2e44ead51e 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile @@ -22,6 +22,9 @@ RUN bash /tmp/illumos-toolchain.sh x86_64 gcc COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV \ AR_x86_64_unknown_illumos=x86_64-illumos-ar \ CC_x86_64_unknown_illumos=x86_64-illumos-gcc \ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile index 904ee64db3b..d779e8d7b5d 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile @@ -29,6 +29,9 @@ RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,-- COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV HOSTS=x86_64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS \ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile index f3f7255f154..92bdc9811fd 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile @@ -9,6 +9,9 @@ RUN /tmp/build-netbsd-toolchain.sh COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV PATH=$PATH:/x-tools/x86_64-unknown-netbsd/bin ENV \ diff --git a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile index 0e28ea9668f..0182ebb8b59 100644 --- a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + RUN mkdir -p /config RUN echo "[rust]" > /config/nopt-std-config.toml RUN echo "optimize = false" >> /config/nopt-std-config.toml diff --git a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile index 195601755f3..feaab819bdd 100644 --- a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu # Exclude some tests that are unlikely to be platform specific, to speed up # this slow job. diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile index a5bedadc05b..00ad7b0a710 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile @@ -42,5 +42,8 @@ RUN npm install browser-ui-test -g --unsafe-perm=true COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUST_CHECK_TARGET check-aux-and-gui diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile index 5faa0ccab56..09d9cda02bd 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile @@ -19,6 +19,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.ignore-git=false ENV SCRIPT python3 ../x.py --stage 2 test distcheck ENV DIST_SRC 1 diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index 89171a6f215..d4838c0d6f8 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -18,6 +18,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ ENV RUST_CONFIGURE_ARGS \ diff --git a/src/ci/docker/scripts/cmake.sh b/src/ci/docker/scripts/cmake.sh new file mode 100755 index 00000000000..70096173403 --- /dev/null +++ b/src/ci/docker/scripts/cmake.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -ex + +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/build.log + set -x +} + +# LLVM 12 requires CMake 3.13.4 or higher. +# This script is not necessary for images using Ubuntu 20.04 or newer. +CMAKE=3.13.4 +curl -L https://github.com/Kitware/CMake/releases/download/v$CMAKE/cmake-$CMAKE.tar.gz | tar xzf - + +mkdir cmake-build +cd cmake-build +hide_output ../cmake-$CMAKE/configure +hide_output make -j$(nproc) +hide_output make install + +cd .. +rm -rf cmake-build +rm -rf cmake-$CMAKE -- cgit 1.4.1-3-g733a5 From b763d9a40c526f5f72c0668d26f69241e7a42511 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Feb 2021 18:11:28 +0100 Subject: Build both Python 2 and Python 3 on x86 dist builders Python 2 is needed for Clang 10, Python 3 for LLVM 12. The Python 2 dependency could be removed by upgrading to Clang 11, but that causes linker errors of unclear origin. --- src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile | 8 +++++--- src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile | 8 +++++--- src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh | 7 ++++--- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'src/ci/docker') diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index 22d7cbb0d14..247b539652b 100644 --- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -68,11 +68,13 @@ RUN ./build-binutils.sh COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && apt-get remove -y gcc g++ -# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+ COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ -RUN ./build-python.sh +# Build Python 2.7 needed for Clang 10. +RUN ./build-python.sh 2.7.12 +# Build Python 3 needed for LLVM 12. +RUN ./build-python.sh 3.9.1 -# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4. +# LLVM needs cmake 3.13.4 or higher. COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index d1b4bbf7fff..4dd4378f196 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -68,11 +68,13 @@ RUN ./build-binutils.sh COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && apt-get remove -y gcc g++ -# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+ COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ -RUN ./build-python.sh +# Build Python 2.7 needed for Clang 10. +RUN ./build-python.sh 2.7.12 +# Build Python 3 needed for LLVM 12. +RUN ./build-python.sh 3.9.1 -# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4. +# LLVM needs cmake 3.13.4 or higher. COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh index c172b978112..970d67b6db3 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh @@ -3,7 +3,8 @@ set -ex source shared.sh -curl https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | \ +VERSION=$1 +curl https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz | \ tar xzf - mkdir python-build @@ -12,10 +13,10 @@ cd python-build # Gotta do some hackery to tell python about our custom OpenSSL build, but other # than that fairly normal. CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \ - hide_output ../Python-2.7.12/configure --prefix=/rustroot + hide_output ../Python-$VERSION/configure --prefix=/rustroot hide_output make -j10 hide_output make install cd .. rm -rf python-build -rm -rf Python-2.7.12 +rm -rf Python-$VERSION -- cgit 1.4.1-3-g733a5 From ea0aa8def379657559419a4dd2707e3bc60512b8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Feb 2021 20:52:44 +0100 Subject: 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. --- src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ci/docker') diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile index d779e8d7b5d..08f07eb8284 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile @@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /build/ +# Build cmake before musl toolchain, as we replace the compiler during that step. +COPY scripts/cmake.sh /scripts/ +RUN /scripts/cmake.sh + COPY scripts/musl-toolchain.sh /build/ # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well 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,-- COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - ENV HOSTS=x86_64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS \ -- cgit 1.4.1-3-g733a5