r-lib / gert

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

issue on gentoo #148

Open pyeatt opened 3 years ago

pyeatt commented 3 years ago

Installing on gentoo:


> install.packages("gert")
trying URL 'https://cran.rstudio.com/src/contrib/gert_1.3.1.tar.gz'
Content type 'application/x-gzip' length 66767 bytes (65 KB)
==================================================
downloaded 65 KB

* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-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: No such file or directory
compilation terminated.
----------------------------------------------------------------------
ERROR: configuration failed for package ‘gert’
* removing ‘/xxx/gert’
Warning in install.packages :
  installation of package ‘gert’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpC4Ynkt/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
> 

The libgit2 package is installed, and /usr/include/git2.h exists and is world readable. Why is it not finding it? Any help would be appreciated.

jeroen commented 3 years ago

Your error log says fatal error: git2.h: No such file or directory so it seems like your gcc doesn't find it in the standard include paths...

Do you have gcc installed? Can you compile a standard (non-R) program that includes git2.h ? I have no idea how gentoo works, so I can't really help you.