r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
146 stars 31 forks source link

'git2.h' file not found in github action #138

Closed elong0527 closed 3 years ago

elong0527 commented 3 years ago

There seems an issue to install gert by using github action

https://github.com/pharmaR/riskmetric/pull/194/checks?check_run_id=2238929336

The downloaded binary packages are in
    /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpCpahqz/downloaded_packages
gert (1.2.0 -> 1.3.0) [CRAN]
Installing 1 packages: gert
Installing package into ‘/Users/runner/work/_temp/Library’
(as ‘lib’ is unspecified)

installing the source package ‘gert’
  There is a binary version available but the source version is later:

     binary source needs_compilation
trying URL 'https://cloud.r-project.org/src/contrib/gert_1.3.0.tar.gz'
gert  1.2.0  1.3.0              TRUE

Content type 'application/x-gzip' length 66410 bytes (64 KB)
==================================================
downloaded 64 KB

* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
** using staged installation
Homebrew 3.0.9
Homebrew/homebrew-core (git revision c4d8337b41; last commit 2021-03-27)
Homebrew/homebrew-cask (git revision a66cc03a5e; last commit 2021-03-28)
Using PKG_CFLAGS=-I/usr/local/opt/libgit2/include
Using PKG_LIBS=-L/usr/local/opt/libgit2/lib -lgit2
----------------------------- ANTICONF -------------------------------
Configuration failed to find libgit2 library. Try installing:
 * brew: libgit2 (MacOS)
 * deb: libgit2-dev (Debian, Ubuntu, etc)
 * rpm: libgit2-devel (Fedora, CentOS, RHEL)
If libgit2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libgit2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: 'git2.h' file not found
#include <git2.h>
         ^~~~~~~~
1 error generated.
----------------------------------------------------------------------
ERROR: configuration failed for package ‘gert’
* removing ‘/Users/runner/work/_temp/Library/gert’
* restoring previous ‘/Users/runner/work/_temp/Library/gert’
Error in i.p(...) : 
  (converted from warning) installation of package ‘gert’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
Error: Process completed with exit code 1.
jeroen commented 3 years ago

Dupe https://github.com/r-lib/gert/issues/137