ropensci / git2r

R bindings to the libgit2 library
https://docs.ropensci.org/git2r
GNU General Public License v2.0
215 stars 58 forks source link

checking for library containing iconv_open... no. cannot install git2r on Mac OS X El Capitan 10.11.1 #214

Closed PaulaRS closed 8 years ago

PaulaRS commented 8 years ago

I've tried to install git2R via R and via clone and I always get the same error:

> install.packages("git2r")
Installing package into ‘/Users/paula/Rpackages’
(as ‘lib’ is unspecified)
trying URL 'http://cran.uk.r-project.org/src/contrib/git2r_0.13.1.tar.gz'
Content type 'application/x-gzip' length 1058457 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

.Rprofile: Setting UK repositoryn* installing *source* package ‘git2r’ ...
** package ‘git2r’ successfully unpacked and MD5 sums checked
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pkg-config... yes
checking for library containing inflate... -lz
checking for library containing EVP_EncryptInit... -lcrypto
checking for library containing SSL_library_init... -lssl
checking whether pkg-config could find libssh2... yes
checking for library containing iconv_open... no
configure: error: in `/private/var/folders/6_/yg11yqdx729d95_q633bmbxm0000gq/T/Rtmp55ndY5/R.INSTALL121805a0b2217/git2r':
configure: error: iconv library required
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
* removing ‘/Users/paula/Rpackages/git2r’

The downloaded source packages are in
    ‘/private/var/folders/6_/yg11yqdx729d95_q633bmbxm0000gq/T/RtmpLBv4KN/downloaded_packages’
Warning message:
In install.packages("git2r") :
  installation of package ‘git2r’ had non-zero exit status
> 

There is a problem with iconv_open. I also installed iconv via Macports and Brew, I tried the following command but I get the same error has above:

R CMD INSTALL —configure-args="--with-libssh2-include=/opt/local/include --with-libssh2-lib=/opt/local/lib --with-iconv-include=/opt/local/bin --with-iconv-lib=/opt/local/lib” git2r

Thank you Paula

stewid commented 8 years ago

Thanks for reporting the issue.

stewid commented 8 years ago

I have updated the test for iconv in the configure script in commit https://github.com/ropensci/git2r/commit/56b94690dbaad4130fd2aae25418ebd8b0b191ab. Could you please test to install from source using e.g.

git clone https://github.com/ropensci/git2r.git
R CMD INSTALL git2r
stewid commented 8 years ago

I think this is the same problem as in issue #216 which has been resolved. Please open the issue again if the installation still fails.

PaulaRS commented 8 years ago

I used:

git clone https://github.com/ropensci/git2r.git R CMD INSTALL git2r

and it works now. Thank you!