Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 739 lines (543 sloc) 28.38 kB
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
1 Building and Installing Erlang/OTP
2 ==================================
3
4 Please read the whole file before attempting to build and install Erlang/OTP.
5 You can find more information about Open Source Erlang/OTP at:
6
7 <http://www.erlang.org/>
8
9 The source code for Erlang/OTP can also be found in a Git repository:
10
11 <http://github.com/erlang/otp>
12
13 Portability
14 -----------
15
16 Erlang/OTP should be possible to build from source on any Unix system,
17 including Mac OS X. This document describes how to native compile Erlang/OTP
18 on Unix. For detailed instructions on how to
19
20 * cross compile Erlang/OTP, see the [`$ERL_TOP/INSTALL-CROSS.md`] [1]
21 document.
22
23 * build Erlang/OTP on Windows, see the [`$ERL_TOP/INSTALL-WIN32.md`] [2]
24 document.
25
26 Binary releases for Windows can be found at
27 <http://www.erlang.org/download.html>.
28
29 However, you are in any case advised to read this document first, since it
30 covers building Erlang/OTP in general as well as other important information.
31
32 Daily Build and Test
33 --------------------
34 At Ericsson we have a "Daily Build and Test" that runs on:
35
36 * Solaris 8, 9
37 * Sparc32
38 * Sparc64
39 * Solaris 10
40 * Sparc32
41 * Sparc64
42 * x86
43 * SuSE Linux/GNU 9.4, 10.1
44 * x86
45 * SuSE Linux/GNU 10.0, 10.1
46 * x86
47 * x86_64
48 * SuSE Linux/GNU 11.0
49 * x86_64
50 * Gentoo Linux/GNU 1.12.11.1
51 * x86
52 * MontaVista Linux/GNU 4.0.1
53 * PowerPC
54 * FreeBSD 7.1
55 * x86
56 * Mac OS X 10.4.11 (Tiger), 10.5.8 (Leopard), 10.6.0 (Snow Leopard)
57 * x86
58 * Windows XP SP3, 2003, Vista, 7
59 * x86
60
61 We also have the following "Daily Cross Builds":
62
63 * SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86_64
64 * SuSE Linux/GNU 10.1 x86_64 -> Linux/GNU TILEPro64
65
66 and the following "Daily Cross Build Tests":
67
68 * SuSE Linux/GNU 10.1 x86_64
69
70 Versions Known *not* to Work
71 ----------------------------
72
73 * Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
74 rpm named `gcc-3.3.3-41`. That version has a serious optimization bug
75 that makes it unusable for building the Erlang emulator. Please
76 upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
77 Enterprise edition 9 (SLES9) has `gcc-3.3.3-43` and is not affected.
78
79 * `gcc-4.3.0` has a serious optimizer bug. It produces an Erlang emulator
80 that will crash immediately. The bug is supposed to be fixed in
81 `gcc-4.3.1`.
82
83 * FreeBSD had a bug which caused `kqueue`/`poll`/`select` to fail to detect
84 that a `writev()` on a pipe has been made. This bug should have been fixed
85 in FreeBSD 6.3 and FreeBSD 7.0. NetBSD and DragonFlyBSD probably have or
86 have had the same bug. More information can be found at:
87
88 * <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c>
89 * <http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html>
90
91 * `getcwd()` on Solaris 9 can cause an emulator crash. If you have
92 async-threads enabled you can increase the stack size of the
93 async-threads as a temporary workaround. See the `+a` command-line
94 argument in the documentation of `erl(1)`. Without async-threads the
95 emulator is not as vulnerable to this bug, but if you hit it without
96 async-threads the only workaround available is to enable async-threads
97 and increase the stack size of the async-threads. Sun has however
98 released patches that fixes the issue:
99
100 > Problem Description: 6448300 large mnttab can cause stack overrun
101 > during Solaris 9 getcwd
102
103 More information can be found at:
104
105 * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-40-1&searchclause=6448300>
106 * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-114432-29-1&searchclause=6448300>
107
108 Required Utilities
109 ------------------
110
111 These are the tools you will need in order to unpack and build Erlang/OTP.
112
113 ### Unpacking ###
114
115 * GNU unzip, or a modern uncompress.
116 * A TAR program that understands the GNU TAR format for long filenames
117 (such as GNU TAR).
118
119 ### Building ###
120
121 * GNU make
122 * GNU C compiler
123 * Perl 5
124 * GNU m4 -- If hipe (native code) support is enabled.
125 * ncurses (or termcap or termlib) -- The development headers and libraries
126 are needed, often known as ncurses-devel. (Use --without-termcap to build
127 without any of these libraries. Only the old shell (without any line
128 editing) can be used.)
129 * OpenSSL -- Optional, but needed for building the Erlang/OTP applications
130 `ssl` and `crypto`. You need the "development package" of OpenSSL, i.e.
131 including the header files. For building the application `ssl` the OpenSSL
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
132 binary command program `openssl` is also needed. At least version 0.9.7
133 of OpenSSL is required. Can be downloaded from <http://www.openssl.org>.
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
134 * Sun Java jdk-1.5.0 or higher -- Optional but needed for building the
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
135 Erlang/OTP application `jinterface` and parts of `ic` and `orber`. Can
136 be downloaded from <http://java.sun.com>. We have also tested IBM's
137 JDK 1.5.0.
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
138 * X Windows -- Optional, but development headers and libraries are needed
139 to build the Erlang/OTP application `gs` on Unix/Linux.
140 * `sed` -- There seem to be some problems with some of the `sed` version on
141 Solaris. Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris
142 platform.
143 * Flex -- Optional, headers and libraries are needed to build the flex
144 scanner for the `megaco` application on Unix/Linux.
145
146 If you are building in a Git working directory you also have to have a GNU
147 `autoconf` of at least version 2.59. Autoconf is however not needed if you
148 build an unmodified version of the released source.
149
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
150 #### Building Documentation ####
151
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
152 * `xsltproc` -- XSLT processor. A tool for applying XSLT stylesheets
153 to XML documents. Can be downloaded from
154 <http://xmlsoft.org/XSLT/xsltproc2.html>.
155 * `fop` -- Apache FOP print formatter (requires Java). Can be downloaded from
156 <http://xmlgraphics.apache.org/fop>.
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
157 * `Markdown.pl` -- Optional. This is a `perl` script that generates an
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
158 HTML version of a document written in Markdown notation. Can be
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
159 downloaded at <http://daringfireball.net/projects/markdown>.
160
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
161 ### Installing ###
162
163 * An `install` program that can take multiple file names.
164
165 How to Build and Install Erlang/OTP
166 -----------------------------------
167
168 The following instructions are for building using the source tar ball.
169
170 The variable `$ERL_TOP` will be mentioned a lot of times. It refers to
171 the top directory in the source tree. More information about `$ERL_TOP`
172 can be found in the "`make` and `$ERL_TOP`" section below. If you are
173 building in git you probably want to take a look at the "Building in Git"
174 section below before proceeding.
175
176 ### Unpacking ###
177
178 Step 1: Start by unpacking the Erlang/OTP distribution file with your GNU
179 compatible TAR program.
180
181 $ gunzip -c otp_src_R13B04.tar.gz | tar xf -
182 $ zcat otp_src_R13B04.tar.gz | tar xf -
183
184
185 Step 2: Now cd into the base directory (`$ERL_TOP`).
186
187 $ cd otp_src_R13B04
188
189 ### Configuring ###
190
191 Step 3: On some platforms Perl may behave strangely if certain locales are
192 set, so optionally you may need to set the LANG variable:
193
194 # Bourne shell
195 $ LANG=C; export LANG
196
197 or
198
199 # C-Shell
200 $ setenv LANG C
201
202 Step 4: Run the following commands to configure the build:
203
204 $ ./configure [ options ]
205
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
206 By default, Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`.
207 To instead install in `<BaseDir>/{bin,lib/erlang}`, use the
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
208 `--prefix=<BaseDir>` option.
209
210 If you upgraded the source with some patch you may need to clean up
211 from previous builds before the new build. Do a `make clean`; see
212 "Caveats" below.
213
214 ### Building ###
215
216 Step 5: Build the Erlang/OTP package.
217
218 $ make
219
220 ### Installing ###
221
222 Step 6: Install then Erlang/OTP package
223
224 $ make install
225
226 ### A Closer Look at the individual Steps ###
227
228 Let us go through them in some detail.
229
230 #### Configuring ####
231
232 Step 4 runs a configuration script created by the GNU autoconf utility, which
233 checks for system specific features and then creates a number of makefiles.
234
235 The configure script allows you to customize a number of parameters;
236 type `./configure --help` or `./configure --help=recursive` for details.
237 `./configure --help=recursive` will give help for all `configure` scripts in
238 all applications.
239
240 One of the things you can specify is where Erlang/OTP should be installed: by
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
241 default Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`;
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
242 to keep the same structure but install in a different place, `<Dir>` say,
243 use the `--prefix` argument like this: `./configure --prefix=<Dir>`.
244
245 Some of the available `configure` options are:
246
247 * `--prefix=PATH`: Specify installation prefix.
248 * `--{enable,disable}-threads`: Thread support (enabled by default if
249 possible)
250 * `--{enable,disable}-smp-support`: SMP support (enabled by default if
251 possible)
252 * `--{enable,disable}-kernel-poll`: Kernel poll support (enabled by default
253 if possible)
254 * `--{enable,disable}-hipe`: HiPE support (enabled by default on supported
255 platforms)
256 * `--enable-darwin-universal`: Build universal binaries on darwin i386.
257 * `--enable-darwin-64bit`: Build 64bit binaries on darwin
258 * `--enable-m64-build`: Build 64bit binaries using the -m64 flag to (g)cc
259 * `--enable-m32-build`: Build 32bit binaries using the -m32 flag to (g)cc
260 * `--{with,without}-termcap`: termcap (without implies that only the old
261 Erlang shell can be used)
262 * `--with-javac=JAVAC`: Specify Java compiler to use
263 * `--{with,without}-javac`: Java compiler (without implies that the
264 `jinterface` application won't be built).
265 * `--{enable,disable}-dynamic-ssl-lib`: Dynamic OpenSSL libraries
266 * `--{enable,disable}-shared-zlib`: Shared zlib library
267 * `--with-ssl=PATH`: Specify location of OpenSSL include and lib
268 * `--{with,without}-ssl`: OpenSSL (without implies that the `crypto`, `ssh`,
269 and `ssl` won't be built)
270
271 If you or your system has special requirements please read the
272 Makefile for additional configuration information.
273
274 #### Building ####
275
276 Step 5 builds the Erlang/OTP system. On a fast computer, this will take about
277 5 minutes. After completion of this step, you should have a working
278 Erlang/OTP system which you can try by typing `bin/erl`. This should start
279 up Erlang/OTP and give you a prompt.
280
281 #### Installing ####
282
283 Step 6 is optional. It installs Erlang/OTP at a standardized location (if you
284 change your mind about where you wish to install you can rerun step 4,
285 without having to do step 5 again).
286
287 ##### Alternative Installation Procedures #####
288
289 * Staged install using [`DESTDIR`] [3]. You can perform the install
290 phase in a temporary directory and later move the installation into
291 its correct location by use of the `DESTDIR` variable:
292
293 $ make DESTDIR=<tmp install dir> install
294
295 The installation will be created in a location prefixed by `$DESTDIR`.
296 It can, however, not be run from there. It needs to be moved into the
297 correct location before it can be run. If `DESTDIR` have not been set
298 but `INSTALL_PREFIX` has been set, `DESTDIR` will be set to
299 `INSTALL_PREFIX`. Note that `INSTALL_PREFIX` in pre R13B04 was buggy
300 and behaved as `EXTRA_PREFIX` (see below). There are lots of areas of
301 use for an installation procedure using `DESTDIR`, e.g. when creating
302 a package, cross compiling, etc. Here is an example where the
303 installation should be located under `/opt/local`:
304
305 $ ./configure --prefix=/opt/local
306 $ make
307 $ make DESTDIR=/tmp/erlang-build install
308 $ cd /tmp/erlang-build/opt/local
309 $ # gnu-tar is used in this example
310 $ tar -zcf /home/me/my-erlang-build.tgz *
311 $ su -
312 Password: *****
313 $ cd /opt/local
314 $ tar -zxf /home/me/my-erlang-build.tgz
315
316 * Install using the `release` target. Instead of doing `make install` you
317 can create the installation in whatever directory you like using the
318 `release` target and run the `Install` script yourself. `RELEASE_ROOT`
319 is used for specifying the directory where the installation should be
320 created. This is what by default ends up under `/usr/local/lib/erlang`
321 if you do the install using `make install`. All installation paths
322 provided in the `configure` phase are ignored, as well as `DESTDIR`,
323 and `INSTALL_PREFIX`. If you want links from a specific `bin` directory
324 to the installation you have to set those up yourself. An example where
325 Erlang/OTP should be located at `/home/me/OTP`:
326
327 $ ./configure
328 $ make
329 $ make RELEASE_ROOT=/home/me/OTP release
330 $ cd /home/me/OTP
331 $ ./Install -minimal /home/me/OTP
332 $ mkdir -p /home/me/bin
333 $ cd /home/me/bin
334 $ ln -s /home/me/OTP/bin/erl erl
335 $ ln -s /home/me/OTP/bin/erlc erlc
336 $ ln -s /home/me/OTP/bin/escript escript
337 ...
338
339 The `Install` script should currently be invoked as follows in the
340 directory where it resides (the top directory):
341
342 $ ./Install [-cross] [-minimal|-sasl] <ERL_ROOT>
343
344 where:
345
346 * `-minimal` Creates an installation that starts up a minimal amount
347 of applications, i.e., only `kernel` and `stdlib` are started. The
348 minimal system is normally enough, and is what `make install` uses.
349 * `-sasl` Creates an installation that also starts up the `sasl`
350 application.
351 * `-cross` For cross compilation. Informs the install script that it
352 is run on the build machine.
353 * `<ERL_ROOT>` - The absolute path to the Erlang installation to use
354 at run time. This is often the same as the current working directory,
355 but does not have to be. It can follow any other path through the
356 file system to the same directory.
357
358 If neither `-minimal`, nor `-sasl` is passed as argument you will be
359 prompted.
360
361 * Test install using `EXTRA_PREFIX`. The content of the `EXTRA_PREFIX`
362 variable will prefix all installation paths when doing `make install`.
363 Note that `EXTRA_PREFIX` is similar to `DESTDIR`, but it does *not* have
364 the same effect as `DESTDIR`. The installation can and have to be run
365 from the location specified by `EXTRA_PREFIX`. That is, it can be useful
366 if you want to try the system out, running test suites, etc, before doing
367 the real install without `EXTRA_PREFIX`.
368
369 ### Symbolic Links in `--bindir` ###
370
371 When doing `make install` and the default installation prefix is used,
372 relative symbolic links will be created from `/usr/local/bin` to all public
373 Erlang/OTP executables in `/usr/local/lib/erlang/bin`. The installation phase
374 will try to create relative symbolic links as long as `--bindir` and the
375 Erlang bin directory, located under `--libdir`, both have `--exec-prefix` as
376 prefix. Where `--exec-prefix` defaults to `--prefix`. `--prefix`,
377 `--exec-prefix`, `--bindir`, and `--libdir` are all arguments that can be
378 passed to `configure`. One can force relative, or absolute links by passing
379 `BINDIR_SYMLINKS=relative|absolute` as arguments to `make` during the install
380 phase. Note that such a request might cause a failure if the request cannot
381 be satisfied.
382
383 ### Building in Git ###
384
385 When building in a Git working directory you also have to have a GNU `autoconf`
386 of at least version 2.59 on your system. This since you need to generate the
387 `configure` scripts before you can start building.
388
389 The `configure` scripts are generated by invoking `./otp_build autoconf` in
390 the `$ERL_TOP` directory. The `configure` scripts also have to be regenerated
391 when a `configure.in` or `aclocal.m4` file has been modified. Note that when
392 checking out a branch a `configure.in` or `aclocal.m4` file may change
393 content, and you may therefore have to regenerate the `configure` scripts
394 when checking out a branch. Regenerated `configure` scripts imply that you
395 have to run `configure` and build again.
396
397 Note that running `./otp_build autoconf` is **not** needed when building an
398 unmodified version the released source.
399
400 Other useful information can be found at our github wiki:
401 <http://wiki.github.com/erlang/otp>
402
403 Pre-built Source Tree
404 ---------------------
405
406 The source tree is delivered with a lot of platform independent
407 build results already pre-built. If you want to remove these pre-built
408 files, invoke `./otp_build remove_prebuilt_files` from the `$ERL_TOP`
409 directory. After you have done this, you can build exactly the same way
410 as before, but the build process will take a much longer time.
411
412 *NOTE*: Doing `make clean` in an arbitrary directory of the source tree,
413 may remove files needed for bootstrapping the build. Doing
414 `./otp_build save_bootstrap` from the `$ERL_TOP` directory before
415 doing `make clean` will ensure that it will be possible to build after
416 doing `make clean`. `./otp_build save_bootstrap` will be invoked
417 automatically when `make` is invoked from `$ERL_TOP` with either the
418 `clean` target, or the default target. It is also automatically invoked
419 if `./otp_build remove_prebuilt_files` is invoked.
420
421 `make` and `$ERL_TOP`
422 ---------------------
423
424 All the makefiles in the entire directory tree use the environment
425 variable `ERL_TOP` to find the absolute path of the installation. The
426 `configure` script will figure this out and set it in the top level
427 Makefile (which, when building, it will pass on). However, when
428 developing it is sometimes convenient to be able to run make in a
429 subdirectory. To do this you must set the `ERL_TOP` variable
430 before you run make.
431
432 For example, assume your GNU make program is called `make` and you
433 want to rebuild the application `STDLIB`, then you could do:
434
435 $ cd lib/stdlib; env ERL_TOP=<Dir> make
436
437 where `<Dir>` would be what you find `ERL_TOP` is set to in the top level
438 Makefile.
439
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
440 How to Build the Erlang/OTP Documentation
441 -----------------------------------------
442
443 $ cd $ERL_TOP
444
445 If you have just built Erlang/OTP in the current source tree, you have
446 already ran `configure` and do not need to do this again; otherwise, run
447 `configure`.
448
449 $ ./configure [Configure Args]
450
451 When building the documentation you need a full Erlang/OTP-R13B04 system in
452 the `$PATH`.
453
454 $ export PATH=<Erlang/OTP-R13B04 bin dir>:$PATH # Assuming bash/sh
455
456 This document as well as some other documents have been written using
457 Markdown notation. HTML versions of these documents are created and included
458 in the HTML documentation if the environment variable `MD2HTML` is set to a
459 command that generates HTML on `stdout` for a Markdown document passed as
460 argument. This is a last minute hack, which will be handled in a better way
461 in the future. We currently set `MD2HTML` as follows.
462
463 $ export MD2HTML="perl <path to script>/Markdown.pl --html4tags"
464
465 Build the documentation.
466
467 $ make docs
468
469 The documentation can be installed either using the `install-docs` target,
470 or using the `release_docs` target.
471
472 * If you have installed Erlang/OTP using the `install` target, install
473 the documentation using the `install-docs` target. Install locations
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
474 determined by `configure` will be used. `$DESTDIR` can be used the
475 same way as when doing `make install`.
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
476
477 $ make install-docs
478
479 * If you have installed Erlang/OTP using the `release` target, install
480 the documentation using the `release_docs` target. You typically want
481 to use the same RELEASE_ROOT as when invoking `make release`.
482
483 $ make release_docs RELEASE_ROOT=<release dir>
484
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
485 ### Build Issues ###
486
487 We have sometimes experienced problems with suns `java` running out of
488 memory when running `fop`. Increasing the amount of memory available
489 as follows has in our case solved the problem.
490
491 $ export FOP_OPTS="-Xmx<Installed amount of RAM in MB>m"
492
493 More information can be found at
494 <http://xmlgraphics.apache.org/fop/0.95/running.html#memory>.
495
496 How to Install the Pre-formatted Erlang/OTP Documentation
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
497 ---------------------------------------------------------
498
499 Pre-formatted documentation can be downloaded at
500 <http://www.erlang.org/download.html>.
501
502 For some graphical tools to find the on-line help you have to install
503 the HTML documentation on top of the installed OTP applications, i.e.
504
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
505 $ cd <ReleaseDir>
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
506 $ gunzip -c otp_html_R13B04.tar.gz | tar xf -
507
508 For `erl -man <page>` to work the Unix manual pages have to be
509 installed in the same way, i.e.
510
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
511 $ cd <ReleaseDir>
4085125 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
512 $ gunzip -c otp_man_R13B04.tar.gz | tar xf -
513
3fdc76b @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
514 Where `<ReleaseDir>` is
515
516 * `<PrefixDir>/lib/erlang` if you have installed Erlang/OTP using
517 `make install`.
518 * `$DESTDIR<PrefixDir>/lib/erlang` if you have installed Erlang/OTP
519 using `make install DESTDIR=<TmpInstallDir>`.
520 * `RELEASE_ROOT` if you have installed using
521 `make release RELEASE_ROOT=<ReleaseDir>`.
522
7aa2cb2 @rickard-green OTP-8449 Documentation improvements.
rickard-green authored
523 Support for SMP (Symmetric Multi Processing)
524 --------------------------------------------
525
526 An emulator with SMP support will be built by default on most platforms
527 if a usable POSIX thread library or native Windows threads is found.
528
529 You can force building of an SMP emulator, by using
530 `./configure --enable-smp-support`. However, if configure does not
531 automatically enable SMP support, the build is very likely to fail.
532
533 Use `./configure --disable-smp-support` if you for some reason do not
534 want to have the emulator with SMP support built.
535
536 If SMP support is enabled, support for threaded I/O will also be turned on
537 (also in the emulator without SMP support).
538
539 The `erl` command will automatically start the SMP emulator if the
540 computer has more than one logical processor. You can force a start
541 of the emulator with SMP support by passing `-smp enable` as
542 command line arguments to erl, and you can force a start of the
543 emulator without SMP support by passing `-smp disable`.
544
545 GS (Graphic System)
546 -------------------
547
548 GS now Tcl/Tk 8.4. It will be searched for when starting GS.
549
550 Using HiPE
551 ----------
552
553 HiPE supports the following system configurations:
554
555 * x86: All 32-bit and 64-bit mode processors should work.
556
557 * Linux: Fedora Core is supported. Both 32-bit and 64-bit modes are
558 supported.
559
560 NPTL glibc is strongly preferred, or a LinuxThreads
561 glibc configured for "floating stacks". Old non-floating
562 stacks glibcs have a fundamental problem that makes HiPE
563 support and threads support mutually exclusive.
564
565 * Solaris: Solaris 10 (32-bit and 64-bit) and 9 (32-bit) are supported.
566 The build requires a version of the GNU C compiler (gcc)
567 that has been configured to use the GNU assembler (gas).
568 Sun's x86 assembler is emphatically **not** supported.
569
570 * FreeBSD: FreeBSD 6.1 and 6.2 in 32-bit and 64-bit modes should work.
571
572 * MacOSX/Darwin: Darwin 9.8.0 in 32-bit mode should work.
573
574 * PowerPC: All 32-bit 6xx/7xx(G3)/74xx(G4) processors should work. 32-bit
575 mode on 970 (G5) and POWER5 processors should work.
576
577 * Linux (Yellow Dog) and Mac OSX 10.4 are supported.
578
579 * SPARC: All UltraSPARC processors running 32-bit user code should work.
580
581 * Solaris 9 is supported. The build requires a `gcc` that has been
582 configured to use Sun's assembler and linker. Using the GNU assembler
583 but Sun's linker has been known to cause problems.
584
585 * Linux (Aurora) is supported.
586
587 * ARM: ARMv5TE (i.e. XScale) processors should work. Both big-endian and
588 little-endian modes are supported.
589
590 * Linux is supported.
591
592 HiPE is automatically enabled on the following systems:
593
594 * x86 in 32-bit mode: Linux, Solaris, FreeBSD
595 * x86 in 64-bit mode: Linux, Solaris, FreeBSD
596 * PowerPC: Linux, MacOSX
597 * SPARC: Linux
598 * ARM: Linux
599
600 On other supported systems you need to `./configure --enable-hipe`.
601
602 If you are running on a platform supporting HiPE and if you have not disabled
603 HiPE, you can compile a module into native code like this from the Erlang
604 shell:
605
606 1> c(Module, native).
607
608 or
609
610 1> c(Module, [native|OtherOptions]).
611
612 Using the erlc program, write like this:
613
614 $ erlc +native Module.erl
615
616 The native code will be placed into the beam file and automatically loaded
617 when the beam file is loaded.
618
619 To add hipe options, write like this from the Erlang shell:
620
621 1> c(Module, [native,{hipe,HipeOptions}|MoreOptions]).
622
623 Use hipe:help_options/0 to print out the available options.
624
625 1> hipe:help_options().
626
627 Mac OS X (Darwin)
628 -----------------
629
630 We test Mac OS X 10.4.11 (Tiger) and Mac OS X 10.5.x (Leopard) in our daily
631 builds (but only on Intel processors).
632
633 Make sure that the command `hostname` returns a valid fully qualified host
634 name (this is configured in `/etc/hostconfig`).
635
636 If you develop linked-in drivers (shared library) you need to link using
637 `gcc` and the flags `-bundle -flat_namespace -undefined suppress`. You also
638 include `-fno-common` in `CFLAGS` when compiling. Use `.so` as the library
639 suffix.
640
641 Universal 32bit binaries can be built on an Intel Mac using the
642 `--enable-darwin-universal` configure option. There still may occur
643 problems with certain applications using this option, but the base
644 system should run smoothly.
645
646 When building universal binaries on a PowerPC Mac (at least on Tiger),
647 you must point out a suitable SDK that contains universal binaries.
648 For instance, to build universal binaries for Tiger (10.4):
649
650 $ CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
651 LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
652 ./configure --enable-darwin-universal
653
654 Also, if you run Leopard, but want to build for Tiger, you must do by
655 setting the `MACOSX_DEPLOYMENT_TARGET` environmental variable.
656
657 $ export MACOSX_DEPLOYMENT_TARGET=10.4
658
659 Experimental support for 64bit x86 darwin binaries can be enabled
660 using the `--enable-darwin-64bit` configure flag. The 64bit binaries are
661 best built and run on Leopard, but most of the system also works on
662 Tiger (Tiger's 64bit libraries are, however, limited; therefore e.g. `odbc`,
663 `crypto`, `ssl` etc. are not supported in Tiger). 64bit PPC binaries are not
664 supported and we have no plans to add such support (no machines to
665 test on).
666
667 Universal binaries and 64bit binaries are mutually exclusive options.
668
669 How to Build a Debug Enabled Erlang RunTime System
670 --------------------------------------------------
671
672 After completing all the normal building steps described above a debug
673 enabled runtime system can be built. To do this you have to change
674 directory to `$ERL_TOP/erts/emulator`.
675
676 In this directory execute:
677
678 $ make debug FLAVOR=$FLAVOR
679
680 where `$FLAVOR` is either `plain` or `smp`. The flavor options will
681 produce a beam.debug and beam.smp.debug executable respectively. The
682 files are installed along side with the normal (opt) versions `beam.smp`
683 and `beam`.
684
685 To start the debug enabled runtime system execute:
686
687 $ $ERL_TOP/bin/cerl -debug
688
689 The debug enabled runtime system features lock violation checking,
690 assert checking and various sanity checks to help a developer ensure
691 correctness. Some of these features can be enabled on a normal beam
692 using appropriate configure options.
693
694 There are other types of runtime systems that can be built as well
695 using the similar steps just described.
696
697 $ make $TYPE FLAVOR=$FLAVOR
698
699 where `$TYPE` is `opt`, `gcov`, `gprof`, `debug`, `valgrind`, or `lcnt`.
700 These different beam types are useful for debugging and profiling
701 purposes.
702
703 Authors
704 -------
705 Authors are mostly listed in the application's `AUTHORS` files,
706 that is `$ERL_TOP/lib/*/AUTHORS` and `$ERL_TOP/erts/AUTHORS`,
707 not in the individual source files.
708
709 Copyright and License
710 ---------------------
711
712 > %CopyrightBegin%
713 >
714 > Copyright Ericsson AB 1998-2010. All Rights Reserved.
715 >
716 > The contents of this file are subject to the Erlang Public License,
717 > Version 1.1, (the "License"); you may not use this file except in
718 > compliance with the License. You should have received a copy of the
719 > Erlang Public License along with this software. If not, it can be
720 > retrieved online at http://www.erlang.org/.
721 >
722 > Software distributed under the License is distributed on an "AS IS"
723 > basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
724 > the License for the specific language governing rights and limitations
725 > under the License.
726 >
727 > %CopyrightEnd%
728
729 More Information
730 ----------------
731
732 More information can be found at <http://www.erlang.org>.
733
734
735
736 [1]: INSTALL-CROSS.html "$ERL_TOP/INSTALL-CROSS.md"
737 [2]: INSTALL-WIN32.html "$ERL_TOP/INSTALL-WIN32.md"
738 [3]: http://www.gnu.org/prep/standards/html_node/DESTDIR.html "DESTDIR"
Something went wrong with that request. Please try again.