Rev 12255 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
R @RVER@ for Windows====================This distribution contains the sources to build a port of R-@RVER@ torun on Windows 95, 98, ME, NT4 and 2000 on Intel/clone chips. See thefile `readme' for fuller details, including how to install the binaryversions.Building From Source on Windows===============================[Some further details, including how to debug, are given in the rw-FAQ.]First collect the tools that you need. There is a `portal' withcurrent links at http://www.stats.ox.ac.uk/pub/Rtools/.Collect the tools-----------------You will need suitable versions of at least make, sh, cat, cp, cut,diff, echo, egrep, expr, g(awk), grep, ls, mkdir, mv, rm, sed, touch;we use those from the cygwin distribution(http:/www.cygwin.com/mirrors.html) or (gzip, tar, makeinfo, texindex)compiled from the sources. We have packaged a set athttp://www.stats.ox.ac.uk/pub/Rtools/tools.zip.BEWARE: `Native' ports of make are _not_ suitable (including that atthe mingw32 site). There are also problems with several earlierversions of the cygwin tools and dll. To avoid frustration, pleaseuse our tool set.We recommend that you use the mingw32 port of gcc-2.95.2 by Mumit Khanfrom http://www.mingw.org/ orftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32. (The `portal'gives more precise instructions.) You can build R against either thecrtdll.dll or msvcrt.dll runtime systems, and as from 1.2.0 werecommend the latter. (In particular, locale support is poor withcrtdll.dll, non-existent under Win9x.)It may also be possible to use the compilers from the cygwin 1.1 netrelease with the -mno-cygwin flag. (You will need the cygwin, gcc,mingw32, w32api and binutils bundles. You will need to ensure thatyou have just one version of cygwin1.dll in your path, and there isone in our tools distribution.) You can no longer use earlierversions (e.g. b20) of cygwin. (It is not possible to compile R touse msvcrt.dll with the cygwin suite.)perl5, available via http://www.activestate.com/Products/ActivePerl/zip and unzip from the Info-ZIP project (http://www.info-zip.org andmirrors, and included in our tools.zip).If you want to make compiled html (.chm) files you will need theMicrosoft HTML Help Workshop, available for download athttp://msdn.microsoft.com/library/tools/htmlhelp/wkshp/download.htmIf you want to make Window help files you will need hcrtf.exe from aWindows compiler installation (this has been available for download atftp://ftp.microsoft.com/softlib/mslfiles/hcwsetup.exe).All of these need to be installed and in your path, and theappropriate environment variables set.Building--------You also need: the R source (R-@RVER@.tgz), and to build theinstaller, unzip541.zip from any Info-ZIP mirror.Then: untar R-@RVER@.tgz somewhere (with no spaces in the path names),cd /somewhere/R-@RVER@/src/gnuwin32IMPORTANT: edit MkRules to set the appropriate paths as needed. Ifyou have Mingw32/cross-compiler and gcc-2.95.2.1 or later you can setHAVE_SHARED=YES which will speed up the process considerably.Edit Makefile to set the type(s) of help that you want built.and runmake BUILD=MINGW32 or CYGWINNote 1: the file @RWVER@\unzip\unzip32.dll is not in the sourcedistribution. It can be found in file unz541dN.zip at any Info-ZIPmirror, or you can copy it from a binary distribution.The file @RWVER@\bin\Rchtml.dll is only built if CHM help is specifiedin the main Makefile. Its source is the help directory, and you needthe HTML Help Workshop files to build it. It contains instructionsto build it under VC++6, and it is preferable to use that as theVC++ library will check versions of the components needed. You can justcopy this from a binary distribution.Note 2: building libR.a is highly disk intensive and can take severalminutes even on a local disc. We have seen times from 30 secs to 20minutes. Using a network file system is likely to take longer. It isdone in memory and is *much* faster with gcc-2.95.2.1 or later onmingw32.Note 3: we have had a report that a version of Norton Anti-Viruslocks up the machine when windres is run.Note 4: By default Doug Lea's malloc in the file src/gnuwin32/malloc.c isused. You can opt out of this by commenting the line LEA_MALLOC=YESin the Makefile, in which case the Windows malloc is used. The onein crtdll.dll is unlikely to be satisfactory, but the one in msvcrt.dlldoes work but imposes a considerable performance penalty.You can test a build by `make check': expect some differences in thetests of the print routines. You may need to set TMPDIR to a suitabletemporary directory: the default is c:\TEMP.Building bitmap device support------------------------------The file @RWVER@\bin\Rbitmap.dll is not built automatically:instructions on how to build it are in the file bitmap\INSTALL. Youcan just copy this from a binary distribution.Building Tcl/Tk support-----------------------The TclTk support package is not built automatically. To use this youneed to install tcl832.exe (or tcl831.exe if you already have it) fromdev.scriptics.com, and set TCL_HOME in MkRules to where you installedit (perhaps c:/Program Files/Tcl). Thenmake tclwill make the library.Cross-building on ix86 Linux============================You will need i386-mingw32 cross-compilers installed and in your path,preferably ones targetted at msvcrt.dll. There is currently acomplete set of tools athttp://www.stats.ox.ac.uk/pub/Rtools/i386-msvc-cross.tar.bz2(Just unpack this somewhere and put its bin directory in your path.)Instructions for building a cross-compiler are given athttp://www.nanotech.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txtAt the time of writing these were rather outdated. There is another setathttp://www.devolution.com/%7Eslouken/SDL/Xmingw32/which is targetted at msvcrt.dll. (There is also a cross-compilerthere, but omitting g77 which you will need.)Apart from the compiler, you need the mingw32 runtime system and across-built version of binutils 2.9.4.You will need Perl, zip and unzip installed.You also need: the R source (R-@RVER@.tgz), and to build the installer,unzip541.zip from any Info-ZIP mirror.Then: untar R-@RVER@.tgz somewhere, andcd /somewhere/R-@RVER@/src/gnuwin32Edit MkRules to set BUILD=CROSS and the appropriate paths (includingHEADER) as needed. With our set of cross-compilers you can uncommentHAVE_SHARED.Edit Makefile to set the type(s) of help that you want built. (Youwill not be able to cross-build .chm or .hlp files, nor Rchtml.dll,so set WINHELP to NO.)Packages can be made in the same way as natively: see the filereadme.packages. You will need to set STAMP=NO, e.g.make STAMP=NO pkg-fooBuilding the Manuals====================To make the PDF versions of the manuals you will need pdftex installedand configured to work with a large file: see doc/manual/README. Youalso need texindex (included in our tool set). Then the pdf manualscan be made bymake docsIf you want to make the info versions (not the Reference Manual), youwill need a version of makeinfo 4.0 (included in our tool set). Thencd ../../doc/manualsmake -f Makefile.win infowill make the info files.To make DVI versions of the manuals usecd ../../doc/manualsmake -f Makefile.win dvi(assuming you have tex and latex installed and in your path).To make HTML versions of the manuals (not the Reference Manual) usecd ../../doc/manualsmake -f Makefile.win htmlThis make use of tidy.exe, from http://www.w3c.org/.The fptex distribution of TeX (via www.fptex.org) includes a suitableport of pdftex.Feedback========Please send comments and bug reports to (preferably both of)Guido Masarotto <guido@hal.stat.unipd.it>Brian Ripley <ripley@stats.ox.ac.uk>