Apt-get install failed for clang-5.0

We use a fairly standard Travis setup

git:
  depth: 1
  submodules: false

matrix:
  include:
    - os: linux
      language: cpp
      compiler: clang
      addons:
        apt:
          sources: llvm-toolchain-trusty-5.0
          packages: clang-5.0
      env:
        - TRAVIS_CI_ROW="regression-suite"
        - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
    - os: linux
      sudo: required
      services: docker
      env:
        - TRAVIS_CI_ROW="oss-fuzz-build"
        - MATRIX_EVAL=

before_install:
  - sudo apt-get -qq update && sudo apt-get install -y autoconf cmake libtool
  - eval "${MATRIX_EVAL}"

script:
  - bash fuzzing/scripts/run-travis-ci.sh

but two days ago our builds stopped working, failing with

The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install clang-5.0" failed and exited with 100 during .

Restarting the build does not help either. I would be very happy for some advice on this.

Thanks
Armin

Sorry, sure: https://travis-ci.com/freetype/freetype2-testing/builds/120925936

Thanks a lot :slight_smile:

You seem to be using a Trusty-specific 3rd-party repo.

It should still work that way, according to docs: https://docs.travis-ci.com/user/languages/c/#clang-on-linux

If the preinstalled clang fits you, you don’t need to try to install it from elsewhere at the same time :slight_smile: I.e. there’s no need for addons: apt:.

Alright, but following the docs exactly (https://docs.travis-ci.com/user/languages/c/#clang-on-linux) fails as well: https://travis-ci.com/freetype/freetype2-testing/jobs/220239164/config This must be an issue on Travis’ side of things …

EDIT: afaik Travis’ standard clang version is 3.6 and that doesn’t work for what we need (5 is already not ideal but the lowest we want to do).

The doc says to use apt: only “to upgrade Clang to a more recent version” – which you don’t need because Xenial has v7 preinstalled. And the examples are for Precise and Trusty as their comments say, neither of which applies to you.
So the doc is technically correct.
Preinstalled versions are in accordance to the doc, too.

1 Like

Aaaaaahhhhh, now I get it! Thanks a lot, it builds again :smiling_face_with_three_hearts:

Imprint