简体   繁体   中英

Building R package krb5 from source

I'm trying to install the package krb5 from source available on rforge rforge .

To do so I use the following command within RStudio (1.0.136) with R (3.3.1) on Windows 7.

install.packages("krb5",,"http://rforge.net/",type="source")

Unfortunately this results in the following error:

* installing *source* package 'krb5' ...
** libs

*** arch - i386
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.1/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c k.c -o k.o
k.c:1:18: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
                  ^
compilation terminated.
make: *** [k.o] Error 1
Warnung: Ausführung von Kommando 'make -f "Makevars" -f "C:/PROGRA~1/R/R-33~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="krb5.dll" OBJECTS="k.o"' ergab Status 2
ERROR: compilation failed for package 'krb5'
* removing 'C:/Users/Fabian Desktop/Documents/R/win-library/3.3/krb5'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\User\Documents\R\win-library\3.3" C:\Users\User\AppData\Local\Temp\RtmpCOnG2U/downloaded_packages/krb5_0.1.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘krb5’ had non-zero exit status

It seems as if the file "krb5.h" wasn't found. This makes sense since the package builds on MIT's Kerberos project available here .

The problem I am facing is that I've never built a C-project. Therefore I do not know how to "combine" the two projects or where to add the MIT-project to the R package such that it is available for the R package when building it. A short step by step guide I should take to make this working is much appreciated.

Caveat: I know nothing about the specifics of package krb5. But read on ...

A common pattern with Rcpp package is that they are interfaces between R on the one hand, and an external library on the other hand.

In order to compile code that connects two such worlds, you need header files and libraries from both . R covers its own side.

But krb5 likely only gives you the ability to talk Kerboros backends provided you have Kerberos (development) software installed . In other words krb5 is likely a gateway Kerberos, not Kerberos itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM