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

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Wed Aug 2 16:52:20 CEST 2006


Hin-Tak Leung wrote:
> Prof Brian Ripley wrote:
>> On Mon, 31 Jul 2006, Hin-Tak Leung wrote:
>>
>>> Had some fun today, and thought it might be a good idea to share
>>> and possibly for inclusion to R/src/gnuwin32/README.packages .
>>
<snipped>
>>
>>   Edit MkRules to set BUILD=CROSS and the appropriate paths (including
>>   HEADER) as needed.
> 
<snipped>
> On a different note, I am rather uncomfortable doing *both*
> makefile editing and setting options on the comand lines
> "make option1=value1 option2=vaule2 ...". Surely it is possible
> to do it entirely one way, e.g.
> 
>  make CROSS_ON_LINUX=1 <rest_of_options>
<snipped>

After setting PATH=/mingw/bin, *without editing MkRules at all*,
this does work (note "BUILD=CROSS"):

       make BUILD=CROSS R_EXE=/usr/bin/R PKGDIR=/home/hin-tak/tmp-cvs \
          RLIB=/tmp pkg-snpMatrix

Apparently any variables ("BUILD" being one) specified on the make
command line overrides what's in the make file. Thus there is no need
to edit MkRules at all - HEADER can be specified in the same way
if needed (although it doesn't seem needed).

I'd prefer to do it this way - don't want to keep a locally
modified MkRules in my hard disc which differs from as-distributed
or as-installed (under wine).

There is a slight caveate - wine (and so does windows) installs
R under C:\Program Files\R\R-<version> , and cross-build doesn't like
the space in "Program Files". (native build seems to be able to address
that as c://progr~1/...). Instead of taking it off and reinstall,
I opted for sshfs-fuse mounting my ".wine/drive_c/Program Files/R"
elsewhere without a space in the path.

HTL



More information about the R-devel mailing list