Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI cannot find packages in the pkg-config search path

Tags:

r

travis-ci

I've recently started encountering the same errors on my various R packages updated after mid-December on Travis-CI (https://travis-ci.org/TGuillerme/). This is specially weird since for the three concerned packages, the changes were not any code change (only comments changes) but Travis-CI seems now not able to install some packages (namely magick and libgit2) using a pretty simple .yml file runing the package and codecov for coverage:

language: r
warnings_are_errors: false

branches:
  only:
    - master
    - release
  except:
    - CRAN

# Code coverage
r_packages:
  - covr

after_success:
- Rscript -e 'library(covr); codecov(token = "5f041826-63f1-47fa-b4a8-9a32633f47fa")'

The error I get in this case (although it varies with the different packages) is with the magick package:

** package ‘magick’ successfully unpacked and MD5 sums checked
Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Magick++' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16

line 2625-2631

Along with one suspicious message prior to this:

Unable to find the libgit2 library on this system. Building 'git2r'
using the bundled source of the libgit2 library.

line 1563-1564

Is there something obvious that I am missing? Is there a way to force Travis-CI to automatically install the the errored packages?

Again, this is specially weird to me since the running code changes committed do not differ since last build running without errors.

like image 528
Thomas Guillerme Avatar asked Oct 16 '22 09:10

Thomas Guillerme


1 Answers

I have been able to fix similar issues by installing packages from their binaries.

The following might help in the .travis.yml:

r_binary_packages:
    - libgit2
    - magick
like image 51
r_alanb Avatar answered Oct 21 '22 06:10

r_alanb