Dan Tenenbaum
2011-Mar-22 01:07 UTC
[Rd] R_HOME path getting munged in inst/doc/Makefile on Windows
Hello,
I have come across two separate packages that have a Makefile in inst/doc
which use the R_HOME variable.
In both cases, the path to R_HOME gets munged in such a way that commands
that include R_HOME fail on Windows:
For example, one Makefile, for the xmapcore package (
https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/xmapcore/username/password:
readonly) has this:
R=${R_HOME}/bin/R
SUITE=../cookbook/delia.R
[...]
${R} --vanilla --verbose < ${SUITE}
the output of trying to build this package includes:
* creating vignettes ... ERROR
E:\biocbld\BBS-2~1.8-B\R/bin/R --vanilla --verbose < ../cookbook/delia.R
E:biocbldBBS-2~1.8-BR/bin/R: not found
make: *** [pdf] Error 127
Error in tools::buildVignettes(dir = ".") : running 'make'
failed
Execution halted
It seems R_HOME is not getting resolved to a valid path. That's strange
because R CMD echo shows the right thing:
E:\sandbox>\biocbld\bbs-2.8-bioc\R\bin\R CMD echo %R_HOME%
e:/biocbld/bbs-2.8-bioc/R
That's a nice path with all forward slashes and no funny 8.3 paths with
tildes. But it looks like when R_HOME is invoked in a Makefile, the
resulting path has a mix of forward and backslashes, and gets translated
into 8.3 style, and the resulting path is not valid for finding R
executables.
Note that R_HOME is defined within R; I don't also have it defined at the
shell level:
E:\sandbox>echo %R_HOME%
%R_HOME%
Any ideas?
Thanks,
Dan
> sessionInfo()
R version 2.13.0 alpha (2011-03-18 r54865)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
[[alternative HTML version deleted]]
Simon Urbanek
2011-Mar-22 02:22 UTC
[Rd] R_HOME path getting munged in inst/doc/Makefile on Windows
On Mar 21, 2011, at 9:07 PM, Dan Tenenbaum wrote:> Hello, > > I have come across two separate packages that have a Makefile in inst/doc > which use the R_HOME variable. > > In both cases, the path to R_HOME gets munged in such a way that commands > that include R_HOME fail on Windows: > > For example, one Makefile, for the xmapcore package ( > https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/xmapcore/username/password: > readonly) has this: > > R=${R_HOME}/bin/R > SUITE=../cookbook/delia.R > [...] > ${R} --vanilla --verbose < ${SUITE} > > the output of trying to build this package includes: > > * creating vignettes ... ERROR > E:\biocbld\BBS-2~1.8-B\R/bin/R --vanilla --verbose < ../cookbook/delia.R > E:biocbldBBS-2~1.8-BR/bin/R: not found > make: *** [pdf] Error 127 > Error in tools::buildVignettes(dir = ".") : running 'make' failed > Execution halted > > It seems R_HOME is not getting resolved to a valid path. That's strange > because R CMD echo shows the right thing: > > E:\sandbox>\biocbld\bbs-2.8-bioc\R\bin\R CMD echo %R_HOME% > e:/biocbld/bbs-2.8-bioc/R > > That's a nice path with all forward slashes and no funny 8.3 paths with > tildes. But it looks like when R_HOME is invoked in a Makefile, the > resulting path has a mix of forward and backslashes,Nope, at least not in R from CRAN: Makevars: all: echo R_HOME: $(R_HOME) [...] echo R_HOME: c:/PROGRA~1/R/R-212~1.2 R_HOME: c:/PROGRA~1/R/R-212~1.2 But I see that you have custom rhome setting (BBS...) so changes are that is the culprit - the rhome for that R build is set incorrectly to contain backslashes. Cheers, Simon> and gets translated > into 8.3 style, and the resulting path is not valid for finding R > executables. > > Note that R_HOME is defined within R; I don't also have it defined at the > shell level: > > E:\sandbox>echo %R_HOME% > %R_HOME% > > Any ideas? > Thanks, > Dan > >> sessionInfo() > R version 2.13.0 alpha (2011-03-18 r54865) > Platform: i386-pc-mingw32/i386 (32-bit) > > locale: > [1] LC_COLLATE=English_United States.1252 > [2] LC_CTYPE=English_United States.1252 > [3] LC_MONETARY=English_United States.1252 > [4] LC_NUMERIC=C > [5] LC_TIME=English_United States.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >
Prof Brian Ripley
2011-Mar-22 06:19 UTC
[Rd] R_HOME path getting munged in inst/doc/Makefile on Windows
This is a bug in the package: you are required to quote paths in Makefiles, e.g. to allow for spaces in the path. And let's knock the issue of forward and backwards slashes on the head: they are equivalent on Windows. Despite your perjorative comments, the supplied value of R_HOME is valid. On Mon, 21 Mar 2011, Dan Tenenbaum wrote:> Hello, > > I have come across two separate packages that have a Makefile in inst/doc > which use the R_HOME variable. > > In both cases, the path to R_HOME gets munged in such a way that commands > that include R_HOME fail on Windows: > > For example, one Makefile, for the xmapcore package ( > https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/xmapcore/username/password: > readonly) has this: > > R=${R_HOME}/bin/R > SUITE=../cookbook/delia.R > [...] > ${R} --vanilla --verbose < ${SUITE} > > the output of trying to build this package includes: > > * creating vignettes ... ERROR > E:\biocbld\BBS-2~1.8-B\R/bin/R --vanilla --verbose < ../cookbook/delia.R > E:biocbldBBS-2~1.8-BR/bin/R: not found > make: *** [pdf] Error 127 > Error in tools::buildVignettes(dir = ".") : running 'make' failed > Execution halted > > It seems R_HOME is not getting resolved to a valid path. That's strange > because R CMD echo shows the right thing: > > E:\sandbox>\biocbld\bbs-2.8-bioc\R\bin\R CMD echo %R_HOME% > e:/biocbld/bbs-2.8-bioc/R > > That's a nice path with all forward slashes and no funny 8.3 paths with > tildes. But it looks like when R_HOME is invoked in a Makefile, the > resulting path has a mix of forward and backslashes, and gets translated > into 8.3 style, and the resulting path is not valid for finding R > executables. > > Note that R_HOME is defined within R; I don't also have it defined at the > shell level: > > E:\sandbox>echo %R_HOME% > %R_HOME% > > Any ideas? > Thanks, > Dan > >> sessionInfo() > R version 2.13.0 alpha (2011-03-18 r54865) > Platform: i386-pc-mingw32/i386 (32-bit) > > locale: > [1] LC_COLLATE=English_United States.1252 > [2] LC_CTYPE=English_United States.1252 > [3] LC_MONETARY=English_United States.1252 > [4] LC_NUMERIC=C > [5] LC_TIME=English_United States.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > [[alternative HTML version deleted]] > > ______________________________________________ > 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
Reasonably Related Threads
- Install packages to non-default lib on Windows
- Lack of consistent cross-platform behaviour of tools:::buildVignettes()
- Failed to locate 'weave' output file / vignette product does not have a known filename extension
- R CMD check --force-multiarch does not install all the archs for testing
- More strange R CMD build/check errors on Windows