Roberta Jankowski
2014-Jan-26 05:44 UTC
[Rd] Trouble installing package in development version of R
Dear R-devel, I'm trying to get practice learning more about the internals of R so am experimenting with the development version. I successfully cloned the SVN repo and built and installed R. I am using 2014-01-23 r64861. However, I cannot seem to install the lattice package. I tried within R using install.packages and got the error sh: 1: 1: not found I then downloaded the tar.gz and tried it as follows: $ sudo R CMD INSTALL lattice_0.20-24.tar.gz * installing to library ‘/home/rjan/R/i686-pc-linux-gnu-library/3.1’ * installing *source* package ‘lattice’ ... ** package ‘lattice’ successfully unpacked and MD5 sums checked ** libs sh: 1: 1: not found ERROR: compilation failed for package ‘lattice’ * removing ‘/home/rjan/R/i686-pc-linux-gnu-library/3.1/lattice’ I then looked at the help for R CMD INSTALL and saw debug flag so I did: $ sudo R CMD INSTALL -d lattice_0.20-24.tar.gz processing ‘lattice_0.20-24.tar.gz’ a file * installing to library ‘/home/rjan/R/i686-pc-linux-gnu-library/3.1’ * build_help_types* DBG: 'R CMD INSTALL' now doing do_install() * created lock directory ‘/home/rjan/R/i686-pc-linux-gnu-library/3.1/00LOCK-lattice’ * installing *source* package ‘lattice’ ... ** package ‘lattice’ successfully unpacked and MD5 sums checked ** libs about to run R CMD SHLIB -o lattice.so init.c threeDplot.c sh: 1: 1: not found ERROR: compilation failed for package ‘lattice’ * removing ‘/home/rjan/R/i686-pc-linux-gnu-library/3.1/lattice’ I then did $ cd lattice/src $ R CMD SHLIB -d -o lattice.so init.c threeDplot.c sh: 1: 1: not found I'm interested in two things. 1 does anyone know what's going on? 2. how could I have figured this out myself? What could I have done differently for the R CMD SHLIB command to get more output (for example where this line of code was)? I have read R installation and administration manual but I did not understand a lot so I'm probably missing something that is in there but I'm not sure what. Thank you for your patience, Roberta [[alternative HTML version deleted]]
Duncan Murdoch
2014-Jan-26 13:54 UTC
[Rd] Trouble installing package in development version of R
On 14-01-26 12:44 AM, Roberta Jankowski wrote:> Dear R-devel, > > I'm trying to get practice learning more about the internals of R so am > experimenting with the development version. I successfully cloned the SVN > repo and built and installed R. I am using 2014-01-23 r64861. > > However, I cannot seem to install the lattice package. I tried within R > using install.packages and got the error > sh: 1: 1: not found That message comes from "sh", the command shell that R is running. > > I then downloaded the tar.gz and tried it as follows: > $ sudo R CMD INSTALL lattice_0.20-24.tar.gz > > * installing to library ?/home/rjan/R/i686-pc-linux-gnu-library/3.1? > * installing *source* package ?lattice? ... > ** package ?lattice? successfully unpacked and MD5 sums checked > ** libs > sh: 1: 1: not found Same here. However, notice that some install messages printed, so the install started, it just failed partway through. > ERROR: compilation failed for package ?lattice? > * removing ?/home/rjan/R/i686-pc-linux-gnu-library/3.1/lattice? > > I then looked at the help for R CMD INSTALL and saw debug flag so I did: > $ sudo R CMD INSTALL -d lattice_0.20-24.tar.gz > processing ?lattice_0.20-24.tar.gz? > a file > * installing to library ?/home/rjan/R/i686-pc-linux-gnu-library/3.1? > * build_help_types > * DBG: 'R CMD INSTALL' now doing do_install() > * created lock directory > ?/home/rjan/R/i686-pc-linux-gnu-library/3.1/00LOCK-lattice? > * installing *source* package ?lattice? ... > ** package ?lattice? successfully unpacked and MD5 sums checked > ** libs > about to run R CMD SHLIB -o lattice.so init.c threeDplot.c > sh: 1: 1: not found > ERROR: compilation failed for package ?lattice? > * removing ?/home/rjan/R/i686-pc-linux-gnu-library/3.1/lattice? So it looks as though R CMD SHLIB is the step that failed. You can look it up in Writing R Externals, it is supposed to compile those C files into the output lattice.so. Something is going wrong here. My guess is that you don't have the compiler installed, or R CMD SHLIB is looking in the wrong place, or something like that. > > > I then did > $ cd lattice/src > $ R CMD SHLIB -d -o lattice.so init.c threeDplot.c > sh: 1: 1: not found > > I'm interested in two things. > 1 does anyone know what's going on? > 2. how could I have figured this out myself? What could I have done > differently for the R CMD SHLIB command to get more output (for example > where this line of code was)? You can look at the online help within R, ?SHLIB, and it will tell you that -n will give you some diagnostic information. You can also try R CMD SHLIB --help to see a bit more. One other thing you can do if you need to ask here again, is to post system and version information printed by R by sessionInfo(). And please don't post in HTML. Duncan Murdoch > > I have read R installation and administration manual but I did not > understand a lot so I'm probably missing something that is in there but I'm > not sure what. > > Thank you for your patience, > > Roberta > > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >