| 18617 |
ripley |
1 |
<html lang="en">
|
|
|
2 |
<head>
|
| 15258 |
ripley |
3 |
<title>R Installation and Administration</title>
|
| 28115 |
hornik |
4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
| 24001 |
hornik |
5 |
<meta name="description" content="R Installation and Administration">
|
| 26591 |
hornik |
6 |
<meta name="generator" content="makeinfo 4.6">
|
|
|
7 |
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
|
8 |
<style type="text/css"><!--
|
|
|
9 |
pre.display { font-family:inherit }
|
|
|
10 |
pre.format { font-family:inherit }
|
|
|
11 |
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|
|
12 |
pre.smallformat { font-family:inherit; font-size:smaller }
|
|
|
13 |
pre.smallexample { font-size:smaller }
|
|
|
14 |
pre.smalllisp { font-size:smaller }
|
|
|
15 |
--></style>
|
| 18617 |
ripley |
16 |
</head>
|
|
|
17 |
<body>
|
| 24001 |
hornik |
18 |
<h1 class="settitle">R Installation and Administration</h1>
|
| 14185 |
ripley |
19 |
<a name="Top"></a>
|
| 14184 |
ripley |
20 |
|
| 24001 |
hornik |
21 |
<h2 class="unnumbered">R Installation and Administration</h2>
|
| 14184 |
ripley |
22 |
|
| 26591 |
hornik |
23 |
<p>This is a guide to installation and administration for R.
|
| 14184 |
ripley |
24 |
|
| 28362 |
murdoch |
25 |
<p>The current version of this document is 1.9.0 (2004-02-18).
|
| 14184 |
ripley |
26 |
|
| 26882 |
ripley |
27 |
ISBN 3-900051-02-X
|
| 19393 |
hornik |
28 |
|
| 14185 |
ripley |
29 |
<a name="Obtaining%20R"></a>
|
| 14184 |
ripley |
30 |
|
| 24001 |
hornik |
31 |
<h2 class="chapter">1 Obtaining R</h2>
|
| 14184 |
ripley |
32 |
|
| 26591 |
hornik |
33 |
<p>Sources, binaries and documentation for R can be obtained via
|
| 14307 |
ripley |
34 |
<small>CRAN</small>, the "Comprehensive R Archive Network". See the file
|
| 18887 |
hornik |
35 |
<code>RESOURCES</code> in the R distribution for information on
|
|
|
36 |
<small>CRAN</small>.
|
| 14184 |
ripley |
37 |
|
| 14307 |
ripley |
38 |
<a name="Getting%20and%20unpacking%20the%20sources"></a>
|
| 14184 |
ripley |
39 |
|
| 24001 |
hornik |
40 |
<h3 class="section">1.1 Getting and unpacking the sources</h3>
|
| 14184 |
ripley |
41 |
|
| 26591 |
hornik |
42 |
<p>The simplest way is to download the most recent
|
| 24001 |
hornik |
43 |
<code>R-</code><var>x</var><code>.</code><var>y</var><code>.</code><var>z</var><code>.tgz</code> file, and unpack it with
|
| 14307 |
ripley |
44 |
|
| 24001 |
hornik |
45 |
<pre class="smallexample"> tar xvfz R-<var>x</var>.<var>y</var>.<var>z</var>.tgz
|
|
|
46 |
</pre>
|
| 14184 |
ripley |
47 |
|
| 14307 |
ripley |
48 |
<p>on systems that have GNU <code>tar</code> installed. On other systems you
|
|
|
49 |
need at least to have the <code>gzip</code> program installed. Then you
|
|
|
50 |
can use
|
|
|
51 |
|
| 24001 |
hornik |
52 |
<pre class="smallexample"> gzip -dc R-<var>x</var>.<var>y</var>.<var>z</var>.tgz | tar xvf -
|
|
|
53 |
</pre>
|
| 14184 |
ripley |
54 |
|
| 24001 |
hornik |
55 |
<p>If you need to transport the sources on floppy disks, you can download
|
|
|
56 |
the <code>R-</code><var>x</var><code>.</code><var>y</var><code>.</code><var>z</var><code>.tgz-split.*</code> files and paste them
|
| 14307 |
ripley |
57 |
together at the destination with (Unix)
|
|
|
58 |
|
| 24001 |
hornik |
59 |
<pre class="smallexample"> cat R-<var>x</var>.<var>y</var>.<var>z</var>-split.* > R-<var>x</var>.<var>y</var>.<var>z</var>.tgz
|
|
|
60 |
</pre>
|
| 14184 |
ripley |
61 |
|
| 14307 |
ripley |
62 |
<p>and proceed as above. If you want the build to be usable by a group of
|
|
|
63 |
users, set <code>umask</code> before unpacking so that the files will be
|
|
|
64 |
readable by the target group (e.g., <code>umask 022</code> to be usable by all
|
| 14184 |
ripley |
65 |
users).
|
|
|
66 |
|
| 14185 |
ripley |
67 |
<a name="Using%20rsync"></a>
|
| 14184 |
ripley |
68 |
|
| 24001 |
hornik |
69 |
<h3 class="section">1.2 Using rsync</h3>
|
| 14184 |
ripley |
70 |
|
| 26591 |
hornik |
71 |
<p>Sources are also available via anonymous rsync. Use
|
| 14184 |
ripley |
72 |
|
| 24001 |
hornik |
73 |
<pre class="smallexample"> rsync -rC rsync.r-project.org::<var>module</var> R
|
|
|
74 |
</pre>
|
| 14184 |
ripley |
75 |
|
|
|
76 |
<p>to create a copy of the source tree specified by <var>module</var> in the
|
|
|
77 |
subdirectory <code>R</code> of the current directory, where <var>module</var>
|
| 15508 |
pd |
78 |
specifies one of the four existing flavors of the R sources, and can be
|
| 15168 |
pd |
79 |
one of <code>r-release</code> (current released version), <code>r-patched</code>
|
| 28261 |
murdoch |
80 |
(patched released version), and <code>r-devel</code> (development version).
|
| 24354 |
hornik |
81 |
(These flavors are described in the R FAQ,
|
|
|
82 |
<a href="http://www.ci.tuwien.ac.at/~hornik/R/">http://www.ci.tuwien.ac.at/~hornik/R/</a>.) The rsync trees are
|
| 28261 |
murdoch |
83 |
created directly from the master CVS archive and are updated hourly.
|
| 24354 |
hornik |
84 |
The <code>-C</code> option in the <code>rsync</code> command is to cause it to
|
|
|
85 |
skip the CVS directories. Further information on <code>rsync</code> is
|
|
|
86 |
available at <a href="http://rsync.samba.org/rsync/">http://rsync.samba.org/rsync/</a>.
|
| 14184 |
ripley |
87 |
|
| 14185 |
ripley |
88 |
<a name="Installing%20R%20under%20Unix"></a>
|
| 14184 |
ripley |
89 |
|
| 24001 |
hornik |
90 |
<h2 class="chapter">2 Installing R under Unix</h2>
|
| 14184 |
ripley |
91 |
|
| 26591 |
hornik |
92 |
<p>R will configure and build under a number of common Unix platforms
|
| 21394 |
pd |
93 |
including i386-freebsd, <var>cpu</var>-linux-gnu for the i386, alpha, arm,
|
| 28261 |
murdoch |
94 |
hppa, ia64, m68k, powerpc, and sparc CPUs (see e.g.
|
| 21394 |
pd |
95 |
<a href="http://buildd.debian.org/build.php?&pkg=r-base">http://buildd.debian.org/build.php?&pkg=r-base</a>),
|
|
|
96 |
i386-sun-solaris, powerpc-apple-darwin, mips-sgi-irix, alpha-dec-osf4,
|
|
|
97 |
rs6000-ibm-aix, hppa-hp-hpux, and sparc-sun-solaris.
|
| 14184 |
ripley |
98 |
|
| 24001 |
hornik |
99 |
<p>In addition, binary distributions are available for most common Linux
|
| 23621 |
hornik |
100 |
distributions, and for MacOS X (Darwin) with X11. See the <small>FAQ</small>
|
|
|
101 |
for current details. These are installed in platform-specific ways. So
|
|
|
102 |
for the rest of this chapter we consider only building from the sources.
|
| 14184 |
ripley |
103 |
|
| 14307 |
ripley |
104 |
<a name="Simple%20compilation"></a>
|
| 14184 |
ripley |
105 |
|
| 24001 |
hornik |
106 |
<h3 class="section">2.1 Simple compilation</h3>
|
| 14184 |
ripley |
107 |
|
| 26591 |
hornik |
108 |
<p>First review the essential and useful tools and libraries in
|
| 14307 |
ripley |
109 |
<a href="#Essential%20and%20useful%20other%20programs">Essential and useful other programs</a>, and install those you want or
|
|
|
110 |
need.
|
| 14184 |
ripley |
111 |
|
| 24001 |
hornik |
112 |
<p>Choose a place to install the R tree (R is not just a binary, but
|
| 14184 |
ripley |
113 |
has additional data sets, help files, font metrics etc). Let us call
|
| 18887 |
hornik |
114 |
this place <var>R_HOME</var>. Untar the source code. This should create
|
| 14184 |
ripley |
115 |
directories <code>src</code>, <code>doc</code>, and several more. Issue the
|
|
|
116 |
following commands:
|
|
|
117 |
|
| 24001 |
hornik |
118 |
<pre class="smallexample"> ./configure
|
|
|
119 |
make
|
|
|
120 |
</pre>
|
| 14184 |
ripley |
121 |
|
|
|
122 |
<p>(See <a href="#Using%20make">Using make</a> if your make is not called <code>make</code>.)
|
|
|
123 |
|
| 24001 |
hornik |
124 |
<p>Then check the built system works correctly, by
|
| 14184 |
ripley |
125 |
|
| 24001 |
hornik |
126 |
<pre class="smallexample"> make check
|
|
|
127 |
</pre>
|
| 14184 |
ripley |
128 |
|
|
|
129 |
<p>Failures are not necessarily problems as they might be caused by missing
|
| 14307 |
ripley |
130 |
functionality, but you should look carefully at any reported
|
| 14328 |
ripley |
131 |
discrepancies. To re-run the tests you would need
|
| 18887 |
hornik |
132 |
|
| 24001 |
hornik |
133 |
<pre class="smallexample"> make check FORCE=FORCE
|
|
|
134 |
</pre>
|
| 14184 |
ripley |
135 |
|
| 24001 |
hornik |
136 |
<p>More comprehensive testing can be done by
|
| 23859 |
hornik |
137 |
|
| 24001 |
hornik |
138 |
<pre class="smallexample"> make check-devel
|
|
|
139 |
</pre>
|
| 23859 |
hornik |
140 |
|
|
|
141 |
<p>or
|
|
|
142 |
|
| 24001 |
hornik |
143 |
<pre class="smallexample"> make check-all
|
|
|
144 |
</pre>
|
| 23859 |
hornik |
145 |
|
|
|
146 |
<p>see <code>tests/README</code>.
|
|
|
147 |
|
| 24001 |
hornik |
148 |
<p>If these commands execute successfully, the R binary will be copied
|
|
|
149 |
to the <code></code><var>R_HOME</var><code>/bin</code> directory. In addition, a shell-script
|
| 14184 |
ripley |
150 |
front-end called <code>R</code> will be created and copied to the same
|
|
|
151 |
directory. You can copy this script to a place where users can invoke
|
|
|
152 |
it, for example to <code>/usr/local/bin/R</code>. You could also copy the man
|
| 14307 |
ripley |
153 |
page <code>R.1</code> to a place where your <code>man</code> reader finds it,
|
|
|
154 |
such as <code>/usr/local/man/man1</code>. If you want to install the complete
|
| 28261 |
murdoch |
155 |
R tree to, e.g., <code>/usr/local/lib/R</code>, see <a href="#Installation">Installation</a>.
|
| 14307 |
ripley |
156 |
Note: you do not <em>need</em> to install R: you can run it from where
|
|
|
157 |
it was built.
|
| 14184 |
ripley |
158 |
|
| 24001 |
hornik |
159 |
<p>You do not necessarily have to build R in the top-level source
|
|
|
160 |
directory (say, <code></code><var>TOP_SRCDIR</var><code></code>). To build in
|
|
|
161 |
<code></code><var>BUILDDIR</var><code></code>, run
|
| 14307 |
ripley |
162 |
|
| 24001 |
hornik |
163 |
<pre class="smallexample"> cd <var>BUILDDIR</var>
|
|
|
164 |
<var>TOP_SRCDIR</var>/configure
|
|
|
165 |
make
|
|
|
166 |
</pre>
|
| 14184 |
ripley |
167 |
|
|
|
168 |
<p>and so on, as described further below. This has the advantage of always
|
| 14307 |
ripley |
169 |
keeping your source tree "clean". (You may need GNU <code>make</code> to
|
|
|
170 |
allow this.)
|
| 14184 |
ripley |
171 |
|
| 24001 |
hornik |
172 |
<p>Make will also build plain text help pages as well as <small>HTML</small> and
|
| 14307 |
ripley |
173 |
LaTeX versions of the R object documentation (the three kinds can
|
|
|
174 |
also be generated separately using <code>make help</code>, <code>make html</code>
|
|
|
175 |
and <code>make latex</code>). Note that you need Perl version 5: if this is
|
|
|
176 |
not available on your system, you can obtain PDF versions of the
|
| 14184 |
ripley |
177 |
documentation files via <small>CRAN</small>.
|
|
|
178 |
|
| 24001 |
hornik |
179 |
<p>Now <code>rehash</code> if necessary, type <kbd>R</kbd>, and read the R manuals
|
| 14307 |
ripley |
180 |
and the R <small>FAQ</small> (files <code>FAQ</code> or
|
|
|
181 |
<code>doc/html/faq.html</code>, or
|
|
|
182 |
<a href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a> which always has
|
|
|
183 |
the latest version).
|
| 14184 |
ripley |
184 |
|
| 14307 |
ripley |
185 |
<a name="Making%20the%20manuals"></a>
|
| 14184 |
ripley |
186 |
|
| 24001 |
hornik |
187 |
<h3 class="section">2.2 Making the manuals</h3>
|
| 14184 |
ripley |
188 |
|
| 26591 |
hornik |
189 |
<p>There is a set of manuals that can be built from the sources,
|
| 14184 |
ripley |
190 |
|
| 24001 |
hornik |
191 |
<dl>
|
| 14184 |
ripley |
192 |
<dt><code>refman</code>
|
| 28261 |
murdoch |
193 |
<dd>Printed versions of all the help pages.
|
| 14184 |
ripley |
194 |
<br><dt><code>R-FAQ</code>
|
| 28261 |
murdoch |
195 |
<dd>R <small>FAQ</small> (which is already built for you).
|
| 14184 |
ripley |
196 |
<br><dt><code>R-intro</code>
|
| 28261 |
murdoch |
197 |
<dd>"An Introduction to R".
|
| 14184 |
ripley |
198 |
<br><dt><code>R-data</code>
|
| 28261 |
murdoch |
199 |
<dd>"R Data Import/Export".
|
| 14184 |
ripley |
200 |
<br><dt><code>R-admin</code>
|
| 28261 |
murdoch |
201 |
<dd>"R Installation and Administration", this manual.
|
| 14184 |
ripley |
202 |
<br><dt><code>R-exts</code>
|
| 28261 |
murdoch |
203 |
<dd>"Writing R Extensions".
|
| 14184 |
ripley |
204 |
<br><dt><code>R-lang</code>
|
| 28261 |
murdoch |
205 |
<dd>"The R Language Definition".
|
| 14184 |
ripley |
206 |
</dl>
|
|
|
207 |
|
| 14698 |
hornik |
208 |
<p>To make these, use
|
| 14184 |
ripley |
209 |
|
| 24001 |
hornik |
210 |
<pre class="smallexample"> make dvi to create DVI versions
|
|
|
211 |
make pdf to create PDF versions
|
|
|
212 |
make info to create info files (not <code>refman</code>).
|
|
|
213 |
</pre>
|
| 14184 |
ripley |
214 |
|
| 24001 |
hornik |
215 |
<p>You will not be able to build the info files unless you have
|
| 14184 |
ripley |
216 |
<code>makeinfo</code> version 4 or later installed (and some Linux
|
|
|
217 |
distributions have 3.12).
|
|
|
218 |
|
| 24001 |
hornik |
219 |
<p>The DVI versions can be previewed and printed using standard programs
|
| 14307 |
ripley |
220 |
such as <code>xdvi</code> and <code>dvips</code>. The PDF versions can be
|
|
|
221 |
viewed using Acrobat Reader or (recent versions of) ghostscript: they
|
|
|
222 |
have hyperlinks that can be followed in Acrobat Reader. The info files
|
|
|
223 |
are suitable for reading online with Emacs or the standalone GNU Info.
|
| 14184 |
ripley |
224 |
|
| 14185 |
ripley |
225 |
<a name="Installation"></a>
|
| 14184 |
ripley |
226 |
|
| 24001 |
hornik |
227 |
<h3 class="section">2.3 Installation</h3>
|
| 14184 |
ripley |
228 |
|
| 26591 |
hornik |
229 |
<p>After
|
| 14307 |
ripley |
230 |
|
| 24001 |
hornik |
231 |
<pre class="smallexample"> ./configure
|
|
|
232 |
make
|
|
|
233 |
make check
|
|
|
234 |
</pre>
|
| 14184 |
ripley |
235 |
|
|
|
236 |
<p>have been completed successfully, you can install the complete R tree
|
|
|
237 |
to your system by typing
|
| 14307 |
ripley |
238 |
|
| 24001 |
hornik |
239 |
<pre class="smallexample"> make install
|
|
|
240 |
</pre>
|
| 14184 |
ripley |
241 |
|
|
|
242 |
<p>This will install to the following directories:
|
|
|
243 |
|
| 24001 |
hornik |
244 |
<dl>
|
|
|
245 |
<dt><code></code><var>prefix</var><code>/bin</code>
|
|
|
246 |
<dd>the front-end shell script
|
|
|
247 |
<br><dt><code></code><var>prefix</var><code>/man/man1</code>
|
|
|
248 |
<dd>the man page
|
|
|
249 |
<br><dt><code></code><var>prefix</var><code>/lib/R</code>
|
|
|
250 |
<dd>all the rest (libraries, on-line help system, <small class="dots">...</small>)
|
| 14184 |
ripley |
251 |
</dl>
|
|
|
252 |
|
| 18887 |
hornik |
253 |
<p>where <var>prefix</var> is determined during configuration (typically
|
| 14307 |
ripley |
254 |
<code>/usr/local</code>) and can be set by running <code>configure</code> with
|
|
|
255 |
the option <code>--prefix</code>, as in
|
|
|
256 |
|
| 24001 |
hornik |
257 |
<pre class="smallexample"> ./configure --prefix=/where/you/want/R/to/go
|
|
|
258 |
</pre>
|
| 14184 |
ripley |
259 |
|
| 14328 |
ripley |
260 |
<p>This causes <code>make install</code> to install the R executable to
|
|
|
261 |
<code>/where/you/want/R/to/go/bin</code>, and so on. The prefix of the
|
| 14698 |
hornik |
262 |
installation directories can be seen in the status message that is
|
| 14328 |
ripley |
263 |
displayed at the end of <code>configure</code>. You can install into
|
|
|
264 |
another directory by using
|
| 14184 |
ripley |
265 |
|
| 24001 |
hornik |
266 |
<pre class="smallexample"> make prefix=/path/to/here install
|
|
|
267 |
</pre>
|
| 14184 |
ripley |
268 |
|
| 24001 |
hornik |
269 |
<p>To install DVI, info and PDF versions of the manuals, use one or more of
|
| 14307 |
ripley |
270 |
|
| 24001 |
hornik |
271 |
<pre class="smallexample"> make install-dvi
|
|
|
272 |
make install-info
|
|
|
273 |
make install-pdf
|
|
|
274 |
</pre>
|
| 14184 |
ripley |
275 |
|
|
|
276 |
<p>To ensure that the installed tree is usable by the right group of users,
|
| 14307 |
ripley |
277 |
set <code>umask</code> appropriately (perhaps to <code>022</code>) before unpacking
|
|
|
278 |
the sources and throughout the build process.
|
| 14184 |
ripley |
279 |
|
| 14185 |
ripley |
280 |
<a name="Installing%20R%20under%20Windows"></a>
|
| 14184 |
ripley |
281 |
|
| 24001 |
hornik |
282 |
<h2 class="chapter">3 Installing R under Windows</h2>
|
| 14184 |
ripley |
283 |
|
| 26591 |
hornik |
284 |
<p>The <code>bin/windows</code> directory of a <small>CRAN</small> site contains
|
| 14184 |
ripley |
285 |
binaries for a base distribution and a large number of add-on packages
|
| 20580 |
hornik |
286 |
from <small>CRAN</small> to run on Windows 95, 98, NT4, 2000, ME and XP (at
|
| 14184 |
ripley |
287 |
least) on Intel and clones (but not on other platforms).
|
|
|
288 |
|
| 24001 |
hornik |
289 |
<p>You do need one of those Windows versions: Windows 3.11+win32s will not
|
| 14184 |
ripley |
290 |
work.
|
|
|
291 |
|
| 24001 |
hornik |
292 |
<p>Your file system must allow long file names (as is likely except
|
| 14184 |
ripley |
293 |
perhaps for some network-mounted systems).
|
|
|
294 |
|
| 26591 |
hornik |
295 |
<p>The simplest way is to use <code>rw1090dev.exe</code> or
|
| 21924 |
ripley |
296 |
<code>miniR.exe</code>. Just double-click on the icon and follow the
|
|
|
297 |
instructions. If you installed R this way you can uninstall it from the
|
| 22570 |
ripley |
298 |
Control Panel.
|
| 14184 |
ripley |
299 |
|
| 24001 |
hornik |
300 |
<p>See the <a href="http://www.stats.ox.ac.uk/pub/R/rw-FAQ.html">R Windows <small>FAQ</small></a> for more details.
|
| 14184 |
ripley |
301 |
|
| 14307 |
ripley |
302 |
<a name="Building%20from%20source"></a>
|
| 14184 |
ripley |
303 |
|
| 24001 |
hornik |
304 |
<h3 class="section">3.1 Building from source</h3>
|
| 14184 |
ripley |
305 |
|
| 26591 |
hornik |
306 |
<p>If you want to build this port from the sources, see the file
|
| 14307 |
ripley |
307 |
<code>src/gnuwin32/INSTALL</code> in the source distribution. You will need
|
|
|
308 |
to collect, install and test an extensive set of tools: see
|
| 14184 |
ripley |
309 |
<a href="http://www.stats.ox.ac.uk/pub/Rtools/">http://www.stats.ox.ac.uk/pub/Rtools/</a> for the current locations.
|
|
|
310 |
|
| 24001 |
hornik |
311 |
<p>You may need to compile under a case-honouring file system: we found
|
| 14184 |
ripley |
312 |
that a <code>samba</code>-mounted file system (which maps all file names to
|
| 19393 |
hornik |
313 |
lower case) did not work. Open a commands window at a directory <em>whose
|
|
|
314 |
path does not contain spaces</em>, and run something like
|
| 14307 |
ripley |
315 |
|
| 26591 |
hornik |
316 |
<pre class="smallexample"> tar zxvf R-1.9.0.tgz
|
|
|
317 |
cd R-1.9.0\src\gnuwin32
|
| 24001 |
hornik |
318 |
make
|
|
|
319 |
</pre>
|
| 14184 |
ripley |
320 |
|
| 14307 |
ripley |
321 |
<p>sit back and wait (for about 5 minutes on 1GHz PIII with a fast local
|
|
|
322 |
disc).
|
| 14184 |
ripley |
323 |
|
| 24001 |
hornik |
324 |
<p>For further details, including how to make the documentation and how to
|
| 14184 |
ripley |
325 |
cross-compile, see <code>src/gnuwin32/INSTALL</code>.
|
|
|
326 |
|
| 14307 |
ripley |
327 |
<a name="Add-on%20packages"></a>
|
| 14184 |
ripley |
328 |
|
| 24070 |
ripley |
329 |
<h2 class="chapter">4 Add-on packages</h2>
|
| 14184 |
ripley |
330 |
|
| 26591 |
hornik |
331 |
<p>This chapter applies to Unix-like and Windows versions of R.
|
| 14184 |
ripley |
332 |
|
| 24001 |
hornik |
333 |
<p>It is helpful to use the correct terminology. A <em>package</em> is
|
| 18887 |
hornik |
334 |
loaded from a <em>library</em> by the function <code>library()</code>. Thus a
|
| 14184 |
ripley |
335 |
library is a directory containing installed packages; the main library
|
| 24001 |
hornik |
336 |
is <code></code><var>R_HOME</var><code>/library</code>, but others can be used, for example by
|
| 18887 |
hornik |
337 |
setting the environment variable <code>R_LIBS</code> or using the R function
|
| 16988 |
hornik |
338 |
<code>.libPaths()</code>.
|
| 14184 |
ripley |
339 |
|
| 14185 |
ripley |
340 |
<a name="Installing%20packages"></a>
|
| 14184 |
ripley |
341 |
|
| 24070 |
ripley |
342 |
<h3 class="section">4.1 Installing packages</h3>
|
| 14184 |
ripley |
343 |
|
| 28261 |
murdoch |
344 |
<p>Packages may be distributed in source form or compiled binary form.
|
| 24594 |
ripley |
345 |
Installing source packages requires that compilers and tools
|
|
|
346 |
(including Perl 5.004 or later) be installed. Binary packages
|
|
|
347 |
are platform specific and generally need
|
|
|
348 |
no special tools to install, but see the documentation for
|
|
|
349 |
your platform for details.
|
| 19459 |
pd |
350 |
|
| 24001 |
hornik |
351 |
<p>Note that you need to specify implicitly or explicitly the library to
|
| 14184 |
ripley |
352 |
which the package is to be installed. This is only an issue if you have
|
|
|
353 |
more than one library, of course.
|
|
|
354 |
|
| 24001 |
hornik |
355 |
<p>To install packages from source on Unix use
|
| 14307 |
ripley |
356 |
|
| 24001 |
hornik |
357 |
<pre class="smallexample"> R CMD INSTALL -l /path/to/library <var>pkg1</var> <var>pkg2</var> ...
|
|
|
358 |
</pre>
|
| 14184 |
ripley |
359 |
|
| 20580 |
hornik |
360 |
<p>The part <code>-l /path/to/library</code> can be omitted, in which case the
|
|
|
361 |
first library in <code>R_LIBS</code> is used if set, otherwise the main
|
| 24001 |
hornik |
362 |
library <code></code><var>R_HOME</var><code>/library</code> is used. (<code>R_LIBS</code> is looked
|
| 20580 |
hornik |
363 |
for in the environment: <code>.Renviron</code> is not read by <code>R CMD</code>.)
|
| 14184 |
ripley |
364 |
|
| 24001 |
hornik |
365 |
<p>The Windows equivalent is<a rel="footnote" href="#fn-1"><sup>1</sup></a>
|
| 14307 |
ripley |
366 |
|
| 28261 |
murdoch |
367 |
<pre class="smallexample"> R CMD INSTALL -l /path/to/library <var>pkg1</var> <var>pkg2</var> ...
|
| 24001 |
hornik |
368 |
</pre>
|
| 14184 |
ripley |
369 |
|
| 24001 |
hornik |
370 |
<p>Alternatively, packages can be downloaded and installed from within
|
| 14307 |
ripley |
371 |
R. First set the option <code>CRAN</code> to your nearest <small>CRAN</small>
|
|
|
372 |
mirror, for example
|
|
|
373 |
|
| 24001 |
hornik |
374 |
<pre class="smallexample"> > options(CRAN = "http://cran.us.r-project.org/")
|
|
|
375 |
</pre>
|
| 14184 |
ripley |
376 |
|
| 14307 |
ripley |
377 |
<p>Then download and install package <strong>foo</strong> by
|
|
|
378 |
|
| 24001 |
hornik |
379 |
<pre class="smallexample"> > install.packages("foo")
|
|
|
380 |
</pre>
|
| 14184 |
ripley |
381 |
|
|
|
382 |
<p>Unless the library is specified (argument <code>lib</code>) the first library
|
| 16988 |
hornik |
383 |
in the library search path is used.
|
| 14184 |
ripley |
384 |
|
| 24001 |
hornik |
385 |
<p>What this does is different on Unix and Windows. On Unix it consults
|
| 14307 |
ripley |
386 |
the list of available source packages on <small>CRAN</small>, downloads the
|
|
|
387 |
latest version of the <strong>foo</strong> sources, and installs it (via <code>R
|
| 14184 |
ripley |
388 |
CMD INSTALL</code>). On Windows it looks at the list of <em>binary</em>
|
|
|
389 |
versions of packages and downloads the latest version (if any).
|
|
|
390 |
|
| 24001 |
hornik |
391 |
<p>On Windows <code>install.packages</code> can also install a binary package
|
| 14307 |
ripley |
392 |
from a local <code>zip</code> file by setting argument <code>CRAN</code> to
|
| 14754 |
ripley |
393 |
<code>NULL</code>. <code>RGui.exe</code> has a menu <code>Packages</code> with a GUI
|
|
|
394 |
interface to <code>install.packages</code>, <code>update.packages</code> and
|
|
|
395 |
<code>library</code>.
|
| 14184 |
ripley |
396 |
|
| 14185 |
ripley |
397 |
<a name="Updating%20packages"></a>
|
| 14184 |
ripley |
398 |
|
| 24070 |
ripley |
399 |
<h3 class="section">4.2 Updating packages</h3>
|
| 14184 |
ripley |
400 |
|
| 26591 |
hornik |
401 |
<p>The command <code>update.packages()</code> is the simplest way to ensure that
|
| 14307 |
ripley |
402 |
all the packages on your system are up to date. Set the <code>CRAN</code>
|
|
|
403 |
option as in the previous section. The <code>update.packages()</code>
|
| 14184 |
ripley |
404 |
downloads the list of available packages and their current versions,
|
|
|
405 |
compares it with those installed and offers to fetch and install any
|
|
|
406 |
that have later versions on <small>CRAN</small>.
|
|
|
407 |
|
| 24001 |
hornik |
408 |
<p>An alternative way of keeping packages up-to-date is provided by the
|
| 17276 |
pd |
409 |
command <code>packageStatus()</code>, which returns an object with information
|
|
|
410 |
on all installed packages and packages available at multiple
|
| 24001 |
hornik |
411 |
repositories (CRAN, local archive, <small class="dots">...</small>). The <code>print</code> and
|
| 17276 |
pd |
412 |
<code>summary</code> methods give an overview of installed and available
|
|
|
413 |
packages, the <code>upgrade</code> method offers to fetch and install outdated
|
|
|
414 |
packages. This allows R to fetch packages from several repositories and
|
|
|
415 |
keep in sync with all of them, instead of only one CRAN mirror, and is
|
|
|
416 |
intended to become the default package manager for future versions of R.
|
|
|
417 |
|
| 14185 |
ripley |
418 |
<a name="Removing%20packages"></a>
|
| 14184 |
ripley |
419 |
|
| 24070 |
ripley |
420 |
<h3 class="section">4.3 Removing packages</h3>
|
| 14184 |
ripley |
421 |
|
| 26591 |
hornik |
422 |
<p>Packages can be removed in a number of ways. From a command prompt they
|
| 14184 |
ripley |
423 |
can be removed by
|
|
|
424 |
|
| 24001 |
hornik |
425 |
<pre class="smallexample"> R CMD REMOVE -l /path/to/library <var>pkg1</var> <var>pkg2</var> ...
|
|
|
426 |
</pre>
|
| 14184 |
ripley |
427 |
|
|
|
428 |
<p>(Unix) or
|
| 22426 |
hornik |
429 |
|
| 28261 |
murdoch |
430 |
<pre class="smallexample"> R CMD REMOVE -l /path/to/library <var>pkg1</var> <var>pkg2</var> ...
|
| 24001 |
hornik |
431 |
</pre>
|
| 14184 |
ripley |
432 |
|
|
|
433 |
<p>(Windows).
|
|
|
434 |
|
| 24001 |
hornik |
435 |
<p>From a running R process they can be removed by
|
| 14698 |
hornik |
436 |
|
| 24001 |
hornik |
437 |
<pre class="smallexample"> > remove.packages(c("pkg1", "pkg2"),
|
|
|
438 |
lib = file.path("path", "to", "library"))
|
|
|
439 |
</pre>
|
| 14184 |
ripley |
440 |
|
| 24001 |
hornik |
441 |
<p>Finally, in most installations one can just remove the package directory
|
| 14184 |
ripley |
442 |
from the library.
|
|
|
443 |
|
| 24001 |
hornik |
444 |
<p><strong>Note:</strong> whereas it is currently possible to install package
|
| 18887 |
hornik |
445 |
<em>bundles</em>, one cannot remove these as such--the packages contained
|
|
|
446 |
in the bundle have to removed individually.
|
|
|
447 |
|
| 14307 |
ripley |
448 |
<a name="Essential%20and%20useful%20other%20programs"></a>
|
| 14184 |
ripley |
449 |
|
| 24001 |
hornik |
450 |
<h2 class="appendix">Appendix A Essential and useful other programs</h2>
|
| 14184 |
ripley |
451 |
|
| 26591 |
hornik |
452 |
<p>This appendix gives details of programs you will need to build R on
|
| 14184 |
ripley |
453 |
Unix-like platforms, or which will be used by R if found by
|
| 18887 |
hornik |
454 |
<code>configure</code>.
|
| 14184 |
ripley |
455 |
|
| 27252 |
ripley |
456 |
<p>Remember that some package management systems (such as <small>RPM</small> and
|
|
|
457 |
deb) make a distinction between the user version of a package and the
|
|
|
458 |
development version. The latter usually has the same name but with the
|
|
|
459 |
extension <code>-devel</code> or <code>-dev</code>: you need both versions
|
|
|
460 |
installed.
|
|
|
461 |
|
| 14307 |
ripley |
462 |
<a name="Essential%20programs"></a>
|
| 14184 |
ripley |
463 |
|
| 24001 |
hornik |
464 |
<h3 class="section">A.1 Essential programs</h3>
|
| 14184 |
ripley |
465 |
|
| 26591 |
hornik |
466 |
<p>You need a means of compiling C and FORTRAN 77 (see <a href="#Using%20FORTRAN">Using FORTRAN</a>). Some add-on packages also need a C++ compiler.
|
| 14184 |
ripley |
467 |
|
| 27252 |
ripley |
468 |
<p>Unless you do not want to view graphs on-screen you need <code>X11</code>
|
|
|
469 |
installed, including its headers and client libraries. (On RedHat Linux
|
|
|
470 |
this means the <code>XFree86-devel</code> and <code>XFree86-libs</code> RPMs, for
|
|
|
471 |
example.)
|
|
|
472 |
|
| 24001 |
hornik |
473 |
<p>You will need Perl version 5.004 or later, available via
|
| 14184 |
ripley |
474 |
<a href="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</a>, to build any of the on-line
|
| 24650 |
hornik |
475 |
documentation.
|
| 14184 |
ripley |
476 |
|
| 24001 |
hornik |
477 |
<p>You will not be able to build the info files unless you have
|
| 23859 |
hornik |
478 |
<code>makeinfo</code> version 4 or later installed.
|
| 14184 |
ripley |
479 |
|
| 24001 |
hornik |
480 |
<p>The typeset documentation needs <code>tex</code> and <code>latex</code>, or
|
| 14184 |
ripley |
481 |
<code>pdftex</code> and <code>pdflatex</code>.
|
|
|
482 |
|
| 14307 |
ripley |
483 |
<a name="Useful%20libraries%20and%20programs"></a>
|
| 14184 |
ripley |
484 |
|
| 24001 |
hornik |
485 |
<h3 class="section">A.2 Useful libraries and programs</h3>
|
| 14184 |
ripley |
486 |
|
| 26591 |
hornik |
487 |
<p>The command-line editing depends on the <code>readline</code> library
|
| 14184 |
ripley |
488 |
available from any GNU mirror: you will need a fairly recent version.
|
|
|
489 |
|
| 24001 |
hornik |
490 |
<p>The bitmapped graphics devices <code>jpeg()</code> and <code>png()</code> need the
|
| 23859 |
hornik |
491 |
appropriate headers and libraries installed: <code>jpeg</code> (version 6b
|
|
|
492 |
or later) or <code>libpng</code> (version 1.2.3 or later) and <code>zlib</code>
|
|
|
493 |
(version 1.1.3 or later) respectively.
|
| 14184 |
ripley |
494 |
|
| 24001 |
hornik |
495 |
<p>The <code>bitmap</code> and <code>dev2bitmap</code> devices make use of ghostscript
|
| 14184 |
ripley |
496 |
(<a href="http://www.cs.wisc.edu/~ghost">http://www.cs.wisc.edu/~ghost</a>).
|
|
|
497 |
|
| 26882 |
ripley |
498 |
<p>If you have them installed (including the appropriate headers and of
|
|
|
499 |
late enough versions), <code>zlib</code>, <code>libbz2</code> and PCRE will be used
|
|
|
500 |
if specified by <code>--with-zlib</code>, <code>--with-bzlib</code> or
|
|
|
501 |
<code>--with-pcre</code>: otherwise versions in the R sources will be
|
|
|
502 |
compiled in. As the latter suffice and are tested with R you should
|
|
|
503 |
not need to change this.
|
| 18664 |
ripley |
504 |
|
| 14185 |
ripley |
505 |
<a name="Tcl%2fTk"></a>
|
| 14184 |
ripley |
506 |
|
| 26591 |
hornik |
507 |
<h3 class="subsection">A.2.1 Tcl/Tk</h4>
|
| 14184 |
ripley |
508 |
|
| 26591 |
hornik |
509 |
<p>The <strong>tcltk</strong> package needs Tcl/Tk installed: the sources are
|
| 21609 |
ripley |
510 |
available at <a href="http://www.scriptics.com/">http://www.scriptics.com/</a>. To specify the locations
|
| 14307 |
ripley |
511 |
of the Tcl/Tk files you may need the configuration options
|
|
|
512 |
|
| 24001 |
hornik |
513 |
<dl>
|
| 14184 |
ripley |
514 |
<dt><code>--with-tcltk</code>
|
| 24001 |
hornik |
515 |
<dd>use Tcl/Tk, or specify its library directory
|
|
|
516 |
<br><dt><code>--with-tcl-config=</code><var>TCL_CONFIG</var><code></code>
|
|
|
517 |
<dd>specify location of <code>tclConfig.sh</code>
|
|
|
518 |
<br><dt><code>--with-tk-config=</code><var>TK_CONFIG</var><code></code>
|
|
|
519 |
<dd>specify location of <code>tkConfig.sh</code>
|
| 14184 |
ripley |
520 |
</dl>
|
|
|
521 |
|
| 18887 |
hornik |
522 |
<p>or use the configure variables <code>TCLTK_LIBS</code> and
|
|
|
523 |
<code>TCLTK_CPPFLAGS</code> to specify the flags needed for linking against
|
|
|
524 |
the Tcl and Tk libraries and for finding the <code>tcl.h</code> and
|
|
|
525 |
<code>tk.h</code> headers, respectively.
|
|
|
526 |
|
| 27252 |
ripley |
527 |
<p>Versions of Tcl/TK from 8.3 to 8.4.4 have been used successfully: 8.0 is
|
|
|
528 |
no longer supported.
|
| 21609 |
ripley |
529 |
|
| 14307 |
ripley |
530 |
<a name="Linear%20algebra"></a>
|
| 14184 |
ripley |
531 |
|
| 26591 |
hornik |
532 |
<h3 class="subsection">A.2.2 Linear algebra</h4>
|
| 14184 |
ripley |
533 |
|
| 26591 |
hornik |
534 |
<p>The linear algebra routines in R can make use of enhanced BLAS (Basic
|
| 22181 |
ripley |
535 |
Linear Algebra Subprograms, <a href="http://www.netlib.org/blas/faq.html">http://www.netlib.org/blas/faq.html</a>)
|
|
|
536 |
routines. Some are compiler-system-specific (<code>libsunperf</code> on Sun
|
| 24001 |
hornik |
537 |
Sparc<a rel="footnote" href="#fn-2"><sup>2</sup></a>, <code>libessl</code> on IBM, <code>vecLib</code> on MacOS
|
| 23148 |
ripley |
538 |
X) but ATLAS (<a href="http://math-atlas.sourceforge.net/">http://math-atlas.sourceforge.net/</a>) is a "tuned"
|
|
|
539 |
BLAS that runs on a wide range of Unix-alike platforms. If no more
|
|
|
540 |
specific library is found, a <code>libblas</code> library in the library path
|
|
|
541 |
will be used. You can specify a specific BLAS library by the
|
|
|
542 |
configuration option <code>--with-blas</code> and not to use an external
|
|
|
543 |
BLAS library by <code>--without-blas</code>.
|
| 14184 |
ripley |
544 |
|
| 27252 |
ripley |
545 |
<p>For systems with multiple processors it is possible to use a
|
|
|
546 |
multi-threaded version of ATLAS. (Prior to R 1.8.0 this was not
|
| 25780 |
hornik |
547 |
supported since <code>SIGINT</code> signals sent to the process and handled by
|
| 27252 |
ripley |
548 |
the wrong thread could result in segfaults.) A remaining issue is that
|
|
|
549 |
R profiling, which uses the <code>SIGPROF</code> signal, may cause
|
|
|
550 |
problems. You may want to disable profiling if you use a multi-threaded
|
|
|
551 |
version of ATLAS. You can use a multi-threaded ATLAS by specifying
|
| 24001 |
hornik |
552 |
<pre class="smallexample"> --with-blas="-lptf77blas -lpthread -latlas"
|
|
|
553 |
</pre>
|
| 19031 |
hornik |
554 |
|
| 27343 |
hornik |
555 |
<p>Another tuned BLAS which is available for some processors under Linux is
|
|
|
556 |
by Kazushige Goto, currently available at
|
|
|
557 |
<a href="http://www.cs.utexas.edu/users/flame/goto/">http://www.cs.utexas.edu/users/flame/goto/</a>. Once this is is
|
|
|
558 |
installed, it can be used by one of
|
|
|
559 |
<pre class="smallexample"> --with-blas=goto
|
|
|
560 |
--with-blas=-lgoto
|
|
|
561 |
</pre>
|
|
|
562 |
Multi-threaded versions of Goto's BLAS are available, so please note the
|
|
|
563 |
<em>caveat</em> in the previous paragraph.
|
|
|
564 |
|
| 27441 |
ripley |
565 |
<p>For Intel processors under Linux, Intel's Math Kernel Library
|
|
|
566 |
<a href="http://www.intel.com/software/products/mkl/">http://www.intel.com/software/products/mkl/</a>
|
|
|
567 |
can be used by
|
|
|
568 |
<pre class="smallexample"> --with-blas="-lmkl -lguide -lpthread"
|
|
|
569 |
</pre>
|
|
|
570 |
with the same caveat on multi-threading. (Thanks to Andy Liaw for the
|
|
|
571 |
information.)
|
|
|
572 |
|
| 24001 |
hornik |
573 |
<p>Note that the BLAS library will be used for several add-on packages as
|
| 14307 |
ripley |
574 |
well as for R itself. This means that it is better to use a shared
|
|
|
575 |
BLAS library, as most of a static library will be compiled into the R
|
| 22142 |
ripley |
576 |
executable and each BLAS-using package. In any case, the BLAS library
|
| 27252 |
ripley |
577 |
must be usable with dynamically-loadable code: this can be a problem
|
|
|
578 |
with ATLAS that is not by default built with position-independent code.
|
| 14184 |
ripley |
579 |
|
| 24001 |
hornik |
580 |
<p>You will need double-precision and double-complex versions of the BLAS,
|
| 14215 |
ripley |
581 |
but not single-precision nor complex routines.
|
|
|
582 |
|
| 27252 |
ripley |
583 |
<p>Provision is made for using an external LAPACK library, principally to
|
|
|
584 |
cope with BLAS libraries which contain a copy of LAPACK (such as
|
| 28261 |
murdoch |
585 |
<code>libsunperf</code> on Solaris and <code>vecLib</code> on MacOS 10.2.2).
|
| 27252 |
ripley |
586 |
However, the likely performance gains are thought to be small (and may
|
|
|
587 |
be negative), and the default is not to search for a suitable LAPACK
|
|
|
588 |
library. You can specify a specific LAPACK library or a search for a
|
|
|
589 |
generic library by the configuration option <code>--with-lapack</code>. The
|
|
|
590 |
default for <code>--with-lapack</code> is to check the BLAS library and then
|
|
|
591 |
look for an external library <code>-llapack</code>. Sites searching for the
|
|
|
592 |
fastest possible linear algebra may want to build a LAPACK library using
|
|
|
593 |
the ATLAS-optimized subset of LAPACK. To do so specify something like
|
| 24001 |
hornik |
594 |
<pre class="smallexample"> --with-lapack="-L/path/to/libs -llapack -lcblas"
|
|
|
595 |
</pre>
|
| 14215 |
ripley |
596 |
|
| 23273 |
hornik |
597 |
<p>since the ATLAS subset of LAPACK depends on <code>libcblas</code>.
|
|
|
598 |
|
| 24001 |
hornik |
599 |
<p>If you do use <code>--with-lapack</code>, be aware of potential problems
|
| 22570 |
ripley |
600 |
with bugs in the LAPACK 3.0 sources (or in the posted corrections to those
|
|
|
601 |
sources). In particular, bugs in <code>DGEEV</code> and <code>DGESDD</code> have
|
|
|
602 |
resulted in error messages such as
|
| 24001 |
hornik |
603 |
<pre class="smallexample"> DGEBRD gave error code -10
|
|
|
604 |
</pre>
|
| 22570 |
ripley |
605 |
|
| 23148 |
ripley |
606 |
<p>(from the Debian <code>-llapack</code> which was current in late 2002). Other
|
|
|
607 |
potential problems are incomplete versions of the libraries: for example
|
|
|
608 |
<code>libsunperf</code> from Sun Forte 6.x was missing the entry point for
|
|
|
609 |
<code>DLANGE</code> and <code>vecLib</code> has omitted the BLAS routine
|
|
|
610 |
<code>LSAME</code>.
|
| 22570 |
ripley |
611 |
|
| 24001 |
hornik |
612 |
<p>As with all libraries, you need to ensure that they and R were
|
| 14754 |
ripley |
613 |
compiled with compatible compilers and flags. For example, this means
|
| 17472 |
ripley |
614 |
that on Sun Sparc using the native compilers the flag <code>-dalign</code>
|
|
|
615 |
is needed so <code>libsunperf</code> can be used.
|
| 14754 |
ripley |
616 |
|
| 24001 |
hornik |
617 |
<p>An ATLAS `tuned' BLAS can also be used on Windows: see
|
| 20580 |
hornik |
618 |
<code>src/gnuwin32/INSTALL</code> for how to enable this when building from
|
| 28261 |
murdoch |
619 |
source, and <a href="http://www.stats.ox.ac.uk/pub/R/rw-FAQ.html">R Windows <small>FAQ</small></a> for adding pre-compiled support to binary versions.
|
| 27916 |
hornik |
620 |
Goto's BLAS can also be used when building from source.
|
| 15508 |
pd |
621 |
|
| 24001 |
hornik |
622 |
<p>Note that under Unix (but not under Windows) if R is compiled
|
| 28261 |
murdoch |
623 |
against a non-default BLAS, then all BLAS-using packages must also be.
|
| 19393 |
hornik |
624 |
So if R is re-built after ATLAS is installed, then packages such as
|
|
|
625 |
<strong>quantreg</strong> will need to be re-installed.
|
| 17472 |
ripley |
626 |
|
| 14185 |
ripley |
627 |
<a name="Configuration%20on%20Unix"></a>
|
| 14184 |
ripley |
628 |
|
| 24001 |
hornik |
629 |
<h2 class="appendix">Appendix B Configuration on Unix</h2>
|
| 14184 |
ripley |
630 |
|
| 14185 |
ripley |
631 |
<a name="Configuration%20options"></a>
|
| 14184 |
ripley |
632 |
|
| 24001 |
hornik |
633 |
<h3 class="section">B.1 Configuration options</h3>
|
| 14184 |
ripley |
634 |
|
| 26591 |
hornik |
635 |
<p><code>configure</code> has many options: running
|
| 14307 |
ripley |
636 |
|
| 24001 |
hornik |
637 |
<pre class="smallexample"> ./configure --help
|
|
|
638 |
</pre>
|
| 14184 |
ripley |
639 |
|
| 14307 |
ripley |
640 |
<p>will give a list. Probably the most important ones not covered
|
|
|
641 |
elsewhere are (defaults in brackets)
|
|
|
642 |
|
| 24001 |
hornik |
643 |
<dl>
|
| 14307 |
ripley |
644 |
<dt><code>--with-x</code>
|
| 24001 |
hornik |
645 |
<dd>use the X Window System
|
|
|
646 |
<br><dt><code>--x-includes=</code><var>DIR</var><code></code>
|
|
|
647 |
<dd>X include files are in <var>DIR</var>
|
|
|
648 |
<br><dt><code>--x-libraries=</code><var>DIR</var><code></code>
|
|
|
649 |
<dd>X library files are in <var>DIR</var>
|
| 14307 |
ripley |
650 |
<br><dt><code>--with-readline</code>
|
| 24001 |
hornik |
651 |
<dd>use readline library (if available) [yes]
|
| 14307 |
ripley |
652 |
<br><dt><code>--enable-R-profiling</code>
|
| 24001 |
hornik |
653 |
<dd>attempt to compile support for <code>Rprof()</code> [yes]
|
| 14307 |
ripley |
654 |
<br><dt><code>--enable-R-shlib</code>
|
| 24001 |
hornik |
655 |
<dd>build R as a shared library [no]
|
| 14307 |
ripley |
656 |
</dl>
|
|
|
657 |
|
|
|
658 |
<p>You can use <code>--without-foo</code> or <code>--disable-foo</code> for the
|
| 14184 |
ripley |
659 |
negatives.
|
|
|
660 |
|
| 24001 |
hornik |
661 |
<p>You will want to use <code>--disable-R-profiling</code> if you are building
|
| 14307 |
ripley |
662 |
a profiled executable of R (e.g. with <code>-pg)</code>.
|
| 14184 |
ripley |
663 |
|
| 24001 |
hornik |
664 |
<p>Flag <code>--enable-R-shlib</code> causes the make process to build R as a
|
| 14698 |
hornik |
665 |
shared library, typically called <code>libR.so</code>, and to take
|
|
|
666 |
considerably longer, so you probably only want this if you will be using
|
|
|
667 |
an application which embeds R.
|
| 14184 |
ripley |
668 |
|
| 14185 |
ripley |
669 |
<a name="Configuration%20variables"></a>
|
| 14184 |
ripley |
670 |
|
| 24001 |
hornik |
671 |
<h3 class="section">B.2 Configuration variables</h3>
|
| 14184 |
ripley |
672 |
|
| 26591 |
hornik |
673 |
<p>If you need or want to set certain configure variables to something
|
| 14184 |
ripley |
674 |
other than their default, you can do that by either editing the file
|
| 14307 |
ripley |
675 |
<code>config.site</code> (which documents all the variables you might want to
|
|
|
676 |
set) or on the command line as
|
| 14184 |
ripley |
677 |
|
| 24001 |
hornik |
678 |
<pre class="smallexample"> ./configure VAR=<var>value</var>
|
|
|
679 |
</pre>
|
| 14184 |
ripley |
680 |
|
| 18887 |
hornik |
681 |
<p>These variables are <em>precious</em>, implying that they do not have to
|
|
|
682 |
be exported to the environment, are kept in the cache even if not
|
|
|
683 |
specified on the command line and checked for consistency between two
|
|
|
684 |
configure runs (provided that caching is used), and are kept during
|
|
|
685 |
automatic reconfiguration as if having been passed as command line
|
|
|
686 |
arguments, even if no cache is used.
|
|
|
687 |
|
| 24001 |
hornik |
688 |
<p>See the variable output section of <code>configure --help</code> for a list of
|
| 18887 |
hornik |
689 |
all these variables.
|
|
|
690 |
|
| 24001 |
hornik |
691 |
<p>One common variable to change is <code>R_PAPERSIZE</code>, which defaults to
|
| 19611 |
ripley |
692 |
<code>a4</code>, not <code>letter</code>. (Valid values are <code>a4</code>,
|
|
|
693 |
<code>letter</code>, <code>legal</code> and <code>executive</code>.)
|
| 14184 |
ripley |
694 |
|
| 24001 |
hornik |
695 |
<p>If you have libraries and header files, e.g., for GNU readline, in
|
| 18887 |
hornik |
696 |
non-system directories, use the variables <code>LDFLAGS</code> (for libraries,
|
|
|
697 |
using <code>-L</code> flags to be passed to the linker) and <code>CPPFLAGS</code>
|
|
|
698 |
(for header files, using <code>-I</code> flags to be passed to the C/C++
|
|
|
699 |
preprocessors), respectively, to specify these locations. These default
|
|
|
700 |
to <code>/usr/local/lib</code> and <code>/usr/local/include</code> to catch the most
|
|
|
701 |
common cases. If libraries are still not found, then maybe your
|
|
|
702 |
compiler/linker does not support re-ordering of <code>-L</code> and
|
|
|
703 |
<code>-l</code> flags (this has been reported to be a problem on HP-UX with
|
|
|
704 |
the native <code>cc</code>). In this case, use a different compiler (or a
|
|
|
705 |
front end shell script which does the re-ordering).
|
| 14184 |
ripley |
706 |
|
| 24001 |
hornik |
707 |
<p>Another precious variable is <code>R_BROWSER</code>, the default browser, which
|
| 22313 |
ripley |
708 |
should take a value of an executable in the user's path or specify
|
|
|
709 |
a full path.
|
|
|
710 |
|
| 24001 |
hornik |
711 |
<p>If you find you need to alter configure variables, it is worth noting
|
| 18887 |
hornik |
712 |
that some settings may be cached in the file <code>config.cache</code>, and it
|
| 28261 |
murdoch |
713 |
is a good idea to remove that file (if it exists) before re-configuring.
|
| 18887 |
hornik |
714 |
Note that caching is turned <em>off</em> by default; use the command line
|
|
|
715 |
option <code>--config-cache</code> (or <code>-C</code>) to enable caching.
|
| 14184 |
ripley |
716 |
|
| 14185 |
ripley |
717 |
<a name="Using%20make"></a>
|
| 14184 |
ripley |
718 |
|
| 24001 |
hornik |
719 |
<h3 class="section">B.3 Using make</h3>
|
| 14184 |
ripley |
720 |
|
| 26591 |
hornik |
721 |
<p>To compile R, you will most likely find it easiest to use GNU
|
| 14184 |
ripley |
722 |
<code>make</code>. On Solaris 2.6/7/8 in particular, you need a version of
|
| 21609 |
ripley |
723 |
GNU <code>make</code> different from 3.77; 3.79.1 works fine, as does the Sun
|
| 17302 |
ripley |
724 |
<code>make</code>. The native <code>make</code> is reported to fail on SGI
|
| 20580 |
hornik |
725 |
Irix 6.5 and Alpha/OSF1 (aka Tru64).
|
| 14184 |
ripley |
726 |
|
| 24001 |
hornik |
727 |
<p>To build in a separate directory you need a <code>make</code> that uses the
|
| 14307 |
ripley |
728 |
<code>VPATH</code> variable, for example GNU <code>make</code>, or Sun
|
|
|
729 |
<code>make</code> on Solaris 2.7/8 (but not earlier).
|
| 14184 |
ripley |
730 |
|
| 24001 |
hornik |
731 |
<p>If you want to use a <code>make</code> by another name, for example if your
|
| 18887 |
hornik |
732 |
GNU <code>make</code> is called <code>gmake</code>, you need to set the variable
|
|
|
733 |
<code>MAKE</code> at configure time, for example
|
| 14307 |
ripley |
734 |
|
| 24001 |
hornik |
735 |
<pre class="smallexample"> ./configure MAKE=gmake
|
|
|
736 |
</pre>
|
| 14184 |
ripley |
737 |
|
| 14307 |
ripley |
738 |
<a name="Using%20FORTRAN"></a>
|
| 14184 |
ripley |
739 |
|
| 24001 |
hornik |
740 |
<h3 class="section">B.4 Using FORTRAN</h3>
|
| 14184 |
ripley |
741 |
|
| 26591 |
hornik |
742 |
<p>To compile R, you need a FORTRAN compiler or <code>f2c</code>, the
|
| 14307 |
ripley |
743 |
FORTRAN-to-C converter (<a href="http://www.netlib.org/f2c">http://www.netlib.org/f2c</a>). The default
|
|
|
744 |
is to search for <code>g77</code>, <code>f77</code>, <code>xlf</code>,
|
| 21630 |
hornik |
745 |
<code>frt</code>, <code>pgf77</code>, <code>fl32</code>, <code>af77</code>,
|
|
|
746 |
<code>fort77</code>, <code>f90</code>, <code>xlf90</code>, <code>pgf90</code>,
|
|
|
747 |
<code>epcf90</code>, <code>f95</code>, <code>fort</code>, <code>xlf95</code>,
|
|
|
748 |
<code>lf95</code>, <code>g95</code>, and <code>fc</code> (in that
|
| 24001 |
hornik |
749 |
order)<a rel="footnote" href="#fn-3"><sup>3</sup></a>, and
|
| 14307 |
ripley |
750 |
then for <code>f2c</code>, and use whichever is found first; if none is
|
|
|
751 |
found, R cannot be compiled. The search mechanism can be changed
|
| 19221 |
hornik |
752 |
using the configure variables <code>F77</code> and <code>F2C</code> which specify
|
|
|
753 |
the commands that run the FORTRAN 77 compiler and FORTRAN-to-C
|
|
|
754 |
converter, respectively. If <code>F77</code> is given, it is used to compile
|
|
|
755 |
FORTRAN; otherwise, if <code>F2C</code> is given, f2c is used even if a
|
|
|
756 |
FORTRAN compiler would be be available. If your FORTRAN compiler is in
|
|
|
757 |
a non-standard location, you should set the environment variable
|
| 18887 |
hornik |
758 |
<code>PATH</code> accordingly before running <code>configure</code>, or use the
|
|
|
759 |
configure variable <code>F77</code> to specify its full path.
|
| 14184 |
ripley |
760 |
|
| 24001 |
hornik |
761 |
<p>If your FORTRAN libraries are in slightly peculiar places, you should
|
| 14698 |
hornik |
762 |
also look at <code>LD_LIBRARY_PATH</code> or your system's equivalent to make
|
|
|
763 |
sure that all libraries are on this path.
|
| 14184 |
ripley |
764 |
|
| 24001 |
hornik |
765 |
<p>You must set whatever compilation flags (if any) are needed to ensure
|
| 14307 |
ripley |
766 |
that FORTRAN <code>integer</code> is equivalent to a C <code>int</code> pointer and
|
|
|
767 |
FORTRAN <code>double precision</code> is equivalent to a C <code>double</code>
|
| 14184 |
ripley |
768 |
pointer. This is checked during the configuration process.
|
|
|
769 |
|
| 24001 |
hornik |
770 |
<p>Some of the FORTRAN code makes use of <code>COMPLEX*16</code> variables, which
|
| 14307 |
ripley |
771 |
is a FORTRAN 90 extension. This is checked for at configure
|
| 24001 |
hornik |
772 |
time<a rel="footnote" href="#fn-4"><sup>4</sup></a>, but you may need to avoid
|
|
|
773 |
compiler flags<a rel="footnote" href="#fn-5"><sup>5</sup></a> asserting
|
| 14307 |
ripley |
774 |
FORTRAN 77 compliance.
|
| 14215 |
ripley |
775 |
|
| 24001 |
hornik |
776 |
<p>For performance reasons<a rel="footnote" href="#fn-6"><sup>6</sup></a> you may want to choose a FORTRAN 90/95 compiler.
|
| 14215 |
ripley |
777 |
|
| 24001 |
hornik |
778 |
<p>If you use <code>f2c</code> you may need to ensure that the FORTRAN type
|
| 17302 |
ripley |
779 |
<code>integer</code> is translated to the C type <code>int</code>. Normally
|
| 18887 |
hornik |
780 |
<code>f2c.h</code> contains <code>typedef long int integer;</code>, which will work
|
|
|
781 |
on a 32-bit platform but not on a 64-bit platform.
|
| 17302 |
ripley |
782 |
|
| 14307 |
ripley |
783 |
<a name="Compile%20and%20load%20flags"></a>
|
| 14184 |
ripley |
784 |
|
| 24001 |
hornik |
785 |
<h3 class="section">B.5 Compile and load flags</h3>
|
| 14184 |
ripley |
786 |
|
| 26591 |
hornik |
787 |
<p>A wide range of flags can be set in the file <code>config.site</code> or as
|
| 18887 |
hornik |
788 |
configure variables on the command line. We have already mentioned
|
| 14307 |
ripley |
789 |
|
| 24001 |
hornik |
790 |
<dl>
|
| 14184 |
ripley |
791 |
<dt><code>CPPFLAGS</code>
|
| 24001 |
hornik |
792 |
<dd>header file search directory (<code>-I</code>) and any other miscellaneous
|
| 18887 |
hornik |
793 |
options for the C and C++ preprocessors and compilers
|
|
|
794 |
<br><dt><code>LDFLAGS</code>
|
| 24001 |
hornik |
795 |
<dd>path (<code>-L</code>), stripping (<code>-s</code>) and any other miscellaneous
|
| 18887 |
hornik |
796 |
options for the linker
|
| 14184 |
ripley |
797 |
</dl>
|
|
|
798 |
|
|
|
799 |
<p>and others include
|
| 14307 |
ripley |
800 |
|
| 24001 |
hornik |
801 |
<dl>
|
| 14184 |
ripley |
802 |
<dt><code>CFLAGS</code>
|
| 24001 |
hornik |
803 |
<dd>debugging and optimization flags, C
|
| 14184 |
ripley |
804 |
<br><dt><code>MAIN_CFLAGS</code>
|
| 24001 |
hornik |
805 |
<dd>ditto, for compiling the main program
|
| 14184 |
ripley |
806 |
<br><dt><code>SHLIB_CFLAGS</code>
|
| 24001 |
hornik |
807 |
<dd>for shared libraries
|
| 14184 |
ripley |
808 |
<br><dt><code>FFLAGS</code>
|
| 24001 |
hornik |
809 |
<dd>debugging and optimization flags, FORTRAN
|
| 14184 |
ripley |
810 |
<br><dt><code>MAIN_FFLAGS</code>
|
| 24001 |
hornik |
811 |
<dd>ditto, for compiling the main program
|
| 14184 |
ripley |
812 |
<br><dt><code>SHLIB_FFLAGS</code>
|
| 24001 |
hornik |
813 |
<dd>for shared libraries
|
| 14184 |
ripley |
814 |
<br><dt><code>MAIN_LDFLAGS</code>
|
| 24001 |
hornik |
815 |
<dd>additional flags for the main link
|
| 14184 |
ripley |
816 |
<br><dt><code>SHLIB_LDFLAGS</code>
|
| 24001 |
hornik |
817 |
<dd>additional flags for linking the shared libraries
|
| 14184 |
ripley |
818 |
</dl>
|
|
|
819 |
|
| 18887 |
hornik |
820 |
<p>Library paths specified as <code>-L/lib/path</code> in <code>LDFLAGS</code> are
|
| 14698 |
hornik |
821 |
collected together and prepended to <code>LD_LIBRARY_PATH</code> (or your
|
|
|
822 |
system's equivalent), so there should be no need for <code>-R</code> or
|
|
|
823 |
<code>-rpath</code> flags.
|
| 14184 |
ripley |
824 |
|
| 24001 |
hornik |
825 |
<p>To compile a profiling version of R, one might for example want to
|
| 14184 |
ripley |
826 |
use <code>MAIN_CFLAGS=-pg</code>, <code>MAIN_FFLAGS=-pg</code>,
|
|
|
827 |
<code>MAIN_LDFLAGS=-pg</code> on platforms where <code>-pg</code> cannot be used
|
|
|
828 |
with position-independent code.
|
|
|
829 |
|
| 24001 |
hornik |
830 |
<p><strong>Beware:</strong> it may be necessary to set <code>CFLAGS</code> and
|
| 14754 |
ripley |
831 |
<code>FFLAGS</code> in ways compatible with the libraries to be used: one
|
|
|
832 |
possible issue is the alignment of doubles, another is the way
|
|
|
833 |
structures are passed.
|
|
|
834 |
|
| 14307 |
ripley |
835 |
<a name="Building%20the%20GNOME%20interface"></a>
|
| 14184 |
ripley |
836 |
|
| 24001 |
hornik |
837 |
<h3 class="section">B.6 Building the <small>GNOME</small> interface</h3>
|
| 14184 |
ripley |
838 |
|
| 26591 |
hornik |
839 |
<p>This interface is experimental and incomplete. It provides a console
|
| 17276 |
pd |
840 |
and two graphics devices named <code>gtk()</code> and <code>gnome()</code>. The
|
|
|
841 |
console offers a basic command line editing and history mechanism, along
|
|
|
842 |
with tool and button bars that give a point-and-click interface to some
|
|
|
843 |
R commands. Many of the features of the console are currently
|
|
|
844 |
stubs. The <code>gtk()</code> graphics device is a port of the <code>x11()</code>
|
|
|
845 |
device to <small>GDK</small> (the GIMP Drawing Kit). The <code>gnome()</code>
|
|
|
846 |
device uses the <small>GNOME</small> canvas.
|
| 14184 |
ripley |
847 |
|
| 24001 |
hornik |
848 |
<p>Due to its experimental nature, the <small>GNOME</small> interface for R
|
| 17276 |
pd |
849 |
will not be built automatically. You must specify it by running
|
|
|
850 |
configure with the <code>--with-gnome</code> option. For example, you might
|
|
|
851 |
run
|
| 14307 |
ripley |
852 |
|
| 24001 |
hornik |
853 |
<pre class="smallexample"> ./configure --with-gnome
|
|
|
854 |
</pre>
|
| 14184 |
ripley |
855 |
|
| 21609 |
ripley |
856 |
<p>but please check you have all the requirements first. You need at least
|
|
|
857 |
the following libraries (or later) installed
|
| 14307 |
ripley |
858 |
|
| 24001 |
hornik |
859 |
<pre class="smallexample"> audiofile-0.2.1
|
|
|
860 |
esound-0.2.23
|
|
|
861 |
glib-1.2.10
|
|
|
862 |
gtk+-1.2.10
|
|
|
863 |
imlib-1.9.10
|
|
|
864 |
ORBit-0.5.12
|
|
|
865 |
gnome-libs-1.4.1.2
|
|
|
866 |
libxml-1.8.16
|
|
|
867 |
libglade-0.17
|
|
|
868 |
</pre>
|
| 14184 |
ripley |
869 |
|
| 17276 |
pd |
870 |
<p>It is preferable to have a complete installation of the <small>GNOME</small>
|
|
|
871 |
desktop environment. If you use Linux, then this should be provided
|
|
|
872 |
with your distribution. In addition, packaged binary distributions of
|
|
|
873 |
GNOME are available from <a href="http://www.ximian.com">http://www.ximian.com</a> for the most
|
|
|
874 |
popular Linux distributions and for Solaris.
|
| 14307 |
ripley |
875 |
|
| 24001 |
hornik |
876 |
<p>Remember that some package management systems (such as <small>RPM</small> and
|
| 17276 |
pd |
877 |
deb) make a distinction between the user version of a package and the
|
| 18887 |
hornik |
878 |
developer version. The latter usually has the same name but with the
|
|
|
879 |
extension <code>-devel</code>. If you use a pre-packaged version of
|
|
|
880 |
<small>GNOME</small> then you must have the developer versions of the above
|
|
|
881 |
packages in order to compile the R-GNOME interface.
|
| 14184 |
ripley |
882 |
|
| 24001 |
hornik |
883 |
<p>The full list of <small>GNOME</small> options to configure is
|
| 14184 |
ripley |
884 |
|
| 24001 |
hornik |
885 |
<dl>
|
| 14184 |
ripley |
886 |
<dt><code>--with-gnome</code>
|
| 24001 |
hornik |
887 |
<dd>use <small>GNOME</small>, or specify its prefix [no]
|
|
|
888 |
<br><dt><code>--with-gnome-includes=</code><var>DIR</var><code></code>
|
|
|
889 |
<dd>specify location of <small>GNOME</small> headers
|
|
|
890 |
<br><dt><code>--with-gnome-libs=</code><var>DIR</var><code></code>
|
|
|
891 |
<dd>specify location of <small>GNOME</small> libs
|
|
|
892 |
<br><dt><code>--with-libglade-config=</code><var>LIBGLADE_CONFIG</var><code></code>
|
|
|
893 |
<dd>specify location of <code>libglade-config</code>
|
| 14184 |
ripley |
894 |
</dl>
|
|
|
895 |
|
| 17472 |
ripley |
896 |
<a name="Platform%20notes"></a>
|
|
|
897 |
|
| 24001 |
hornik |
898 |
<h3 class="section">B.7 Platform notes</h3>
|
| 17472 |
ripley |
899 |
|
| 26591 |
hornik |
900 |
<p>This section provides some notes on building R on different Unix-like
|
| 18887 |
hornik |
901 |
platforms. These notes are based on tests run on one or two systems in
|
| 28261 |
murdoch |
902 |
each case with particular sets of compilers and support libraries.
|
| 17472 |
ripley |
903 |
Success in building R depends on the proper installation and functioning
|
|
|
904 |
of support software; your results may differ if you have other versions
|
|
|
905 |
of compilers and support libraries.
|
|
|
906 |
|
| 27252 |
ripley |
907 |
<a name="Linux"></a>
|
|
|
908 |
|
|
|
909 |
<h3 class="subsection">B.7.1 Linux</h4>
|
|
|
910 |
|
|
|
911 |
<p>Linux is the main development platform for R, so compilation from the
|
|
|
912 |
sources is normally straightforward.
|
|
|
913 |
|
|
|
914 |
<p>Remember that some package management systems (such as <small>RPM</small> and
|
|
|
915 |
deb) make a distinction between the user version of a package and the
|
|
|
916 |
developer version. The latter usually has the same name but with the
|
|
|
917 |
extension <code>-devel</code> or <code>-dev</code>: you need both versions
|
|
|
918 |
installed. So please check the <code>configure</code> output to see if the
|
|
|
919 |
expected features are detected: if for example <code>readline</code> is
|
|
|
920 |
missing add the package containing its headers.
|
|
|
921 |
|
|
|
922 |
<p>When R has been installed from a binary distribution there are
|
|
|
923 |
sometimes problems with missing components such as the Fortran
|
|
|
924 |
compiler. Searching the <code>R-help</code> archives will normally reveal
|
|
|
925 |
what is needed.
|
|
|
926 |
|
|
|
927 |
<p>It seems that the <code>gcc</code> compilers normally produce PIC code on
|
|
|
928 |
<code>ix86</code> Linux but do not necessarily do so on 64-bit versions such
|
|
|
929 |
as that for AMD Opteron. So care can be needed with BLAS libraries and
|
|
|
930 |
when building R as a shared library to ensure that
|
|
|
931 |
position-independent code is used in any static libraries (such as the
|
|
|
932 |
Tcl/Tk libraries, <code>libpng</code>, <code>libjpeg</code> and <code>zlib</code>) which
|
|
|
933 |
might be linked against. Fortunately these are normally built as shared
|
|
|
934 |
libraries with the exception of the ATLAS BLAS libraries.
|
|
|
935 |
|
| 17472 |
ripley |
936 |
<a name="MacOS%20X"></a>
|
|
|
937 |
|
| 27252 |
ripley |
938 |
<h3 class="subsection">B.7.2 MacOS X</h4>
|
| 17472 |
ripley |
939 |
|
| 26591 |
hornik |
940 |
<p>You can build R as a Unix application on MacOS X. You will need the
|
| 17472 |
ripley |
941 |
DevTools, <code>f2c</code> or <code>g77</code>, and the <code>dlcompat</code>
|
|
|
942 |
library. You will also need to install an X sub-system or configure
|
|
|
943 |
with <code>--without-x</code>.
|
|
|
944 |
|
| 24001 |
hornik |
945 |
<p><code>f2c</code>, <code>g77</code>, the <code>dlcompat</code> library, and X server
|
| 17472 |
ripley |
946 |
and support libraries are available from the Fink project
|
|
|
947 |
(<a href="http://fink.sourceforge.net">http://fink.sourceforge.net</a>). At the time of writing
|
|
|
948 |
<code>f2c</code> and <code>g77</code> were not available as part of the Fink
|
|
|
949 |
binary distribution and needed to be installed directly; for example for
|
|
|
950 |
<code>g77</code> use
|
| 18887 |
hornik |
951 |
|
| 24001 |
hornik |
952 |
<pre class="smallexample"> fink install g77
|
|
|
953 |
</pre>
|
| 17472 |
ripley |
954 |
|
| 24001 |
hornik |
955 |
<p>The <code>vecLib</code> library of MacOS >= 10.2.2 can be used <em>via</em> the
|
| 22570 |
ripley |
956 |
configuration options
|
| 24001 |
hornik |
957 |
<pre class="smallexample"> --with-blas="-framework vecLib" --with-lapack
|
|
|
958 |
</pre>
|
| 22570 |
ripley |
959 |
|
| 28261 |
murdoch |
960 |
<p>to provide higher-performance versions of the BLAS and LAPACK routines.
|
| 24173 |
ripley |
961 |
With <code>gcc 3.1</code> that appears to be the only way to build R, as
|
|
|
962 |
the Fortran support routines in <code>libg2c</code> cannot be linked into a
|
|
|
963 |
dynmaic library. (We have had reports of success with pre-release
|
|
|
964 |
versions of <code>gcc 3.3</code>.)
|
| 22570 |
ripley |
965 |
|
| 17472 |
ripley |
966 |
<a name="Solaris"></a>
|
|
|
967 |
|
| 27252 |
ripley |
968 |
<h3 class="subsection">B.7.3 Solaris on Sparc</h4>
|
| 17472 |
ripley |
969 |
|
| 26591 |
hornik |
970 |
<p>R has been built successfully on Solaris 8 aka Solaris 2.8 aka SunOS
|
| 23148 |
ripley |
971 |
5.8 using <code>gcc</code>/<code>g77</code> and the SunPro WorkShop 6 (aka
|
|
|
972 |
Forte 6) compilers and the `Sun ONE Studio 7 Compiler Suite' (aka Forte
|
|
|
973 |
7), and less regularly on Solaris 2.5.1, 2.6, 2.7 and 9. GNU
|
| 24449 |
ripley |
974 |
<code>make</code> is needed prior to Solaris 2.7 for building other than in
|
|
|
975 |
the source tree, and perhaps even then.
|
| 17472 |
ripley |
976 |
|
| 24449 |
ripley |
977 |
<p>The Solaris versions of several of the tools needed to build R
|
|
|
978 |
(e.g. <code>make</code>, <code>ar</code> and <code>ld</code>) are in
|
|
|
979 |
<code>/usr/ccs/bin</code>, so if using those tools ensure this is in your
|
|
|
980 |
path.
|
|
|
981 |
|
| 24001 |
hornik |
982 |
<p><code>gcc</code> 3.2.1 and 3.2.2 generate incorrect code on 32-bit Solaris
|
| 27252 |
ripley |
983 |
builds with optimization, but versions 3.1, 3.2, 3.2.3 and 3.3.x work
|
| 24173 |
ripley |
984 |
correctly. At least files <code>src/main/engine.c</code>,
|
|
|
985 |
<code>src/main/graphics.c</code> and <code>src/modules/devX11.c</code> are affected.
|
| 22118 |
ripley |
986 |
|
| 24001 |
hornik |
987 |
<p>If using <code>gcc</code>, do ensure that the compiler was compiled for the
|
| 22570 |
ripley |
988 |
version of Solaris in use. (This can be ascertained from <code>gcc
|
| 19611 |
ripley |
989 |
-v</code>.) <code>gcc</code> makes modified versions of some header files, and
|
|
|
990 |
so (for example) <code>gcc</code> compiled under Solaris 2.6 will not
|
|
|
991 |
compile R under Solaris 2.7. Also, do ensure that it was compiled
|
|
|
992 |
for the assembler/loader in use. If you download <code>gcc</code> from
|
|
|
993 |
<a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a> then you need to download
|
|
|
994 |
<code>binutils</code> too. To avoid all these pitfalls we strongly
|
|
|
995 |
recommended you compile <code>gcc</code> from the sources yourself.
|
| 19393 |
hornik |
996 |
|
| 24001 |
hornik |
997 |
<p>When using the SunPro compilers do <em>not</em> specify <code>-fast</code>, as
|
| 17472 |
ripley |
998 |
this disables <small>IEEE</small> arithmetic and <code>make check</code> will
|
|
|
999 |
fail. The maximal set of optimization options known to work is
|
|
|
1000 |
|
| 24001 |
hornik |
1001 |
<pre class="smallexample"> -xlibmil -xO5 -dalign
|
|
|
1002 |
</pre>
|
| 17472 |
ripley |
1003 |
|
| 24001 |
hornik |
1004 |
<p>We have found little performance difference between <code>gcc</code> and
|
| 17472 |
ripley |
1005 |
<code>cc</code> but considerable benefit from using a SunPro Fortran
|
| 23148 |
ripley |
1006 |
compiler: the <code>gcc</code>/<code>f77</code> combination works well. For
|
|
|
1007 |
many C++ applications (e.g. package <strong>Matrix</strong>) Forte 7 requires
|
|
|
1008 |
<code>-lCstd</code>, which the configure script will add to
|
|
|
1009 |
<code>SHLIB_CXXLDFLAGS</code> if it identifies the compiler correctly.
|
| 17472 |
ripley |
1010 |
|
| 24001 |
hornik |
1011 |
<p>To compile for a 64-bit target on Solaris (which needs an UltraSparc
|
| 23148 |
ripley |
1012 |
chip and for support to be enabled in the OS) with the Forte 6 and 7
|
| 21058 |
ripley |
1013 |
compilers we used
|
| 18887 |
hornik |
1014 |
|
| 24001 |
hornik |
1015 |
<pre class="smallexample"> CC="cc -xarch=v9"
|
|
|
1016 |
CFLAGS="-xO5 -xlibmil -dalign"
|
|
|
1017 |
F77="f95 -xarch=v9"
|
|
|
1018 |
FFLAGS="-xO5 -xlibmil -dalign"
|
|
|
1019 |
CXX="CC -xarch=v9"
|
|
|
1020 |
CXXFLAGS="-xO5 -xlibmil -dalign"
|
|
|
1021 |
</pre>
|
| 17472 |
ripley |
1022 |
|
| 22181 |
ripley |
1023 |
<p>in <code>config.site</code>.
|
|
|
1024 |
|
| 27252 |
ripley |
1025 |
<p>For 64-bit compilation with <code>gcc</code> 3.2.x and 3.3.x we used
|
| 21058 |
ripley |
1026 |
|
| 24001 |
hornik |
1027 |
<pre class="smallexample"> CC="gcc -m64"
|
|
|
1028 |
FFLAGS="-m64 -g -O2"
|
|
|
1029 |
CXXFLAGS="-m64 -g -O2"
|
|
|
1030 |
LDFLAGS="-L/usr/local/lib/sparcv9 -L/usr/local/lib"
|
|
|
1031 |
</pre>
|
| 21058 |
ripley |
1032 |
|
| 27252 |
ripley |
1033 |
<p>Note that <code>/usr/local/lib/sparcv9</code> will need to be in the
|
|
|
1034 |
<code>LD_LIBRARY_PATH</code> during configuration.
|
| 22142 |
ripley |
1035 |
|
| 27252 |
ripley |
1036 |
<p>Note that using <code>f95</code> allows the Sun performance library
|
|
|
1037 |
<code>libsunperf</code> to be selected: it will not work with <code>f77</code>,
|
|
|
1038 |
nor with <code>g77</code>. <code>libsunperf</code> contains both BLAS and LAPACK
|
|
|
1039 |
code, and <code>--with-lapack</code> is recommended for 32-bit builds using
|
|
|
1040 |
<code>f95</code>, but not for 64-bit builds where on our test system it
|
|
|
1041 |
failed in both Forte 6U1 and 7, albeit in different ways. Our
|
|
|
1042 |
experience has been that ATLAS's BLAS is faster than <code>libsunperf</code>,
|
|
|
1043 |
especially for complex numbers.
|
|
|
1044 |
|
| 24001 |
hornik |
1045 |
<p>Some care is needed to ensure that libraries found by
|
| 18887 |
hornik |
1046 |
<code>configure</code> are compatible with the R executable and modules, as
|
|
|
1047 |
the testing process will not detect many of the possible problems. For
|
|
|
1048 |
32-bit builds under <code>cc</code> the flag <code>-dalign</code> is needed for
|
|
|
1049 |
some of the Sun libraries: fortunately the equivalent flag for
|
| 27252 |
ripley |
1050 |
<code>gcc</code>, <code>-mno-unaligned-doubles</code>, is the default. In
|
|
|
1051 |
theory, libraries such as <code>libpng</code>, <code>libjpeg</code>, <code>zlib</code> and
|
|
|
1052 |
the ATLAS libraries need to be built with a <code>pic</code> or <code>PIC</code>
|
|
|
1053 |
flag, which could be a problem if static libraries are used. In
|
|
|
1054 |
practice this seems to give little problem for 32-bit builds.
|
| 17472 |
ripley |
1055 |
|
| 24001 |
hornik |
1056 |
<p>For a 64-bit build, 64-bit libraries must be used. As the configuration
|
| 21058 |
ripley |
1057 |
process by default sets <code>LDFLAGS</code> to <code>-L/usr/local/lib</code>,
|
|
|
1058 |
you may need to set it to avoid finding 32-bit addons (as in the
|
| 28023 |
ripley |
1059 |
<code>gcc -m64</code> example above). It is possible to build Tcl/Tk as
|
|
|
1060 |
64-bit libraries with the configure option <code>--enable-64bit</code>, but
|
|
|
1061 |
only with the Forte compiler (and not with <code>gcc</code>) as of Tcl/Tk 8.4.5.
|
| 17472 |
ripley |
1062 |
|
| 22181 |
ripley |
1063 |
<a name="HP-UX"></a>
|
| 17472 |
ripley |
1064 |
|
| 27252 |
ripley |
1065 |
<h3 class="subsection">B.7.4 HP-UX</h4>
|
| 17472 |
ripley |
1066 |
|
| 26591 |
hornik |
1067 |
<p>R has been built successfully on HP-UX 10.2 and HP-UX 11.0 using both
|
| 19393 |
hornik |
1068 |
native compilers and <code>gcc</code>. However, 10.2 has not been tested
|
|
|
1069 |
since R 1.4.0. By default, R is configured to use <code>gcc</code> and
|
| 22181 |
ripley |
1070 |
<code>g77</code> on HP-UX (if available). Some installations of
|
| 19393 |
hornik |
1071 |
<code>g77</code> only install a static version of the <code>g2c</code> library
|
|
|
1072 |
that cannot be linked into a shared library since its files have not
|
|
|
1073 |
been compiled with the appropriate flag for producing position
|
|
|
1074 |
independent code (<small>PIC</small>). This will result in <code>make</code>
|
| 22181 |
ripley |
1075 |
failing with a linker error similar to
|
| 17472 |
ripley |
1076 |
|
| 24001 |
hornik |
1077 |
<pre class="smallexample"> ld: CODE_ONE_SYM fixup to non-code subspace in file foo.o -
|
|
|
1078 |
shared library must be position independent. Use +z or +Z to recompile.
|
|
|
1079 |
</pre>
|
| 22181 |
ripley |
1080 |
|
|
|
1081 |
<p>(<code>+z</code> and <code>+Z</code> are the <small>PIC</small> flags for the native
|
|
|
1082 |
compiler <code>cc</code>.) If this is the case you either need to modify
|
|
|
1083 |
your <code>g77</code> installation or configure with
|
|
|
1084 |
|
| 24001 |
hornik |
1085 |
<pre class="smallexample"> F77=fort77
|
|
|
1086 |
</pre>
|
| 17472 |
ripley |
1087 |
|
| 18887 |
hornik |
1088 |
<p>to specify use of the native <small>POSIX</small>-compliant FORTRAN 77
|
| 17472 |
ripley |
1089 |
compiler.
|
|
|
1090 |
|
| 24001 |
hornik |
1091 |
<p>You may find that <code>configure</code> detects other libraries that R
|
| 22181 |
ripley |
1092 |
needs to use as shared libraries but are only available as static
|
|
|
1093 |
libraries. If you cannot install shared versions you will need to tell
|
|
|
1094 |
<code>configure</code> not to use these libraries, or make sure they are
|
|
|
1095 |
not in the library path. The symptom will the linker error shown in the
|
|
|
1096 |
last paragraph. Static libraries that might be found and would cause
|
|
|
1097 |
problems are
|
| 22426 |
hornik |
1098 |
|
| 24001 |
hornik |
1099 |
<pre class="smallexample"> BLAS use --without-blas
|
|
|
1100 |
Tcl/Tk use --without-tcltk
|
|
|
1101 |
GNOME not built by default
|
|
|
1102 |
libpng use --without-libpng
|
|
|
1103 |
jpeg use --without-jpeglib
|
|
|
1104 |
zlib use --without-zlib
|
|
|
1105 |
</pre>
|
| 17472 |
ripley |
1106 |
|
| 22181 |
ripley |
1107 |
<p>and <code>bzip2</code> and <code>pcre</code> are problematic when building
|
| 22270 |
ripley |
1108 |
<code>libR.so</code>, only. These can be avoided by <code>--without-bzlib</code>
|
| 27343 |
hornik |
1109 |
and <code>--without-pcre</code> respectively, but these are the defaults.
|
| 22181 |
ripley |
1110 |
|
| 24001 |
hornik |
1111 |
<p>Some versions of <code>gcc</code> may contain what appears to be a bug at
|
| 17472 |
ripley |
1112 |
the <code>-O2</code> optimization level that causes
|
| 18887 |
hornik |
1113 |
|
| 24001 |
hornik |
1114 |
<pre class="smallexample"> > 2 %/% 2
|
|
|
1115 |
[1] 1
|
|
|
1116 |
> 1:2 %/% 2
|
|
|
1117 |
[1] 0 0 # wrong!!
|
|
|
1118 |
</pre>
|
| 17472 |
ripley |
1119 |
|
|
|
1120 |
<p>which will cause <code>make check</code> to fail. If this is the case, you
|
|
|
1121 |
should use <code>CFLAGS</code> to specify <code>-O</code> as the optimization
|
|
|
1122 |
level to use.
|
|
|
1123 |
|
| 24001 |
hornik |
1124 |
<p>Some systems running HP-UX 11.0 may have a <code>gcc</code> that was
|
| 22181 |
ripley |
1125 |
installed under HP-UX 10.2. Between versions 10.2 and 11.0 HP-UX
|
|
|
1126 |
changed its support functions for <small>IEEE</small> arithmetic from the
|
|
|
1127 |
recommended functions of the <small>IEEE</small> standard to the ones
|
|
|
1128 |
specified in the C9x draft standard. In particular, this means that
|
|
|
1129 |
<code>finite</code> has been replaced by <code>isfinite</code>. A <code>gcc</code>
|
|
|
1130 |
configured for HP-UX 10.2 run on 11.0 will not find <code>isfinite</code>, and
|
|
|
1131 |
as a result <code>configure</code> does not recognize the machine as fully
|
|
|
1132 |
supporting <small>IEEE</small> arithmetic and does not define <code>IEEE_754</code>
|
|
|
1133 |
when compiling C code. This results in a failure in <code>make
|
|
|
1134 |
check</code>. The best solution is to install a properly configured
|
|
|
1135 |
<code>gcc</code>. An alternative work-around is to add <code>-DIEEE_754</code>
|
|
|
1136 |
to the <code>CFLAGS</code> variable.
|
| 17472 |
ripley |
1137 |
|
| 24001 |
hornik |
1138 |
<p>You can configure R to use both the native <code>cc</code> and
|
| 18887 |
hornik |
1139 |
<code>fort77</code> with
|
|
|
1140 |
|
| 24001 |
hornik |
1141 |
<pre class="smallexample"> ./configure CC=cc F77=fort77
|
|
|
1142 |
</pre>
|
| 17472 |
ripley |
1143 |
|
| 24001 |
hornik |
1144 |
<p><code>f90</code> insists on linking against a static <code>libF90.a</code> which
|
| 18887 |
hornik |
1145 |
typically resides in a non-standard directory (e.g.,
|
|
|
1146 |
<code>/opt/fortran90/lib</code>). Hence, to use <code>f90</code> one needs to
|
|
|
1147 |
add this directory to the linker path via the configure variable
|
|
|
1148 |
<code>LDFLAGS</code> (e.g., <code>./configure F77=f90
|
|
|
1149 |
LDFLAGS=/opt/fortran90/lib</code>).
|
|
|
1150 |
|
| 17472 |
ripley |
1151 |
<a name="IRIX"></a>
|
|
|
1152 |
|
| 27252 |
ripley |
1153 |
<h3 class="subsection">B.7.5 IRIX</h4>
|
| 17472 |
ripley |
1154 |
|
| 26591 |
hornik |
1155 |
<p>R has been built successfully on IRIX64 6.5 using
|
| 17472 |
ripley |
1156 |
<code>gcc</code>/<code>f77</code> or <code>cc</code>/<code>f77</code> for 32-bit
|
|
|
1157 |
executables and the native compilers for a 64-bit executable. The
|
|
|
1158 |
command
|
| 18887 |
hornik |
1159 |
|
| 24001 |
hornik |
1160 |
<pre class="smallexample"> ./configure CC="cc -64" F77="f77 -64" --with-tcltk=no
|
|
|
1161 |
</pre>
|
| 17472 |
ripley |
1162 |
|
|
|
1163 |
<p>was used to create the 64-bit executable. It was necessary to
|
|
|
1164 |
explicitly omit Tcl/Tk because <code>configure</code> would find the 32-bit
|
|
|
1165 |
version but not detect that is was incompatible with a 64-bit build.
|
|
|
1166 |
|
| 24001 |
hornik |
1167 |
<p>A 32-bit build using <code>gcc</code>/<code>g77</code> passed <code>make
|
| 17472 |
ripley |
1168 |
check</code> but failed <code>make test-all-extras</code> in the complex LAPACK
|
|
|
1169 |
tests.
|
|
|
1170 |
|
|
|
1171 |
<a name="Alpha%2fOSF1"></a>
|
|
|
1172 |
|
| 27252 |
ripley |
1173 |
<h3 class="subsection">B.7.6 Alpha/OSF1</h4>
|
| 17472 |
ripley |
1174 |
|
| 26591 |
hornik |
1175 |
<p>R has been built successfully on an Alpha running OSF1 V4.0 using
|
| 17472 |
ripley |
1176 |
<code>gcc</code>/<code>g77</code> and <code>cc</code>/<code>f77</code>. Mixing
|
|
|
1177 |
<code>cc</code> and <code>g77</code> fails to configure. The
|
|
|
1178 |
<code>configure</code> option <code>--without-blas</code> was used since the
|
|
|
1179 |
native blas seems not to have been built with the flags needed to
|
|
|
1180 |
suppress <code>SIGFPE</code>'s. Currently R does not set a signal handler for
|
|
|
1181 |
<code>SIGFPE</code> on platforms that support <small>IEEE</small> arithmetic, so
|
|
|
1182 |
these are fatal.
|
|
|
1183 |
|
|
|
1184 |
<a name="Alpha%2fFreeBSD"></a>
|
|
|
1185 |
|
| 27252 |
ripley |
1186 |
<h3 class="subsection">B.7.7 Alpha/FreeBSD</h4>
|
| 17472 |
ripley |
1187 |
|
| 26591 |
hornik |
1188 |
<p>Attempts to build R on an Alpha with FreeBSD 4.3 have been only
|
| 17472 |
ripley |
1189 |
partly successful. Configuring with <code>-mieee</code> added to both
|
|
|
1190 |
<code>CFLAGS</code> and <code>FFLAGS</code> builds successfully, but tests fail with
|
|
|
1191 |
<code>SIGFPE</code>'s. It would appear that <code>-mieee</code> only defers these
|
|
|
1192 |
rather than suppressing them entirely. Advice on how to complete this
|
|
|
1193 |
port would be greatly appreciated.
|
|
|
1194 |
|
| 19031 |
hornik |
1195 |
<a name="AIX"></a>
|
|
|
1196 |
|
| 27252 |
ripley |
1197 |
<h3 class="subsection">B.7.8 AIX</h4>
|
| 19031 |
hornik |
1198 |
|
| 26591 |
hornik |
1199 |
<p>On AIX 4.3.3 and AIX 5.1, it was found that the use of "run time
|
| 19031 |
hornik |
1200 |
linking" (as opposed to normal AIX style linking) was required. For
|
|
|
1201 |
this, the R main program must be linked to the runtime linker with the
|
|
|
1202 |
<code>-brtl</code> linker option, and shareable objects must be enabled for
|
|
|
1203 |
runtime linking with the <code>-G</code> linker option. Without these
|
|
|
1204 |
options, the AIX linker will not automatically link to any shared object
|
|
|
1205 |
with a <code>.so</code> extension. Also, the R main program is unable to
|
|
|
1206 |
dynamically load modules (such as X11) with the <code>dlopen</code> call.
|
|
|
1207 |
|
| 24001 |
hornik |
1208 |
<p>When setting <code>MAIN_LDFLAGS</code> and <code>SHLIB_LDFLAGS</code> accordingly,
|
| 19031 |
hornik |
1209 |
note that linker flags must be escaped using <code>-Wl,</code> if
|
|
|
1210 |
<code>gcc</code> is used for linking: use <code>MAIN_LDFLAGS="-Wl,brtl"</code>
|
|
|
1211 |
and <code>SHLIB_LDFLAGS="-Wl,-G"</code> in this case.
|
|
|
1212 |
|
| 28194 |
hornik |
1213 |
<p>Harald Servat Gelabert <harald at cepba dot upc dot es> reported
|
|
|
1214 |
success building R 1.7.0 under AIX 5.1 with
|
| 24354 |
hornik |
1215 |
|
|
|
1216 |
<pre class="smallexample"> CC=xlc
|
|
|
1217 |
F77=xlf
|
|
|
1218 |
CXX=xlC
|
|
|
1219 |
CFLAGS=-O3 -qstrict -qmaxmem=8192
|
|
|
1220 |
FFLAGS=-O3 -qstrict -qmaxmem=8192
|
|
|
1221 |
CXXFLAGS=-O2 -qmaxmem=8192
|
|
|
1222 |
MAIN_LDFLAGS=-Wl,-brtl
|
|
|
1223 |
SHLIB_LDFLAGS=-Wl,-G
|
|
|
1224 |
</pre>
|
|
|
1225 |
|
|
|
1226 |
<p>but was unable to use the X libraries or the native BLAS (ESSL) and so
|
|
|
1227 |
used <code>--without-x --without-blas</code>.
|
|
|
1228 |
|
| 14307 |
ripley |
1229 |
<a name="New%20platforms"></a>
|
| 14184 |
ripley |
1230 |
|
| 24001 |
hornik |
1231 |
<h2 class="appendix">Appendix C New platforms</h2>
|
| 14184 |
ripley |
1232 |
|
| 26591 |
hornik |
1233 |
<p>There are a number of sources of problems when installing R on a new
|
| 17472 |
ripley |
1234 |
hardware/OS platform. These include
|
| 14184 |
ripley |
1235 |
|
| 24001 |
hornik |
1236 |
<p><strong>Floating Point Arithmetic</strong>: R supports the <small>POSIX</small>,
|
| 14307 |
ripley |
1237 |
SVID and <small>IEEE</small> models for floating point arithmetic. The
|
|
|
1238 |
<small>POSIX</small> and SVID models provide no problems. The <small>IEEE</small>
|
|
|
1239 |
model however can be a pain. The problem is that there is no agreement
|
|
|
1240 |
on how to set the signalling behaviour; Sun/Sparc, SGI/IRIX and ix86
|
|
|
1241 |
Linux require no special action, FreeBSD requires a call to (the macro)
|
|
|
1242 |
<code>fpsetmask(0)</code> and OSF1 requires that computation be done with a
|
|
|
1243 |
<code>-ieee_with_inexact</code> flag etc. On a new platform you must find
|
|
|
1244 |
out the magic recipe and add some code to make it work. This can often
|
|
|
1245 |
be done via the file <code>config.site</code> which resides in the top level
|
|
|
1246 |
directory.
|
| 14184 |
ripley |
1247 |
|
| 24001 |
hornik |
1248 |
<p>Beware of using high levels of optimization, at least initially. On
|
| 14328 |
ripley |
1249 |
many compilers these reduce the degree of compliance to the
|
| 17472 |
ripley |
1250 |
<small>IEEE</small> model. For example, using <code>-fast</code> on the Solaris
|
| 14328 |
ripley |
1251 |
SunPro compilers causes R's <code>NaN</code> to be set incorrectly.
|
|
|
1252 |
|
| 24001 |
hornik |
1253 |
<p><strong>Shared Libraries</strong>: There seems to be very little agreement
|
| 28261 |
murdoch |
1254 |
across platforms on what needs to be done to build shared libraries.
|
| 14307 |
ripley |
1255 |
there are many different combinations of flags for the compilers and
|
| 17472 |
ripley |
1256 |
loaders. GNU libtool cannot be used (yet), as it currently does not
|
|
|
1257 |
fully support FORTRAN (and will most likely never support <code>f2c</code>:
|
|
|
1258 |
one would need a shell wrapper for this). The technique we use is to
|
|
|
1259 |
first interrogate the X window system about what it does (using
|
|
|
1260 |
<code>xmkmf</code>), and then override this in situations where we know
|
|
|
1261 |
better (for tools from the GNU Compiler Collection and/or platforms we
|
|
|
1262 |
know about). This typically works, but you may have to manually
|
| 18887 |
hornik |
1263 |
override the results. Scanning the manual entries for <code>cc</code> and
|
|
|
1264 |
<code>ld</code> usually reveals the correct incantation. Once you know the
|
|
|
1265 |
recipe you can modify the file <code>config.site</code> (following the
|
| 17472 |
ripley |
1266 |
instructions therein) so that the build will use these options.
|
| 14184 |
ripley |
1267 |
|
| 24001 |
hornik |
1268 |
<p>If you do manage to get R running on a new platform please let us
|
| 14307 |
ripley |
1269 |
know about it so we can modify the configuration procedures to include
|
|
|
1270 |
that platform.
|
| 14184 |
ripley |
1271 |
|
| 24001 |
hornik |
1272 |
<p>If you are having trouble getting R to work on your platform please
|
| 18887 |
hornik |
1273 |
feel free to get in touch to ask questions. We have had a fair amount
|
| 24001 |
hornik |
1274 |
of practice at porting R to new platforms <small class="enddots">....</small>
|
| 14184 |
ripley |
1275 |
|
| 14185 |
ripley |
1276 |
<a name="Function%20and%20variable%20index"></a>
|
| 14184 |
ripley |
1277 |
|
| 24001 |
hornik |
1278 |
<h2 class="unnumbered">Function and variable index</h2>
|
| 14184 |
ripley |
1279 |
|
| 24001 |
hornik |
1280 |
<ul class="index-vr" compact>
|
| 14307 |
ripley |
1281 |
<li><code>configure</code>: <a href="#Using%20make">Using make</a>, <a href="#Configuration%20variables">Configuration variables</a>, <a href="#Installation">Installation</a>, <a href="#Simple%20compilation">Simple compilation</a>
|
| 14184 |
ripley |
1282 |
<li><code>install.packages</code>: <a href="#Installing%20packages">Installing packages</a>
|
|
|
1283 |
<li><code>make</code>: <a href="#Using%20make">Using make</a>
|
| 14307 |
ripley |
1284 |
<li><code>R_HOME</code>: <a href="#Simple%20compilation">Simple compilation</a>
|
| 14184 |
ripley |
1285 |
<li><code>remove.packages</code>: <a href="#Removing%20packages">Removing packages</a>
|
|
|
1286 |
<li><code>rsync</code>: <a href="#Using%20rsync">Using rsync</a>
|
|
|
1287 |
<li><code>update.packages</code>: <a href="#Updating%20packages">Updating packages</a>
|
| 26591 |
hornik |
1288 |
</ul>
|
| 14185 |
ripley |
1289 |
<a name="Concept%20index"></a>
|
| 14184 |
ripley |
1290 |
|
| 24001 |
hornik |
1291 |
<h2 class="unnumbered">Concept index</h2>
|
| 14184 |
ripley |
1292 |
|
| 24001 |
hornik |
1293 |
<ul class="index-cp" compact>
|
| 22142 |
ripley |
1294 |
<li>AIX: <a href="#AIX">AIX</a>
|
| 22570 |
ripley |
1295 |
<li>BLAS library: <a href="#Solaris">Solaris</a>, <a href="#MacOS%20X">MacOS X</a>, <a href="#Using%20FORTRAN">Using FORTRAN</a>, <a href="#Linear%20algebra">Linear algebra</a>
|
| 14307 |
ripley |
1296 |
<li>FORTRAN: <a href="#Using%20FORTRAN">Using FORTRAN</a>
|
|
|
1297 |
<li>Help pages: <a href="#Simple%20compilation">Simple compilation</a>
|
| 22181 |
ripley |
1298 |
<li>HP-UX: <a href="#HP-UX">HP-UX</a>
|
| 14184 |
ripley |
1299 |
<li>Installation: <a href="#Installation">Installation</a>
|
|
|
1300 |
<li>Installing under Unix: <a href="#Installing%20R%20under%20Unix">Installing R under Unix</a>
|
|
|
1301 |
<li>Installing under Windows: <a href="#Installing%20R%20under%20Windows">Installing R under Windows</a>
|
| 22142 |
ripley |
1302 |
<li>IRIS: <a href="#IRIX">IRIX</a>
|
| 22570 |
ripley |
1303 |
<li>LAPACK library: <a href="#Solaris">Solaris</a>, <a href="#MacOS%20X">MacOS X</a>, <a href="#Linear%20algebra">Linear algebra</a>
|
| 27252 |
ripley |
1304 |
<li>Linux: <a href="#Linux">Linux</a>, <a href="#Installing%20R%20under%20Unix">Installing R under Unix</a>
|
| 24070 |
ripley |
1305 |
<li>MacOS X: <a href="#MacOS%20X">MacOS X</a>, <a href="#Installing%20R%20under%20Unix">Installing R under Unix</a>
|
| 14307 |
ripley |
1306 |
<li>Manuals: <a href="#Making%20the%20manuals">Making the manuals</a>
|
| 14184 |
ripley |
1307 |
<li>Manuals, installing: <a href="#Installation">Installation</a>
|
|
|
1308 |
<li>Obtaining R: <a href="#Obtaining%20R">Obtaining R</a>
|
| 14307 |
ripley |
1309 |
<li>Packages: <a href="#Add-on%20packages">Add-on packages</a>
|
| 14184 |
ripley |
1310 |
<li>Packages, installing: <a href="#Installing%20packages">Installing packages</a>
|
|
|
1311 |
<li>Packages, removing: <a href="#Removing%20packages">Removing packages</a>
|
|
|
1312 |
<li>Packages, updating: <a href="#Updating%20packages">Updating packages</a>
|
| 22142 |
ripley |
1313 |
<li>Solaris: <a href="#Solaris">Solaris</a>
|
| 14307 |
ripley |
1314 |
<li>Sources for R: <a href="#Getting%20and%20unpacking%20the%20sources">Getting and unpacking the sources</a>
|
| 26591 |
hornik |
1315 |
</ul>
|
| 14184 |
ripley |
1316 |
|
|
|
1317 |
|
| 24001 |
hornik |
1318 |
<div class="footnote">
|
|
|
1319 |
<hr>
|
|
|
1320 |
<h4>Footnotes</h4>
|
| 14184 |
ripley |
1321 |
<ol type="1">
|
|
|
1322 |
<li><a name="fn-1"></a>
|
| 19459 |
pd |
1323 |
<p>if you have the source-code package
|
|
|
1324 |
files installed</p>
|
| 14184 |
ripley |
1325 |
|
| 24001 |
hornik |
1326 |
<li><a name="fn-2"></a>
|
| 23148 |
ripley |
1327 |
<p>Using the SunPro aka Forte aka Sun ONE <code>cc</code> and
|
|
|
1328 |
<code>f95</code> compilers</p>
|
| 14184 |
ripley |
1329 |
|
| 24001 |
hornik |
1330 |
<li><a name="fn-3"></a>
|
| 22181 |
ripley |
1331 |
<p>On HP-UX <code>fort77</code> is the <small>POSIX</small>
|
| 17472 |
ripley |
1332 |
compliant FORTRAN compiler, and comes second in the search list.</p>
|
| 14184 |
ripley |
1333 |
|
| 24001 |
hornik |
1334 |
<li><a name="fn-4"></a>
|
| 14215 |
ripley |
1335 |
<p>as well as its equivalence to the <code>Rcomplex</code>
|
|
|
1336 |
structure defined in <code>R_ext/Complex.h</code>.</p>
|
|
|
1337 |
|
| 24001 |
hornik |
1338 |
<li><a name="fn-5"></a>
|
| 14215 |
ripley |
1339 |
<p>In particular, avoid <code>g77</code>'s
|
|
|
1340 |
<code>-pedantic</code>, which gives confusing error messages.</p>
|
|
|
1341 |
|
| 24001 |
hornik |
1342 |
<li><a name="fn-6"></a>
|
| 14698 |
hornik |
1343 |
<p>e.g., to use an optimized BLAS on
|
| 14215 |
ripley |
1344 |
Sun/Sparc</p>
|
|
|
1345 |
|
| 24001 |
hornik |
1346 |
</ol><hr></div>
|
| 14184 |
ripley |
1347 |
|
| 24001 |
hornik |
1348 |
</body></html>
|
| 14184 |
ripley |
1349 |
|