Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 152 lines (108 sloc) 5.843 kB
fa44a2c Initial revision
r authored
1
2 INSTALLING R UNDER UNIX
3
4
5 GENERALITIES
6
7 R will configure and build under a number of common Unix platforms
8 including dec-alpha-osf, freebsd, hpux, linux-elf, sgi-irix, solaris,
9 and sunos. In general it is relatively easy to adapt R to new
10 platforms. See below for details.
11
12
94e6a91 added make install
leisch authored
13 SIMPLE COMPILATION
fa44a2c Initial revision
r authored
14
da9f5c7 Explain that `make docs' requires Perl version 5 etc.
hornik authored
15 Choose a place to install the R tree (R is not just a binary, but has
16 additional data sets, help files, font metrics etc). Let's call this
17 place RHOME. Untar the source code. This should create directories
18 src, etc, cmd, help and doc. Issue the following commands:
fa44a2c Initial revision
r authored
19
20 ./configure
21 make
22
da9f5c7 Explain that `make docs' requires Perl version 5 etc.
hornik authored
23 If these commands execute successfully, the R binary will be copied to
24 the `$RHOME/bin' directory. In addition, a shell script font-end
25 called "R" will be created and copied to the same directory. You can
26 copy this script to a place where users can invoke it, for example to
27 `/usr/local/bin/R'. You could also copy the man page `R.1' to a place
94e6a91 added make install
leisch authored
28 where your man reader finds it, such as `/usr/local/man/man1'. If you
29 want to install the complete R tree to, e.g., /usr/local/lib/R, see
30 section INSTALLATION below.
fa44a2c Initial revision
r authored
31
f7f10e3 Explain configure command line options.
hornik authored
32 If you need or want to set certain configure variables to something
33 other than their default, you can do that by either editing the file
34 `config.site' or on the command line as
35
36 VAR="..." ./configure # Bourne shell compatibles
37 (setenv VAR "..."; ./configure) # C shell
38
eff400b warning about papersize in INSTALL
thomas authored
39 One common variable to change is R_PAPERSIZE, which defaults to a4, not
40 letter.
41
e6183ff Improve as suggested by BDR.
hornik authored
42 If you have libraries and header files, e.g. for GNU readline, in
43 non-system directories, use the variables LIBS (for libraries) and
44 CPPFLAGS (for header files), respectively, to specify these locations.
45
94e6a91 added make install
leisch authored
46 Make will also build plain text help pages as well as HTML and LaTeX
47 versions of the documentation (the three kinds can also be generated
48 separately using make help, make html and make latex). Note that as
49 of R version 0.60, you need Perl version 5 to build the documentation.
50 If this is not available on your system, you can obtain precompiled
51 documentation files via the `doc/pre-formatted-help' directory of the
52 Comprehensive R Archive Network (CRAN), see the file `RESOURCES' for
53 information on CRAN.
fa44a2c Initial revision
r authored
54
e6183ff Improve as suggested by BDR.
hornik authored
55 Now rehash if necessary, type `R' and reach for your S manuals ...
56 And, read the R FAQ (http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html).
fa44a2c Initial revision
r authored
57
58
94e6a91 added make install
leisch authored
59 INSTALLATION
60
61 After
785c495 Updated.
hornik authored
62
94e6a91 added make install
leisch authored
63 ./configure
64 make
785c495 Updated.
hornik authored
65
94e6a91 added make install
leisch authored
66 have been completed successfully, you can install the complete R tree
67 to your system by typing
68
69 make install
70
71 This will install to the following directories:
72
785c495 Updated.
hornik authored
73 $prefix/bin (some) executables
94e6a91 added make install
leisch authored
74 $prefix/man/man1 man pages
0ac4ab9 This commit was manufactured by cvs2svn to create tag 'R-0-63-2'.
(no author) authored
75 $prefix/share/R all the rest (libraries, online help
94e6a91 added make install
leisch authored
76 system, ...)
77
78 where prefix is determined during configuration (typically /usr/local)
79 and can be set by running configure with the option
80
81 ./configure --prefix=/where/you/want/R/to/go
82
83 The prefix of the installation directories can also be seen in the
84 status message that is displayed at the end of configure.
fa44a2c Initial revision
r authored
85
785c495 Updated.
hornik authored
86 You do not necessarily have to build R in the top-level source
87 directory (say, TOP_SRCDIR). To build in BUILDDIR, cd there and run
88
89 TOP_SRCDIR/configure
90 make
91
92 and so on, as described further above. This has the advantage of always
93 keeping your source tree `clean'.
7c15bc1 branch update - sync with 0.62.3 fixes
pd authored
94
fa44a2c Initial revision
r authored
95
0ac4ab9 This commit was manufactured by cvs2svn to create tag 'R-0-63-2'.
(no author) authored
96 USING MAKE
97
98 To compile R, you currently most likely need GNU make. (To be more
99 precise, you need a version of make which accepts shell wildcards in
100 dependencies.) On Solaris 2.6 in particular, you need a version of
101 GNU make different from 3.77 (the current one); 3.76.1 works fine.
102
103
fa44a2c Initial revision
r authored
104 USING FORTRAN
105
f7f10e3 Explain configure command line options.
hornik authored
106 To compile R, you need a FORTRAN compiler or f2c, the FORTRAN-to-C
8d2e6b4 Last minute release changes:
pd authored
107 converter. The default is to search for f77, g77, fort77, f90, xlf,
fae2d08 Also look for fort77.
hornik authored
108 cf77, and fc (in that order), and then for f2c, and use whichever is
109 found first; if none is found, R cannot be compiled. The search
110 mechanism can be changed using the `--with-g77', `--with-f77', and
111 `--with-f2c' command line options to configure. If your FORTRAN
785c495 Updated.
hornik authored
112 compiler is in a non-standard location, you should set the enviroment
113 vaiable PATH accordingly before running configure.
fa44a2c Initial revision
r authored
114
115
116 NEW PLATFORMS (Standards Hah!)
117
118 There are a number of sources of problems when installing R on a new
18ec53d syncs from patch branch
pd authored
119 hardware/os platform.
fa44a2c Initial revision
r authored
120
121 1. Floating Point Arithmetic: R supports the POSIX, SVID and IEEE
122 models for floating point arithmetic. The POSIX and SVID models
123 provide no problems. The IEEE model however can be a pain. The
124 problem is that there is no agreement on how to set the signalling
125 behavior; sgi/irix and linux require no special action, freebsd
126 requires a call to (the macro) fpsetmask(0) and osf1v3.2 requires
127 that computation be done with a -ieee_with_inexact flag etc...
128 On a new platform you must find out the magic recipe and add some
129 code to make it work. This can often be done via the file
130 config.site which resides in the top level directory.
131
132 2. Shared Libraries: There seems to be very little agreement across
133 platforms on what needs to be done to build shared libraries.
134 there are many different combinations of flags for the compilers
135 and loaders. The technique we use is to interrogate the X window
136 system about what it does (using xmkmf). This often works, but
137 you may have to manually override the results. Scanning the cc(1)
138 and ld(1) manual entries usually reveals the correct incantation.
139 Once you know the recipe you can modify the file config.site
140 (following the instructions therein) so that the build will use
141 these options.
142
143 If you do manage to get R running on a new platform please let us know
144 about it so we can modify the configuration procedures to include that
145 platform.
146
147 If you are having trouble getting R to work on your platform please
148 feel free to get in touch to ask questions. We've had a fair amount
149 of practice at porting R to new platforms...
150
3ade498 Updates
ihaka authored
151 R Core Members
Something went wrong with that request. Please try again.