Skip to content
Prev 25946 / 63421 Next

compiling R under cygwin

On Thu, 23 Aug 2007, Denham Robert wrote:

            
Yes, it could almost certainly be done with Rterm.exe.

The issue I came across was the so-called 'posix file paths' that Cygwin 
uses.  Most (but not all) Windows programs accept file paths with / as the 
path separator, and most (but not all, e.g. tar) Cygwin programs accept 
paths of the forn c:/path/to/file.  So provided you use that as your
format, interworking with Unix and Unix-like shells work fine.  It used to 
be the case that if you had just one drive C: then Cygwin programs 
produced paths of the form /path/to/file that also worked on Windows.  Now 
they produce /cygdrive/c/path/to/file that works nowhere else.

In general this is a minor nuisance, but I needed to be able to 
cross-build R in an environment where I only have Cygwin-based 
cross-compilers, and there the path issues bit me: I needed a version of R 
that accepted and returned Cygwin-style paths.  So I made the configure 
changes necessary to build R under Cygwin, and had it running in 20 mins.
As I said earlier, it builds out of the box in R-devel (with suitable 
options documented in the R-admin manual).  No guarantees that it will 
continue to do so unless tested in the alpha/beta phase though.  As no 
other platform we use nowadays requires that shared objects/dynamic 
libraries have all imports satisfied at build time, this is liable to get 
broken.

But I would encourage people to use Rterm.exe if it can be made to do what 
you need.