[R] building packages on Windows

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Mon Jul 11 22:06:26 CEST 2005



Duncan Murdoch wrote:
> On 7/11/2005 3:21 PM, Sundar Dorai-Raj wrote:
> 
>> Hi, all,
>>
>> I just recently upgraded my computer though I'm using the same OS (XP).
>> But now I'm having difficulty building packages and I cannot seem to
>> solve the problem. I'm using R-2.1.1pat on Windows XP.
>>
>> Here is what I tried:
>>
>> D:\Users\sundard\slib\sundar\R>R CMD CHECK sundar
>> * checking for working latex ... OK
>> * using log directory 'D:/Users/sundard/slib/sundar/R/sundar.Rcheck'
>> * using R version 2.1.1, 2005-06-21
>> * checking for file 'sundar/DESCRIPTION' ... OK
>> * this is package 'sundar' version '1.1'
>> * checking if this is a source package ... OK
>>
>> installing R.css in D:/Users/sundard/slib/sundar/R/sundar.Rcheck
>>
>>
>> ---------- Making package sundar ------------
>>    adding build stamp to DESCRIPTION
>>    installing NAMESPACE file and metadata
>> Error in file(file, "r") : unable to open connection
>> In addition: Warning message:
>> cannot open file
>> 'D:/Users/sundard/slib/sundar/R/sundar.Rcheck/sundar/NAMESPACE'
>>
>> Execution halted
>> make[2]: *** [nmspace] Error 1
>> make[1]: *** [all] Error 2
>> make: *** [pkg-sundar] Error 2
>> *** Installation of sundar failed ***
>>
>> Removing 'D:/Users/sundard/slib/sundar/R/sundar.Rcheck/sundar'
>>   ERROR
>> Installation failed.
>>
>> I've also tried to remove the NAMESPACE which then passes `check' but
>> fails on `build' with the following:
>>
>> * checking for file 'sundar/DESCRIPTION' ... OK
>> * preparing 'sundar':
>> * checking DESCRIPTION meta-information ... OK
>> * removing junk files
>> Error: cannot open file 'sundar/DESCRIPTION' for reading
>>
>> If this is relevant, here is my PATH:
>> C:\WINDOWS\system32;
>> C:\WINDOWS;
>> .;
>> D:\R\rw2011pat\bin;
>> D:\R\tools\bin;
>> D:\Perl\bin;
>> D:\Tcl\bin;
>> D:\TeXLive\bin\win32;
>> D:\Mingw\bin;
>> C:\Program Files\Insightful\splus62\cmd;
>> C:\Program Files\HTML Help Workshop
>>
>> Here, the D:\R\tools\bin directory contains the utilities for building R
>> from source, downloaded today. Am I missing something obvious?
> 
> 
> Yes, you need to put the Windows directories later in your path.  There 
> are some programs in the toolset which have like-named commands in 
> Windows; you need to use ours, not theirs.
> 
> There are other differences between your path and the one recommended in 
> the Admin and Installation manual; they may also be causing problems.
> 
> Duncan Murdoch


Hi, Duncan,

Thanks for the reply. I moved things around so that my PATH now looks like:

.;
D:\R\tools\bin;
D:\Perl\bin;
D:\Mingw\bin;
D:\TeXLive\bin\win32;
C:\Program Files\HTML Help Workshop;
D:\R\rw2011pat\bin;
D:\Tcl\bin;
C:\Program Files\Insightful\splus62\cmd;
C:\WINDOWS;
C:\WINDOWS\system32

However, the problem was actually to do with permissions. Apparently 
when I when I do the following:

chmod 666 DESCRIPTION NAMESPACE

The permissions must have been changed when upgrading my computer since 
I didn't have any problem on my previous machine. However, now another 
problem has arisen:

D:\Users\sundard\slib\sundar\R>R CMD install sundar


---------- Making package sundar ------------
   adding build stamp to DESCRIPTION
   installing NAMESPACE file and metadata

<output snipped>

Compiling d:\Users\sundard\slib\sundar\R\sundar\chm\sundar.chm

HHC5003: Error: Compilation failed while compiling logo.jpg.
HHC5003: Error: Compilation failed while compiling Rchm.css.


The following files were not compiled:
logo.jpg
Rchm.css
   adding MD5 sums

* DONE (sundar)

This still installs fine except the chmhelp file is not created as it 
should be. I've deleted the chm subdirectory and tried to reinstall and 
I get the same error. This seems not to be an R problem, but possibly 
some configuration I'm not aware of, but I'd be grateful for any insight.

Thanks,

--sundar




More information about the R-help mailing list