Use the clang and cmake that come bundled inside the default travis image these are now new enough and for now this avoids the problem of clang from the APT source not supporting stdatomic properly: https://bugs.llvm.org/show_bug.cgi?id=37457 Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- .travis.yml | 10 +--------- buildlib/cbuild | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20d3dd2e8562fb..5aadf538d0db21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: c -# We need at least cmake 2.12, this means we need to use trusty. -# Precise's glibc, etc predates what we are willing to support. -# sudo is required to get the trusty image, and at present to enable new llvm +# We don't support any distro earlier than trusty sudo: required dist: trusty addons: @@ -10,17 +8,11 @@ addons: # doing this APT setup pass. apt: sources: - # sourceline because travis won't white list trusty builds, and hasn't - # whitelisted 5.0 - - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" - key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key" - ubuntu-toolchain-r-test # Multiverse is not on by default and we need it to get sparse - sourceline: "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" packages: - build-essential - - clang-5.0 - - cmake - debhelper - dh-systemd - fakeroot diff --git a/buildlib/cbuild b/buildlib/cbuild index 9fed01510b570d..78efb8846d6f35 100755 --- a/buildlib/cbuild +++ b/buildlib/cbuild @@ -275,6 +275,17 @@ class travis(APTEnvironment): "su -l -c %s"%(pipes.quote(" && ".join(self.yaml["before_script"]))) + " travis"]; return cmds + def get_clang(self): + """We are using the clang that comes in travis, which is not part of our base + docker container, install something similar by hand.""" + llvm_tar = "clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-14.04.tar.xz" + cmds = [ + """RUN wget -q http://releases.llvm.org/5.0.2/{0} -O /tmp/{0} && \\ + tar xf /tmp/{0} -C /usr/local/ && \\ + rm /tmp/{0} && \\ + (cd /usr/local/bin/ && ln -sf ../clang*/bin/clang-5.0 .)""".format(llvm_tar)]; + return cmds; + def get_docker_file(self): # First this to get apt-add-repository self.pkgs = {"software-properties-common"} @@ -284,12 +295,16 @@ class travis(APTEnvironment): res.lines.extend(self.get_repos()); # Package list from the travis.yml + # Travis uses the new cmake built into the image, we need to get an + # older version from ubuntu. res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s"%( - " ".join(sorted(self.yaml["addons"]["apt"]["packages"])))); + " ".join(sorted(["cmake"] + self.yaml["addons"]["apt"]["packages"])))); # Adding before_script commands res.lines.extend(self.get_before_script()) + res.lines.extend(self.get_clang()) + return res; # ------------------------------------------------------------------------- -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html