R-beta: R with gnuwin32

guido@sirio.stat.unipd.it guido at sirio.stat.unipd.it
Sun Mar 15 18:21:51 CET 1998

I have been using R under Linux for more than a year and 
I think that it is great.
Last week, I downloaded the binary Ms Windows version. I wanted
to test it for my students.  Our labs are under Bill Gates.
I am not happy but I can do nothing.

R worked. But, I could not use the dyn.load command
with some dll built with one of the ports of
gcc for windows 95/nt (I used the ecgs-mingw32 ports
The same dll's work with Xlisp-Stat. Then, I rebember something posted
by Luke Tierney somewhere about dll's and the Watcom compiler.
I took a look to his pages and found out  that perhaps the problem is not 
ecgs but  Watcom
( http://stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html).

No dyn.load means no additional packages. Since I don't want
to buy a commercial compiler to support free software, this
morning I tried to recompile the 0.61.1 distribution with
egcs.  Now, after more than 10000 grep's to understand
the differences between the windows sources and the unix ones,
I have a version of R-0.61.1 under Win95. It works. It seems
also a little faster than the october binary version 
(perhaps since I compiled the fortran sources directly
using g77).
But I have some questions:
(a) The windows sources in R-0.61.1 are not the ones used
to build the last windows distribution in CRAN. For example,
the menus are different and also the src/library/base/R/system.win has no
support for library. Where can I find the new sources?
(b) I prepared a Makefile that build the system using the
directory structure of R-0.61.1 under unix. But I don't known
the differences between the the 0.61 version and the 0.50.xxx
for which src/library/base/R/system.win. has been wrote.
Where can I find a description of the differences?
(c) Is someone interested in this port? If yes, I can make it available.
I tried to make rebuilding easy. Essentially, you untar a small archive 
in src/ (essentially the makefiles and the pacthed windows sources). 
  make RHOME=??? firstofall
  make RHOME=??? HAVEG77=[YES,NO] 
  make RHOME=??? HAVEG77=[YES,NO] packages
should build and install the system with all the packages in src/library;
  make RHOME=??? HAVEG77=[YES,NO] pkg-???
will make the package ???. You need gnu-make+sed+rm+cp+ls.
( perhaps also a sh-like shell (I used bash)).
I have not tried but this should work also with the Cygnus and
the gcc-mingw32 port of gcc. Indeed, for this reason, I used the
HAVEG77 flag.
I believe that is not appropriate to make a binary distribution available
before (i) the base/R/system.win file has been fixed (or at least
before I, or better, someone else understand, what is going);
(ii) more testing.
(d) I tried to recompile the regex library in the src/regex
directory. But there is no regex.h file. So, I gave up.
  (d1) Are the source there to let people without regex
       to build the library? If yes, how?
       Where can I find the regex.h file for that
       version of the library which is not the gnu rl one?
  (d2) Have someone tried to use some free regex library
       under mingw32? 
(e) The last point is a proposal for a medium term project.
The modifications that I made were necessary to update the
windows sources to the changes made in the system interface
(R_ReadConsole, R_WriteConsole,....). Now, the gnuplot people
has developed a layer between stdio and a windows console
(a graphics not a ms-dos one). In this way, for example,
just doing some #undef and some  #define, you can printf
on the console. They also have a version of readline.
If we borrow the layer we can hope to use the unix/system.c
file without changes (or with few changes). And hence,
it will be easier for the developers to bring the MsWindows
version update with the main unix one.

I know. I wrote too much and people do not survive too much
when I write or speak in English. Hence, please, forgive me. 
guido masarotto


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list