[Rd] Syntax Error in Rcmd check on Windows

Duncan Murdoch murdoch at stats.uwo.ca
Thu Nov 2 23:34:38 CET 2006

On 11/2/2006 4:59 PM, Simon Urbanek wrote:
> On Nov 2, 2006, at 4:39 PM, Duncan Murdoch wrote:
>> On 10/31/2006 2:07 PM, Duncan Murdoch wrote:
>>> On 10/31/2006 1:50 PM, Michael Hoehle wrote:
>>>>> Thanks for pointing me to the source.  I can reproduce the  
>>>>> problem, and
>>>>> I'm fairly sure it's an R bug, not a problem in your source.  I  
>>>>> need to
>>>>> trace through at a low level to confirm this and to work out the  
>>>>> fix.
>>>> It reassuring to know that the problem appears not to be with my  
>>>> code.
>>>> Thanks for your help so far and hopefully you are able to find the
>>>> bug! Let me know when you know more.
>>>> Michael
>>>> P.S. When I do a dos2unix on RLadyBug-Ex.R "Rterm --no-save <
>>>> RLadyBug-Ex.R " works fine.
>>> Yes, the problem has to do with the CR LF line ends in the file.   
>>> For some reason R switches from handling those properly to not  
>>> doing so. The problem I'm having right now is that I can't do  
>>> input redirection in gdb in Windows, so it's really hard to see  
>>> when the switch happens, or why.
>> I'm now fairly sure this isn't an R bug after all.  It goes away if  
>> I edit out the requirement in RLadyBug for rJava, which makes me  
>> think that rJava is somehow messing up R's input routines.  (Rcmd  
>> check fails later when it can't find  ".jnew", as you'd expect.   
>> But there's no spurious syntax error.)
>> Because of the difficulties with the debugger I'm going to quit  
>> now; if you find any evidence that suggests it really is R's bug  
>> after all, please let me know.
>> Simon, let me know if there are any tests I can do to help track  
>> this down.
> AFAIR this is the  (sort of known) issue of Java changing the  
> newlines behavior of the output under R CMD check. However, so far no  
> one could tell me what the issue really is.
> Can't just R CMD check ignore the CR/LF issues on Windows? I was  
> assuming that it is not making distinction between \r\n and \n  
> anyway ...

I thought the input routines were supposed to be converting \r\n to \n, 
but that's not happening during the check.  I can't see where the change 
occurs, because I don't know how to reproduce the error other than by

Rterm --no-save <RLadyBug-Ex.R

(using the examples file produced during Rcmd check) and as far as I can 
see, gdb in Windows doesn't let me debug this, there's no way to get it 
to allow redirected input.

It would be nice if some other debugger knew how to handle the debug 
information that gcc produces, or gcc could produce Borland or MS debug 
info so I didn't have to use gdb, but so far no luck with that.


More information about the R-devel mailing list