[R] trouble with R CMD INSTALL for building my own library

Jonathan Li jonqli at labs.agilent.com
Wed Dec 5 20:06:10 CET 2001


Kurt Hornik wrote:
> 
> >>>>> Jonathan Li writes:
> 
> > Hi,
> 
> > I have built a library that consists of a piece of C code and some R
> > functions.  To build it into a library that I can load using library()
> > command, I have followed "Writing R Extensions" and made
> > sub-directories such as mylib/R and mylib/src.
> 
> It actually is 'package' and not 'library'.
> 
> > But when I run R CMD INSTALL mylib, nothing seems to be happening with
> > src directory, i.e., no C compiling. I have probably missed some key
> > steps. But after reading very carefully "Writing R Extension", I
> > conclude that I don't need to write my own Makefile in src since R CMD
> > INSTALL will use the default in /usr/lib/R/etc/Makeconf Here is a copy
> > of Makeconf file. In addition, R CMD check and R CMD build all ran
> > without running "make". Is this the way it is supposed to be?  (no
> > error messages encountered).
> 
> Sounds strange.  You really have
> 
>         mylib/src/foo.c
> 
> (note the extension!) and nothing happens?
> 
> -k

Yes. I actually made an extra dummy c file called foo.c in mylib/src :)
still nothing happens.
Here are more messages when running R CMD check/install/build

$R CMD check mylib
* checking for working latex ... OK
* using log directory `/mydir/mylib.Rcheck'
 
Installing binary package `mylib' ...
 DONE (mylib)
 
DONE (INSTALL)
 
* checking for file `mylib/DESCRIPTION' ... OK
* checking package directory ... OK
* checking for sufficient file permissions ... OK
* checking DESCRIPTION Package field ... OK
* checking DESCRIPTION Version field ... OK
* checking DESCRIPTION License field ... OK
* checking DESCRIPTION Description field ... OK
* checking DESCRIPTION Title field ... OK
* checking DESCRIPTION Author field ... OK
* checking DESCRIPTION Maintainer field ... OK
* checking R files for library.dynam ... OK

$R CMD build mylib
* checking for file `mylib/DESCRIPTION' ... OK
* preparing `mylib':
* cleaning src
* checking whether `INDEX' is up-to-date ...open(man): No such file or
directory at /usr/lib/R/bin/Rdindex line 117
 NO
* use `--force' to overwrite the existing `INDEX'
* removing junk files
* building `mylib_0.1.tar.gz'

After becoming super user, I ran

$R CMD INSTALL boosttree
Installing binary package `mylib' ...
 DONE (boosttree)
 
DONE (INSTALL)

As you can see, R CMD build tries to "clearning src". I am not sure if
this means that something went wrong in my
setup. 

Thanks plenty again for any insights!

-- 
Jonathan Q. Li, PhD
Agilent Technologies Laboratory
Palo Alto, California, USA
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list