Skip to content
Prev 30854 / 63424 Next

bug in R CMD INSTALL do_install under OS X

This problem could be caused by having CDPATH set.  E.g.,

   % env CDPATH=. ~/R-svn/r-devel/R/bin/R CMD INSTALL -l Rlib
testCMacros
   /homes/bill/packages/Rlib
   /homes/bill/R-svn/r-devel/R/bin/INSTALL: line 948: cd:
/homes/bill/packages/testCMacros
   /a/seafiler01.na.tibco.com/vol/vol2/users/bill/packages/testCMacros:
No such file or directory
   /bin/sed: can't read DESCRIPTION: No such file or directory
   ERROR: no 'Package' field in 'DESCRIPTION'
   /bin/sed: read error on /homes/bill/packages/testCMacros: Is a
directory
(It works fine if I set 'CDPATH='.)

The happens because, from 'man cd' in
http://www.linuxhowtos.org/manpages/1p/cd.htm:

   If a non-empty directory name from CDPATH is used, or if
   cd - is used, an absolute pathname of the new working
   directory shall be written to the standard output as follows:
    "%s\n", <new directory>
   Otherwise, there shall be no output.

and INSTALL uses the idiom
    `cd ${dir} && /bin/pwd`
to convert the directory name dir to a full path.   

libtools explicitly unsets CDPATH, presumably to avoid this
sort of problem.  All the R scripts should do so.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com
/projects/routines/R/gaga".