File: gnu-autotools.rst

package info (click to toggle)
openmpi 5.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,684 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (312 lines) | stat: -rw-r--r-- 8,743 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
.. _developers-installing-autotools-label:

Manually installing the GNU Autootools
======================================

There is enough detail in building the GNU Autotools that it warrants
its own section.

.. note:: As noted above, you only need to read/care about this
          section if you are building Open MPI from a Git clone.  End
          users installing an Open MPI distribution tarball do *not*
          need to have the GNU Autotools installed.

Use a package manager
---------------------

It is recommended that you use your Linux distribution's package
manager, or Homebrew or MacPorts on macOS to install recent versions
of GNU Autoconf, Automake, and Libtool.

If you cannot, keep reading in this section to see how to build and
install these applications manually (i.e., download the source from
the internet and build/install it yourself).

Autotools versions
------------------

The following tools are required for developers to compile Open MPI
from its repository sources (users who download Open MPI tarballs do
not need these tools - they are only required for developers working
on the internals of Open MPI itself):

.. list-table::
   :header-rows: 1

   * - Software package
     - Notes
     - URL

   * - GNU m4
     - See version chart below
     - https://ftp.gnu.org/gnu/m4/
   * - GNU Autoconf
     - See version chart below
     - https://ftp.gnu.org/gnu/autoconf/
   * - GNU Automake
     - See version chart below
     - https://ftp.gnu.org/gnu/automake/
   * - GNU Libtool
     - See version chart below
     - https://ftp.gnu.org/gnu/libtool/

The table below lists the versions that are used to make nightly
snapshot and official release Open MPI tarballs. Other versions of the
tools *may* work for some (but almost certainly not all) platforms;
the ones listed below are the versions that we know work across an
extremely wide variety of platforms and environments.

To strengthen the above point: the core Open MPI developers typically
use very, very recent versions of the GNU tools.  There are known bugs
in older versions of the GNU tools that Open MPI no longer compensates
for (it seemed senseless to indefinitely support patches for ancient
versions of Autoconf, for example).

.. warning:: You **will** have problems if you do not use recent
             versions of the GNU Autotools.

That being said, ``autogen.pl`` and ``configure.ac`` scripts tend to
be a bit lenient and enforce slightly older minimum versions than the
ones listed below. This is because such older versions still make
usable Open MPI builds on many platforms - especially Linux on x86_64
with GNU compilers - and are convenient for developers whose Linux
distribution may not have as recent as the versions listed below (but are
recent enough to produce a working version for their platform).

To be clear: the versions listed below are required to support a wide
variety of platforms and environments, and are used to make nightly
and official release tarballs. When building Open MPI, YMMV when using
versions older than those listed below |mdash| especially if you are
not building on Linux x86_64 with the GNU compilers.

Using older versions is unsupported. If you run into problems, upgrade
to at least the versions listed below.

.. note:: You may need to scroll right in the following table.

.. list-table::
   :header-rows: 1

   * - Open MPI
     - M4
     - Autoconf
     - Automake
     - Libtool
     - Flex
     - Sphinx

   * - v1.0.x
     - NA
     - 2.58 - 2.59
     - 1.7 - 1.9.6
     - 1.5.16 - 1.5.22
     - 2.5.4
     - NA
   * - v1.1.x
     - NA
     - 2.59
     - 1.9.6
     - 1.5.16 - 1.5.22
     - 2.5.4
     - NA
   * - v1.2.x
     - NA
     - 2.59
     - 1.9.6
     - 1.5.22 - 2.1a
     - 2.5.4
     - NA
   * - v1.3.x
     - 1.4.11
     - 2.63
     - 1.10.1
     - 2.2.6b
     - 2.5.4
     - NA
   * - v1.4.x
     - 1.4.11
     - 2.63
     - 1.10.3
     - 2.2.6b
     - 2.5.4
     - NA
   * - v1.5.x for x=0-4
     - 1.4.13
     - 2.65
     - 1.11.1
     - 2.2.6b
     - 2.5.4
     - NA
   * - v1.5.x for x>=5
     - 1.4.16
     - 2.68
     - 1.11.3
     - 2.4.2
     - 2.5.35
     - NA
   * - v1.6.x
     - 1.4.16
     - 2.68
     - 1.11.3
     - 2.4.2
     - 2.5.35
     - NA
   * - v1.7.x
     - 1.4.16
     - 2.69
     - 1.12.2
     - 2.4.2
     - 2.5.35
     - NA
   * - v1.8.x
     - 1.4.16
     - 2.69
     - 1.12.2
     - 2.4.2
     - 2.5.35
     - NA
   * - v1.10.x
     - 1.4.16
     - 2.69
     - 1.12.2
     - 2.4.2
     - 2.5.35
     - NA
   * - v2.0.x through v4.y
     - 1.4.17
     - 2.69
     - 1.15
     - 2.4.6
     - 2.5.35
     - NA
   * - v5.0.x
     - 1.4.17
     - 2.69
     - 1.15
     - 2.4.6
     - 2.5.35
     - 4.2.0
   * - Git main
     - 1.4.17
     - 2.69
     - 1.15
     - 2.4.6
     - 2.5.35
     - 4.2.0

