From 00722bbe525b59d384b6b0ba0a797cc2e6a0e065 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 13 Mar 2017 22:13:37 -0700 Subject: [PATCH 1/2] travis: Ensure cargo links libcurl statically We don't want a dynamic dependency in the library that we ship, so link it statically by configuring curl-sys's build script to not pick up the system version via pkg-config. --- src/ci/docker/dist-x86-linux/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ci/docker/dist-x86-linux/Dockerfile b/src/ci/docker/dist-x86-linux/Dockerfile index 3f6f71c41b520..282739ceebee9 100644 --- a/src/ci/docker/dist-x86-linux/Dockerfile +++ b/src/ci/docker/dist-x86-linux/Dockerfile @@ -86,4 +86,10 @@ ENV RUST_CONFIGURE_ARGS \ --enable-extended \ --enable-sanitizers ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS + +# This is the only builder which will create source tarballs ENV DIST_SRC 1 + +# When we build cargo in this container, we don't want it to use the system +# libcurl, instead it should compile its own. +ENV LIBCURL_NO_PKG_CONFIG 1 From 2b145f726e8c0ddfcb3b0d699ca004a2b4bcd2c1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 17 Mar 2017 07:04:18 -0700 Subject: [PATCH 2/2] travis: Use `hide_output` in dist-powerpc64-linux Looks like we blew the 4MB cap, so let's hide some more output. --- src/ci/docker/dist-powerpc64-linux/Dockerfile | 2 +- .../build-powerpc64-toolchain.sh | 17 +------------ .../build-powerpc64le-toolchain.sh | 16 ++++++------ src/ci/docker/dist-powerpc64-linux/shared.sh | 25 +++++++++++++++++++ 4 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 src/ci/docker/dist-powerpc64-linux/shared.sh diff --git a/src/ci/docker/dist-powerpc64-linux/Dockerfile b/src/ci/docker/dist-powerpc64-linux/Dockerfile index 2aeff7a0b90a5..6aca9a0cc78b1 100644 --- a/src/ci/docker/dist-powerpc64-linux/Dockerfile +++ b/src/ci/docker/dist-powerpc64-linux/Dockerfile @@ -61,7 +61,7 @@ USER rustbuild WORKDIR /tmp COPY patches/ /tmp/patches/ -COPY powerpc64-linux-gnu.config build-powerpc64-toolchain.sh /tmp/ +COPY shared.sh powerpc64-linux-gnu.config build-powerpc64-toolchain.sh /tmp/ RUN ./build-powerpc64-toolchain.sh USER root diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh index d70947d2dd9d6..c477cd61f98de 100755 --- a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh +++ b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh @@ -11,22 +11,7 @@ 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 - rm /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x -} +source shared.sh mkdir build cd build diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64le-toolchain.sh b/src/ci/docker/dist-powerpc64-linux/build-powerpc64le-toolchain.sh index 8b924ca34c47c..4d3e638916dbf 100755 --- a/src/ci/docker/dist-powerpc64-linux/build-powerpc64le-toolchain.sh +++ b/src/ci/docker/dist-powerpc64-linux/build-powerpc64le-toolchain.sh @@ -11,6 +11,8 @@ set -ex +source shared.sh + BINUTILS=2.25.1 GCC=5.3.0 TARGET=powerpc64le-linux-gnu @@ -40,9 +42,9 @@ pushd binutils-$TARGET curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf - mkdir binutils-build cd binutils-build -../binutils-$BINUTILS/configure --target=$TARGET --with-sysroot=$SYSROOT -make -j10 -make install +hide_output ../binutils-$BINUTILS/configure --target=$TARGET --with-sysroot=$SYSROOT +hide_output make -j10 +hide_output make install popd rm -rf binutils-$TARGET @@ -51,11 +53,11 @@ mkdir gcc-$TARGET pushd gcc-$TARGET curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.bz2 | tar xjf - cd gcc-$GCC -./contrib/download_prerequisites +hide_output ./contrib/download_prerequisites mkdir ../gcc-build cd ../gcc-build -../gcc-$GCC/configure \ +hide_output ../gcc-$GCC/configure \ --enable-languages=c,c++ \ --target=$TARGET \ --with-cpu=power8 \ @@ -72,8 +74,8 @@ cd ../gcc-build --disable-libsanitizer \ --disable-libquadmath-support \ --disable-lto -make -j10 -make install +hide_output hide_output make -j10 +hide_output make install popd rm -rf gcc-$TARGET diff --git a/src/ci/docker/dist-powerpc64-linux/shared.sh b/src/ci/docker/dist-powerpc64-linux/shared.sh new file mode 100644 index 0000000000000..97e6d2908cf8a --- /dev/null +++ b/src/ci/docker/dist-powerpc64-linux/shared.sh @@ -0,0 +1,25 @@ +# Copyright 2017 The Rust Project Developers. See the COPYRIGHT +# file at the top-level directory of this distribution and at +# http://rust-lang.org/COPYRIGHT. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +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 + set -x +}