From ripley at stats.ox.ac.uk  Fri Jan 12 18:20:55 2007
From: ripley at stats.ox.ac.uk (Brian Ripley)
Date: Fri, 12 Jan 2007 17:20:55 +0000 (GMT)
Subject: [Rd] wine and build difference between R.2.4.0 and R 2.4.1
 windows binaries?
In-Reply-To: <45A7BF93.1090109@cimr.cam.ac.uk>
References: <45A53E92.6070104@cimr.cam.ac.uk> <45A545B1.6070508@stats.uwo.ca>
	<45A6250C.3020802@cimr.cam.ac.uk> <45A629E0.8090100@stats.uwo.ca>
	<45A79EB8.8010606@cimr.cam.ac.uk>
	<Pine.LNX.4.64.0701121446340.11132@gannet.stats.ox.ac.uk>
	<45A7BF93.1090109@cimr.cam.ac.uk>
Message-ID: <Pine.LNX.4.64.0701121714001.18003@auk.stats>

On Fri, 12 Jan 2007, Hin-Tak Leung wrote:

> Prof Brian Ripley wrote:
>> On Fri, 12 Jan 2007, Hin-Tak Leung wrote:
>> 
>>> I'd like to know one thing though - was there any specific reason for
>>> the mingw upgrade after 2.4.0, or was it just a routine
>>> latest-is-greatest upgrade?
>> 
>> There are specific requirements: from the CHANGES file
>> 
>> 2.4.0:
>> 
>> mingw-runtime >= 3.10 is required to build R (a bug fix in the handling
>> of MBCS code is required).  This is enforced by a check in building
>> Rpwd.exe.
>
> Argh... MBCS. I tried running wine with debug on,
> ( WINEDEBUG=+relay wine Rgui.exe 2>&1 ) and it shows that just before 
> 2.4.1/2.5dev crashes, R tried to called strlen() and strchr() on
> "Error: invalid multibyte string" in ntdll.
>
> Call ntdll.strlen(6c9a0a80 "Error: invalid multibyte string\n") ret=6c9150bd
> Call ntdll.strchr(00e192e0 "Error: invalid multibyte string\n",0000000a) 
> ret=6c704ec0
>
> It might be bogus, but the same trace is not found in
> WINEDEBUG=+relay wine Rgui.exe 2>&1
> with R 2.4.0 .

What locale are you in?  Running R under WINE in a multibyte Linux locale 
may not work, depending on how WINE handles it.


> Can I have a svn revision number for the MBCS change please? It

You could do what I had to do, svn blame src/gnuwin32/CHANGES, which 
points to r38776.  The log on developer.r-project.org shows

r38776 | ripley | 2006-08-03 04:49:43 -0400 (Thu, 03 Aug 2006) | 1 line
Changed paths:
    M /trunk/src/gnuwin32/CHANGES
    M /trunk/src/gnuwin32/Makefile
    M /trunk/src/gnuwin32/front-ends/rpwd.c
    D /trunk/src/gnuwin32/wcrtomb.c

require mingw-runtime-3.10

so it looks like we deleted a patched version once my bug report on mingw 
had worked through.  Note, pre-2.4.0 as the extract shows.

> should probably be the first thing I look at, as soon as I get
> my cross-compile tools up to date... thanks a lot.
>
> Hin-Tak
>
>> 
>> 2.5.0-to-be:
>> 
>> mingw-runtime >= 3.11 is needed to build R.
>> 
>> [There are multiple reasons, but one is that isblank is missing in earlier 
>> versions.]
>> 
>> I am almost certain that I have build R 2.4.1 with mingw-runtime 3.10.
>> 
>

-- 
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



[Rd] wine and build difference between R.2.4.0 and R 2.4.1 windows binaries?
Brian Ripley