Checking your versions
----------------------

You can check what versions of the Autotools you have installed with
the following:

.. code-block:: sh

   shell$ m4 --version
   shell$ autoconf --version
   shell$ automake --version
   shell$ libtoolize --version

Installing the GNU Autotools from source
----------------------------------------

.. note:: Most operating system packaging systems (to include Homebrew
          and MacPorts on MacOS) install recent-enough versions of the
          GNU Autotools.  You should generally only install the GNU
          Autotools manually if you can't use your operating system
          packaging system to install them for you.

The GNU Autotools sources can be can be downloaded from:

* https://ftp.gnu.org/gnu/autoconf/
* https://ftp.gnu.org/gnu/automake/
* https://ftp.gnu.org/gnu/libtool/
* And if you need it: https://ftp.gnu.org/gnu/m4/

It is certainly easiest to download/build/install all four of these
tools together.  But note that Open MPI has no specific m4
requirements; it is only listed here because Autoconf requires minimum
versions of GNU m4.  Hence, you may or may not *need* to actually
install a new version of GNU m4.  That being said, if you are confused
or don't know, just install the latest GNU m4 with the rest of the GNU
Autotools and everything will work out fine.


Build and install ordering
--------------------------

You must build and install the GNU Autotools in the following order:

#. m4
#. Autoconf
#. Automake
#. Libtool

.. important:: You *must* install the last three tools (Autoconf,
               Automake, Libtool) into the same prefix directory.
               These three tools are somewhat inter-related, and if
               they're going to be used together, they *must* share a
               common installation prefix.

You can install m4 anywhere as long as it can be found in the path;
it may be convenient to install it in the same prefix as the other
three.  Or you can use any recent-enough m4 that is in your path.

.. warning:: It is *strongly* encouraged that you do **not** install
   your new versions over the OS-installed versions.  This could cause
   other things on your system to break.  Instead, install into
   ``$HOME/local``, or ``/usr/local``, or wherever else you tend to
   install "local" kinds of software.

   In doing so, be sure to prefix your ``$PATH`` with the directory
   where they are installed.  For example, if you install into
   ``$HOME/local``, you may want to edit your shell startup file
   (``.bashrc``, ``.cshrc``, ``.tcshrc``, etc.) to have something
   like

   .. code-block:: sh

      # For bash/sh:
      export PATH=$HOME/local/bin:$PATH
      # For csh/tcsh:
      set path = ($HOME/local/bin $path)

   Ensure to set your ``$PATH`` *before* you configure/build/install
   the four packages.

All four packages require two simple commands to build and
install:

.. code-block:: sh

   shell$ cd M4_DIRECTORY
   shell$ ./configure --prefix=PREFIX
   shell$ make all install

.. important:: If you are using a shell that does not automatically
               re-index the ``$PATH`` (e.g., the ``csh`` or ``tcsh``
               shells), be sure to run the ``rehash`` command before
               you install the next package so that the executables
               that were just installed can be found by the next
               package.

.. code-block:: sh

   # Make $PATH be re-indexed if necessary, e.g., via "rehash"
   shell$ cd AUTOCONF_DIRECTORY
   shell$ ./configure --prefix=PREFIX
   shell$ make all install

.. code-block:: sh

   # Make $PATH be re-indexed if necessary, e.g., via "rehash"
   shell$ cd AUTOMAKE_DIRECTORY
   shell$ ./configure --prefix=PREFIX
   shell$ make all install

.. code-block:: sh

   # Make $PATH be re-indexed if necessary, e.g., via "rehash"
   shell$ cd LIBTOOL_DIRECTORY
   shell$ ./configure --prefix=PREFIX
   shell$ make all install