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