From ripley at stats.ox.ac.uk  Mon Jan  9 10:22:29 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 9 Jan 2006 09:22:29 +0000 (GMT)
Subject: [Rd] Problem installing from source: no CONTENTS files
In-Reply-To: <D79013E40FEF254AAF0D72DFC94F274803D997@extas4-hba.tas.csiro.au>
References: <D79013E40FEF254AAF0D72DFC94F274803D997@extas4-hba.tas.csiro.au>
Message-ID: <Pine.LNX.4.61.0601090839460.8365@gannet.stats>

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



[Rd] Problem installing from source: no CONTENTS files
Prof Brian Ripley