steps: # We're executing in the container as non-root but `yum` requires root. We # need to install `sudo` but to do that we need `sudo`. Do a bit of a weird # hack where we use the host `docker` executable to re-execute in our own # container with the root user to install `sudo` - bash: /tmp/docker exec -t -u 0 ci-container sh -c "yum install -y sudo" displayName: Configure sudo # See https://edwards.sdsu.edu/research/c11-on-centos-6/ for where these # various commands came from. - bash: | set -e sudo yum install -y centos-release-scl cmake xz epel-release sudo yum install -y rh-python36 patchelf unzip sudo yum install -y devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++ echo "##vso[task.prependpath]/opt/rh/devtoolset-8/root/usr/bin" echo "##vso[task.prependpath]/opt/rh/rh-python36/root/usr/bin" displayName: Install system dependencies # Delete `libstdc++.so` to force gcc to link against `libstdc++.a` instead. # This is a hack and not the right way to do this, but it ends up doing the # right thing for now. - bash: sudo rm -f /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++.so displayName: Force a static libstdc++