[Rd] building windows packages under wine/linux and cross-compiling.

Duncan Murdoch murdoch at stats.uwo.ca
Thu Aug 3 03:33:56 CEST 2006


On 8/2/2006 6:05 PM, Hin-Tak Leung wrote:
> Uwe Ligges wrote:
> <snipped>
>> I cannot imagine: Why should one want to perform difficult cross 
>> compiling if you have Windows available?
>> And why should I run R under wine? If I like Windows, I use Windows, if 
>> I have like Linux, there is no reason to run R under wine.
> 
> *You* cannot imagine.
> 
> I am an almost exlusively linux person. An acquitance, also a
> mainly linux person, for teaching purpose, asked for windows binary
> of something I (co-)wrote, to be installed on to the teaching machines.
> Installing too many development tools on teaching machines is not
> an option; so the other option, than cross-compiling, is to
> *borrow* a windows machine *set up for development purposes*.
> (which I did, at the start).
> 
> I cannot, and would not, keep on repeatedly borrowing other
> people's windows development machines, which they have possibly
> spent some time in setting up; besides, they may not have all
> the tools, and/or willing to put things like Mingw or ActiveState
> Perl on their machines. I did have to install both, plus the
> latest version of R - in my first native try, and immediately
> de-installing them from the borrowed machine as soon as I finished.
> 
> You are not involved in any teaching roles, I reckon? And you haven't
> written any packages that you would like others to use, on a
> different platform from your own?
> 
> Since I am cross-compiling, it goes that I would like to test
> the result of cross-compiling right-away under wine, without
> switching machine or rebooting (in case of dual boot). In fact I
> found and fix a bug in my code, which *only* shows up under
> wine's implementation of msvcrt, not on win2k's or glibc's - wine's 
> msvcrt behavior is valid ANSI C, but different from MS win2k
> or linux glibc's. (and nobody can say for sure win2k's msvcrt is
> exactly the same as NT, XP, etc's).

What I'd recommend you do is get an old laptop with Windows installed on 
it, and install the development tools there.  There are probably several 
lying around peoples' offices in your department.  If you found bugs in 
your code because of differences between wine and Windows, you're also 
bound to find bugs in wine, and waste a lot of time trying to see what's 
wrong with your code when really there's nothing at all wrong with it.

You'll also soon find people complaining that your package doesn't 
contain compiled HTML help, because there's no Linux tool to build that.

Windows machines are cheap.  You don't need a new one to build a package 
or to run R.  I can't imagine there is any change to the build procedure 
that would cost less in our time than the cost to you of getting an old 
Windows box.

Duncan Murdoch



More information about the R-devel mailing list