Mark.Bravington@csiro.au
2006-Jan-09 06:48 UTC
[Rd] Problem installing from source: no CONTENTS files
I've just had the error below while trying to install a package from source under R2.2.1 and Windows XP. I recall encountering this sporadically in the past. It is a pretty confusing message and took me quite some time to figure out; I've seen queries about it on the R site search, but couldn't find a reply. There's an attempted diagnosis and suggested cure below. D:\r2.0\debug>rcmd INSTALL --library=d:/rpackages/r2.2.1 --docs=normal debug ---------- Making package debug ------------ <<snipped>> installing indices cat: C:/R/RW2021/library/*/CONTENTS: No such file or directory What I think is happening is this. Because I installed R from binary *without* HTML help, no CONTENTS files are created for the packages. When running RCMD INSTALL, this causes an error in the MakePkg file (in src/gnuwin32 on my machine), in the "indices" section at the line starting @$(CAT) below. Commenting out the CAT line seems to work fine, in that installation proceeds OK, and regular non-HTML help and help.search are available for the package. The comment two lines up suggests that the behaviour is a bug; maybe a TRY-style wrapper could be used? If not, a different error message would be handy. I don't understand enough about makefiles to suggest a patch, unfortunately. indices: @$(ECHO) " installing indices" @$(ECHO) "invisible(.libPaths(c(.Library,\"$(RLIB)\", .libPaths()))); tools:::.install_package_indices('.', '"$(DPKG)"')" | \ R_DEFAULT_PACKAGES=NULL LC_COLLATE=C R_OSTYPE=windows $(REXE)> /dev/null# need not have HTML installed when building packages @$(MKDIR) -p $(RHOME)/doc/html/search @$(CAT) $(RHOME)/library/*/CONTENTS > $(RHOME)/doc/html/search/index.txt Mark Bravington CSIRO Mathematical & Information Sciences Marine Laboratory Castray Esplanade Hobart 7001 TAS ph (+61) 3 6232 5118 fax (+61) 3 6232 5012 mob (+61) 438 315 623
Prof Brian Ripley
2006-Jan-09 09:22 UTC
[Rd] Problem installing from source: no CONTENTS files
This will only happen if you installed R without HTML help and then install a package *with* HTML help *and* do so into a non-standard directory. That seems an arcane thing to do: why do you want HTML help for some packages and not others? You will end up with a partially functional system. The fix is simple: put '-' at the beginning of that line (after the tab) in MakePkg. I've put a more complete solution in R-devel. On Mon, 9 Jan 2006 Mark.Bravington at csiro.au wrote:> I've just had the error below while trying to install a package from > source under R2.2.1 and Windows XP. I recall encountering this > sporadically in the past. It is a pretty confusing message and took me > quite some time to figure out; I've seen queries about it on the R site > search, but couldn't find a reply.I don't believe those are the same thing.> There's an attempted diagnosis and > suggested cure below. > > D:\r2.0\debug>rcmd INSTALL --library=d:/rpackages/r2.2.1 --docs=normal > debug > > ---------- Making package debug ------------ > <<snipped>> > installing indices > cat: C:/R/RW2021/library/*/CONTENTS: No such file or directory > > What I think is happening is this. Because I installed R from binary > *without* HTML help, no CONTENTS files are created for the packages. > When running RCMD INSTALL, this causes an error in the MakePkg file (in > src/gnuwin32 on my machine), in the "indices" section at the line > starting @$(CAT) below. Commenting out the CAT line seems to work fine, > in that installation proceeds OK, and regular non-HTML help and > help.search are available for the package. The comment two lines up > suggests that the behaviour is a bug; maybe a TRY-style wrapper could be > used? If not, a different error message would be handy.The error message is completely informative: why would you want to change it?> I don't understand enough about makefiles to suggest a patch, > unfortunately.A good learning project for you?> > indices: > @$(ECHO) " installing indices" > @$(ECHO) "invisible(.libPaths(c(.Library,\"$(RLIB)\", > .libPaths()))); tools:::.install_package_indices('.', '"$(DPKG)"')" | \ > R_DEFAULT_PACKAGES=NULL LC_COLLATE=C R_OSTYPE=windows $(REXE) >> /dev/null > # need not have HTML installed when building packages > @$(MKDIR) -p $(RHOME)/doc/html/search > @$(CAT) $(RHOME)/library/*/CONTENTS > > $(RHOME)/doc/html/search/index.txt > > > Mark Bravington > CSIRO Mathematical & Information Sciences > Marine Laboratory > Castray Esplanade > Hobart 7001 > TAS > > ph (+61) 3 6232 5118 > fax (+61) 3 6232 5012 > mob (+61) 438 315 623 > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Mark.Bravington@csiro.au
2006-Jan-10 02:26 UTC
[Rd] Problem installing from source: no CONTENTS files
> Brian D. Ripley, ripley at stats.ox.ac.uk> This will only happen if you installed R without HTML help > and then install a package *with* HTML help *and* do so into > a non-standard directory. That seems an arcane thing to do: > why do you want HTML help for some packages and not others? > You will end up with a partially functional system. > > The fix is simple: put '-' at the beginning of that line > (after the tab) in MakePkg. I've put a more complete > solution in R-devel.Thanks for the fix. I think the message is more general, though. What I want to do is install the package just with "vanilla help"-- the stuff that comes up in the pager. According to "RCMD INSTALL --help" the only options are "doc=none/normal/chtml/all"-- there's no "vanilla" or equivalent. If I do "doc=none" I don't get vanilla help. So "doc=normal" is required, and this tries to do HTML which I don't need. A vanilla-only option would be ideal, I guess.> > On Mon, 9 Jan 2006 Mark.Bravington at csiro.au wrote: > > > I've just had the error below while trying to install a > package from > > source under R2.2.1 and Windows XP. I recall encountering this > > sporadically in the past. It is a pretty confusing message > and took me > > quite some time to figure out; I've seen queries about it on the R<<snipped>>> > ---------- Making package debug ------------ <<snipped>> installing > > indices > > cat: C:/R/RW2021/library/*/CONTENTS: No such file or directory<<snipped>>> > be used? If not, a different error message would be handy. > > The error message is completely informative: why would you > want to change it?I should have said "an additional error message" instead of "a different...". It's pretty difficult for a user to track down where & why it is occurring and whether it matters-- accurate, yes, but not informative! Anyway, maybe otiose now (the more complete solution hasn't made it to the R-devel I got this morning, so I can't check yet).> > > I don't understand enough about makefiles to suggest a patch, > > unfortunately. > > A good learning project for you?true no doubt-- but just one out of so many ... :( Thanks Mark> > > > Mark Bravington > > CSIRO Mathematical & Information Sciences Marine Laboratory Castray > > Esplanade Hobart 7001 TAS > > > > ph (+61) 3 6232 5118 > > fax (+61) 3 6232 5012 > > mob (+61) 438 315 623 > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > > > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > >