Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang 6 on travis breaks due to libjsoncpp0

The travis ci for our build has broken due to the following problem:

The following packages have unmet dependencies:
 clang-6.0 : Depends: libjsoncpp0 (>= 0.6.0~rc2) but it is not installable
E: Unable to correct problems, you have held broken packages.
apt-get.diagnostics
apt-get install failed

sudo apt install libjsoncpp0 doesn't work as libjsoncpp0 doesn't exist; and I also tried sudo apt install libjsoncpp-dev succeeds, but doesn't solve the problem.

How can I install libjsoncpp0 on travis?

Build log, travis.yml.

like image 444
user14717 Avatar asked Oct 16 '22 14:10

user14717


1 Answers

Recently I have similar problem with clang-6.0 on Travis in my EventBus library. This just happen without any changes. Probably issue is in the default distro which is picked as: Trusty (here they mention this)

I fixed issue in this way:

# clang-6
- os: linux
  name: "Xenial - clang 6"
  dist: xenial
  env: [USE_CC='/usr/bin/clang-6.0', USE_CXX='/usr/bin/clang++-6.0']
  addons:
    apt:
      packages: ['clang-6.0', 'cmake']
      sources: ['ubuntu-toolchain-r-test']

Seems to work as you can see here Link to my full .travis.yml

Travis documentation about building C++ projects feels little bit old.


So the final result is:

enter image description here

like image 148
Dawid Avatar answered Oct 19 '22 04:10

Dawid