diff --git a/build_container/build_container_centos.sh b/build_container/build_container_centos.sh index 29b7fa18..f538b383 100755 --- a/build_container/build_container_centos.sh +++ b/build_container/build_container_centos.sh @@ -14,6 +14,9 @@ yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils java- ln -s /usr/bin/cmake3 /usr/bin/cmake ln -s /usr/bin/ninja-build /usr/bin/ninja +# For LLVM to pick right libstdc++ +ln -s /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9 /usr/lib/gcc/x86_64-redhat-linux + # SLES 11 has older glibc than CentOS 7, so pre-built binary for it works on CentOS 7 LLVM_VERSION=9.0.0 diff --git a/build_container/build_container_common.sh b/build_container/build_container_common.sh index 2343f70c..55191fdc 100755 --- a/build_container/build_container_common.sh +++ b/build_container/build_container_common.sh @@ -28,21 +28,21 @@ function install_gn(){ if [[ "$(uname -m)" == "x86_64" ]]; then # buildifier - VERSION=0.29.0 + VERSION=2.2.1 download_and_check /usr/local/bin/buildifier https://github.com/bazelbuild/buildtools/releases/download/"$VERSION"/buildifier \ - 4c985c883eafdde9c0e8cf3c8595b8bfdf32e77571c369bf8ddae83b042028d6 + 731a6a9bf8fca8a00a165cd5b3fbac9907a7cf422ec9c2f206b0a76c0a7e3d62 chmod +x /usr/local/bin/buildifier # buildozer - VERSION=0.29.0 + VERSION=2.2.1 download_and_check /usr/local/bin/buildozer https://github.com/bazelbuild/buildtools/releases/download/"$VERSION"/buildozer \ - 2a5c3e3390de07248704f21ed38495062fb623c9b0aef37deda257a917891ea6 + 5aa4f70f5f04599da2bb5b7e6a46af3e323a3a744c11d7802517d956909633ae chmod +x /usr/local/bin/buildozer # bazelisk - VERSION=1.0 + VERSION=1.3.0 download_and_check /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v${VERSION}/bazelisk-linux-amd64 \ - 820f1432bb729cf1d51697a64ce57c0cff7ea4013acaf871b8c24b6388174d0d + 98af93c6781156ff3dd36fa06ba6b6c0a529595abb02c569c99763203f3964cc chmod +x /usr/local/bin/bazel fi @@ -61,12 +61,12 @@ rm "./${LLVM_RELEASE}.tar.xz" echo "/opt/llvm/lib" > /etc/ld.so.conf.d/llvm.conf ldconfig -# MSAN -export PATH="/opt/llvm/bin:${PATH}" - # Install gn tools. install_gn +# MSAN +export PATH="/opt/llvm/bin:${PATH}" + WORKDIR=$(mktemp -d) function cleanup { rm -rf "${WORKDIR}" diff --git a/build_container/build_container_ubuntu.sh b/build_container/build_container_ubuntu.sh index 9c24041f..fc690bec 100755 --- a/build_container/build_container_ubuntu.sh +++ b/build_container/build_container_ubuntu.sh @@ -9,7 +9,7 @@ apt-get update export DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common apt-transport-https curl -# gcc-7 +# gcc-9 add-apt-repository -y ppa:ubuntu-toolchain-r/test apt-get update apt-get install -y --no-install-recommends g++-9 @@ -40,8 +40,8 @@ esac apt-get update -y apt-get install -y --no-install-recommends docker-ce-cli wget make cmake git python python-pip python-setuptools python3 python3-pip \ - python3-setuptools unzip bc libtool automake zip time gdb strace tshark tcpdump patch xz-utils rsync ssh-client google-cloud-sdk \ - libncurses-dev doxygen graphviz + python3-setuptools python3-yaml unzip bc libtool automake zip time gdb strace tshark tcpdump patch xz-utils rsync ssh-client \ + google-cloud-sdk libncurses-dev doxygen graphviz # Python 3.8 add-apt-repository -y ppa:deadsnakes/ppa diff --git a/build_container/docker_build.sh b/build_container/docker_build.sh index 6afbc1a8..589d1e93 100755 --- a/build_container/docker_build.sh +++ b/build_container/docker_build.sh @@ -1,6 +1,7 @@ #!/bin/bash #The ppc64le is not supportted by google-cloud-sdk. So ppc64le is temporary removed. -IMAGE_ARCH=("amd64" "arm64") + +set -e build_image() { @@ -37,6 +38,8 @@ docker run --rm --privileged multiarch/qemu-user-static:register --reset [[ -z "${LINUX_DISTRO}" ]] && LINUX_DISTRO="ubuntu" [[ -z "${IMAGE_NAME}" ]] && IMAGE_NAME=envoyproxy/envoy-build-"${LINUX_DISTRO}" +IMAGE_ARCH=("amd64" "arm64") + for arch in "${IMAGE_ARCH[@]}" do echo "Build the $arch image" diff --git a/toolchains/regenerate.sh b/toolchains/regenerate.sh index 224418ba..4bc593f8 100755 --- a/toolchains/regenerate.sh +++ b/toolchains/regenerate.sh @@ -22,7 +22,7 @@ cp -vf "${RBE_AUTOCONF_ROOT}/toolchains/empty.bzl" "${RBE_AUTOCONF_ROOT}/toolcha # Bazel query is the right command so bazel won't fail itself. # Keep bazel versions here at most two: current master version, next version -for BAZEL_VERSION in "2.0.0" "2.1.0"; do +for BAZEL_VERSION in "2.0.0" "2.2.0"; do USE_BAZEL_VERSION="${BAZEL_VERSION}" bazel query ${BAZEL_QUERY_OPTIONS} "@rbe_ubuntu_clang_gen//..." USE_BAZEL_VERSION="${BAZEL_VERSION}" bazel query ${BAZEL_QUERY_OPTIONS} "@rbe_ubuntu_clang_libcxx_gen//..." USE_BAZEL_VERSION="${BAZEL_VERSION}" bazel query ${BAZEL_QUERY_OPTIONS} "@rbe_ubuntu_gcc_gen//..."