[Rd] curious package behaviors under cross-build and/or between windows/unix

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Wed Apr 18 21:25:25 CEST 2007

Prof Brian D Ripley wrote:
> On Wed, 18 Apr 2007, Hin-Tak Leung wrote:
>> Hi,
>> I have gone back to cross-compiling again, and I have come to two
>> curious issues: (I have native R under linux x86_64 and win32 R
>> under wine) - both 2.4.1:
>> (1) for a pure R package (i.e. no compiled code), win32 R would
>> happily load the unix version, but the unix version complains
>> the cross-built package that it was built for x86 mingw and refuses
>> to load it. Is there any reason for the difference?
> Yes.  Take a look at the installed DESCRIPTION file, and the Built: 
> line. (One reason is line endings: not everything works on Unix (diff, 
> for one) with CRLF endings, but everything does work on Windows with LF 
> endings.)

Yes, I know about that line in the DESCRIPTION file, and I tried
deleting it without the desired effect. It seems that the built info
is stored elsewhere as well for the cross-build?; but my point is
that the native unix build DESCRIPTION file also says
"Built: R 2.4.1; i686-redhat-linux-gnu; 2007-03-05 19:03:08; unix"
but win32 R doesn't seem to mind loading it?

It seems to be fairly common knowledge(?) that for pure R packages,
one can just zip up the unix install to stick it on windows; and I
was just surprised that the reverse is not true.

>> (2) I get two "arguments in definition changed from (obj) to (object)"
>> messages when I do library(XML) on win32 R - but not on native R,
> I get it on all platforms with 2.5.0 RC and later (2.4.x is closed), and 
> it is a bug in the XML package, AFAICS.

I do believe it is a bug in XML (having had a look at google), but
I can't pin-point how/where it triggers a message from R-core. I
suppose I'll just look harder :-). This behavior seems to be specific
to win32 R 2.4.x though, as I have "identical" R versions for the two:

 > sessionInfo()
R version 2.4.1 (2006-12-18)

 > sessionInfo()
R version 2.4.1 (2006-12-18)


More information about the R-devel mailing list