Skip to content
Prev 3738 / 63421 Next

Cross compiling a package for Windows on Linux

On Wed, 26 Apr 2000, Douglas Bates wrote:

            
Almost certainly you built an incorrect libR.a from the evidence below.
...

If you use Makefile you are trying to build R, and you can't do that
without Fortran.  To build just a package you need Makefile.packages
and the distributed R.exp file.
I think you omitted to customize MkRules: it seems highly unlikely that
/packages/R-X/i386-mingw32/include is correct for you (it is from my
system): INSTALL says
and you need to set HEADER.  In any case, you are getting the wrong
headers.
after
[...]

Looks like libR.a is wrong as R.exp is corrupt (probably empty). When I try
`make libR.a' on R-devel it behaves as for R-release.

The short answer is that you need R.exp, and to get that you need either to
build the whole of R (for which you need g77) or get the one in rwxxxxsp.  
What I suggest you do is to unpack rw1001 (you'll need I think the just
rw1001b? and rw1001sp zip files) and use that. The binary distribution has
the correct Makefile and supplies R.exp.  Last time I tried that
cross-compiled out of the box.

As you noted, I am in the process of changing the Makefiles and
instructions, mainly because the Cygwin release has changed and (aargh!)
not longer has a fully functional make, and the header set has also
changed.  It's a rash assumption that the R-devel or R-release-patched
will cross-compile as we only test that occasionally, including just before
release.

Brian