Re: [Rd] Syntax Error in Rcmd check on Windows

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu 02 Nov 2006 - 22:34:38 GMT

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.

Duncan



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Nov 03 22:08:43 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 03 Nov 2006 - 11:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.