<commit_before>Building and Installing Erlang/OTP
==================================

Introduction
------------

This document describes how to build and install Erlang/OTP-%OTP-REL%. You
are advised to read the whole document before attempting to build and install
Erlang/OTP. You can find more information about Open Source Erlang/OTP at:

   <http://www.erlang.org/>

The source code for Erlang/OTP can also be found in a Git repository:

   <http://github.com/erlang/otp>

Erlang/OTP should be possible to build from source on any Unix system,
including Mac OS X. This document describes how to native compile Erlang/OTP
on Unix. For detailed instructions on how to

*   cross compile Erlang/OTP, see the [$ERL_TOP/INSTALL-CROSS.md][]
    document.

*   build Erlang/OTP on Windows, see the [$ERL_TOP/INSTALL-WIN32.md][]
    document.

    Binary releases for Windows can be found at
    <http://www.erlang.org/download.html>.

Before reading the above mentioned documents you are in any case advised to
read this document first, since it covers building Erlang/OTP in general as
well as other important information.

Daily Build and Test
--------------------
At Ericsson we have a "Daily Build and Test" that runs on:

*   Solaris 8, 9
    *   Sparc32
    *   Sparc64
*   Solaris 10
    *   Sparc32
    *   Sparc64
    *   x86
*   SuSE Linux/GNU 9.4, 10.1
    *   x86
*   SuSE Linux/GNU 10.0, 10.1
    *   x86
    *   x86\_64
*   SuSE Linux/GNU 11.0
    *   x86\_64
*   Gentoo Linux/GNU 1.12.11.1
    *   x86
*   MontaVista Linux/GNU 4.0.1
    *   PowerPC
*   FreeBSD 7.1
    *   x86
*   Mac OS X 10.4.11 (Tiger), 10.5.8 (Leopard), 10.6.0 (Snow Leopard)
    *   x86
*   Windows XP SP3, 2003, Vista, 7
    *   x86

We also have the following "Daily Cross Builds":

*   SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64
*   SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64

and the following "Daily Cross Build Tests":

*   SuSE Linux/GNU 10.1 x86\_64

Versions Known NOT to Work
--------------------------

*   Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
    rpm named `gcc-3.3.3-41`. That version has a serious optimization bug
    that makes it unusable for building the Erlang emulator. Please
    upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
    Enterprise edition 9 (SLES9) has `gcc-3.3.3-43` and is not affected.

*   `gcc-4.3.0` has a serious optimizer bug. It produces an Erlang emulator
    that will crash immediately. The bug is supposed to be fixed in
    `gcc-4.3.1`.

*   FreeBSD had a bug which caused `kqueue`/`poll`/`select` to fail to detect
    that a `writev()` on a pipe has been made. This bug should have been fixed
    in FreeBSD 6.3 and FreeBSD 7.0. NetBSD and DragonFlyBSD probably have or
    have had the same bug. More information can be found at:

    *   <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c>
    *   <http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html>

*   `getcwd()` on Solaris 9 can cause an emulator crash. If you have
    async-threads enabled you can increase the stack size of the
    async-threads as a temporary workaround. See the `+a` command-line
    argument in the documentation of `erl(1)`. Without async-threads the
    emulator is not as vulnerable to this bug, but if you hit it without
    async-threads the only workaround available is to enable async-threads
    and increase the stack size of the async-threads. Sun has however
    released patches that fixes the issue:

    > Problem Description: 6448300 large mnttab can cause stack overrun
    > during Solaris 9 getcwd

    More information can be found at:

    *   <http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-40-1&searchclause=6448300>
    *   <http://sunsolve.sun.com/search/document.do?assetkey=1-21-114432-29-1&searchclause=6448300>

Required Utilities
------------------

These are the tools you will need in order to unpack and build Erlang/OTP.

### Unpacking ###

*   GNU unzip, or a modern uncompress.
*   A TAR program that understands the GNU TAR format for long filenames
    (such as GNU TAR).

### Building ###

*   GNU `make`
*   `gcc` -- GNU C compiler
*   Perl 5
*   GNU `m4` -- If HiPE (native code) support is enabled. HiPE can be
    disabled using `--disable-hipe`
*   `ncurses`, `termcap`, or `termlib` -- The development headers and
    libraries are needed, often known as `ncurses-devel`. Use
    `--without-termcap` to build without any of these libraries. Note that
    in this case only the old shell (without any line editing) can be used.
*   OpenSSL -- Optional, but needed for building the Erlang/OTP applications
    `ssl` and `crypto`. You need the "development package" of OpenSSL, i.e.
    including the header files. For building the application `ssl` the OpenSSL
    binary command program `openssl` is also needed. At least version 0.9.7
    of OpenSSL is required. Can be downloaded from <http://www.openssl.org>.
*   Sun Java jdk-1.5.0 or higher -- Optional but needed for building the
    Erlang/OTP application `jinterface` and parts of `ic` and `orber`. Can
    be downloaded from <http://java.sun.com>. We have also tested IBM's
    JDK 1.5.0.
*   X Windows -- Optional, but development headers and libraries are needed
    to build the Erlang/OTP application `gs` on Unix/Linux.
*  `sed` -- There seem to be some problems with some of the `sed` version on
    Solaris. Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris
    platform.
*   `flex` -- Optional, headers and libraries are needed to build the `flex`
    scanner for the `megaco` application on Unix/Linux.

#### Building Documentation ####

*   `xsltproc` -- XSLT processor. A tool for applying XSLT stylesheets
    to XML documents. Can be downloaded from
    <http://xmlsoft.org/XSLT/xsltproc2.html>.
*   `fop` -- Apache FOP print formatter (requires Java). Can be downloaded
    from <http://xmlgraphics.apache.org/fop>.

#### Building in Git ####

*   GNU `autoconf` of at least version 2.59. Note that `autoconf` is not
    needed when building an unmodified version of the released source.

### Installing ###

*   An `install` program that can take multiple file names.

How to Build and Install Erlang/OTP<commit_msg>Update INSTALL.md with new test platforms<commit_after>Building and Installing Erlang/OTP
==================================

Introduction
------------

This document describes how to build and install Erlang/OTP-%OTP-REL%. You
are advised to read the whole document before attempting to build and install
Erlang/OTP. You can find more information about Open Source Erlang/OTP at:

   <http://www.erlang.org/>

The source code for Erlang/OTP can also be found in a Git repository:

   <http://github.com/erlang/otp>

Erlang/OTP should be possible to build from source on any Unix system,
including Mac OS X. This document describes how to native compile Erlang/OTP
on Unix. For detailed instructions on how to

*   cross compile Erlang/OTP, see the [$ERL_TOP/INSTALL-CROSS.md][]
    document.

*   build Erlang/OTP on Windows, see the [$ERL_TOP/INSTALL-WIN32.md][]
    document.

    Binary releases for Windows can be found at
    <http://www.erlang.org/download.html>.

Before reading the above mentioned documents you are in any case advised to
read this document first, since it covers building Erlang/OTP in general as
well as other important information.

Daily Build and Test
--------------------
At Ericsson we have a "Daily Build and Test" that runs on:

*   Solaris 8, 9
    *   Sparc32
    *   Sparc64
*   Solaris 10
    *   Sparc32
    *   Sparc64
    *   x86
*   SuSE Linux/GNU 9.4, 10.1
    *   x86
*   SuSE Linux/GNU 10.0, 10.1, 11.0
    *   x86
    *   x86\_64
*   openSuSE 11.4 (Celadon)
    *   x86\_64 (valgrind)
*   Fedora 7
    *   PowerPC
*   Fedora 14
    * x86\_64
*   Gentoo Linux/GNU 1.12.11.1
    *   x86
*   Ubuntu Linux/GNU 7.04, 10.04, 10.10, 11.0
    *   x86\_64
*   MontaVista Linux/GNU 4.0.1
    *   PowerPC
*   FreeBSD 8.2
    *   x86
*   OpenBSD 5.0
    *   x86\_64
*   Mac OS X 10.5.8 (Leopard), 10.6.0 (Snow Leopard), 10.7.2 (Lion)
    *   x86
*   Windows XP SP3, 2003, Vista, 7
    *   x86
*   Windows 7
    *   x86\_64

We also have the following "Daily Cross Builds":

*   SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64
*   SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64

and the following "Daily Cross Build Tests":

*   SuSE Linux/GNU 10.1 x86\_64

Versions Known NOT to Work
--------------------------

*   Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
    rpm named `gcc-3.3.3-41`. That version has a serious optimization bug
    that makes it unusable for building the Erlang emulator. Please
    upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
    Enterprise edition 9 (SLES9) has `gcc-3.3.3-43` and is not affected.

*   `gcc-4.3.0` has a serious optimizer bug. It produces an Erlang emulator
    that will crash immediately. The bug is supposed to be fixed in
    `gcc-4.3.1`.

*   FreeBSD had a bug which caused `kqueue`/`poll`/`select` to fail to detect
    that a `writev()` on a pipe has been made. This bug should have been fixed
    in FreeBSD 6.3 and FreeBSD 7.0. NetBSD and DragonFlyBSD probably have or
    have had the same bug. More information can be found at:

    *   <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c>
    *   <http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html>

*   `getcwd()` on Solaris 9 can cause an emulator crash. If you have
    async-threads enabled you can increase the stack size of the
    async-threads as a temporary workaround. See the `+a` command-line
    argument in the documentation of `erl(1)`. Without async-threads the
    emulator is not as vulnerable to this bug, but if you hit it without
    async-threads the only workaround available is to enable async-threads
    and increase the stack size of the async-threads. Sun has however
    released patches that fixes the issue:

    > Problem Description: 6448300 large mnttab can cause stack overrun
    > during Solaris 9 getcwd

    More information can be found at:

    *   <http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-40-1&searchclause=6448300>
    *   <http://sunsolve.sun.com/search/document.do?assetkey=1-21-114432-29-1&searchclause=6448300>

Required Utilities
------------------

These are the tools you will need in order to unpack and build Erlang/OTP.

### Unpacking ###

*   GNU unzip, or a modern uncompress.
*   A TAR program that understands the GNU TAR format for long filenames
    (such as GNU TAR).

### Building ###

*   GNU `make`
*   `gcc` -- GNU C compiler
*   Perl 5
*   GNU `m4` -- If HiPE (native code) support is enabled. HiPE can be
    disabled using `--disable-hipe`
*   `ncurses`, `termcap`, or `termlib` -- The development headers and
    libraries are needed, often known as `ncurses-devel`. Use
    `--without-termcap` to build without any of these libraries. Note that
    in this case only the old shell (without any line editing) can be used.
*   OpenSSL -- Optional, but needed for building the Erlang/OTP applications
    `ssl` and `crypto`. You need the "development package" of OpenSSL, i.e.
    including the header files. For building the application `ssl` the OpenSSL
    binary command program `openssl` is also needed. At least version 0.9.8
    of OpenSSL is required. Can be downloaded from <http://www.openssl.org>.
*   Sun Java jdk-1.5.0 or higher -- Optional but needed for building the
    Erlang/OTP application `jinterface` and parts of `ic` and `orber`. Can
    be downloaded from <http://java.sun.com>. We have also tested IBM's
    JDK 1.5.0.
*   X Windows -- Optional, but development headers and libraries are needed
    to build the Erlang/OTP application `gs` on Unix/Linux.
*  `sed` -- There seem to be some problems with some of the `sed` version on
    Solaris. Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris
    platform.
*   `flex` -- Optional, headers and libraries are needed to build the `flex`
    scanner for the `megaco` application on Unix/Linux.

#### Building Documentation ####

*   `xsltproc` -- XSLT processor. A tool for applying XSLT stylesheets
    to XML documents. Can be downloaded from
    <http://xmlsoft.org/XSLT/xsltproc2.html>.
*   `fop` -- Apache FOP print formatter (requires Java). Can be downloaded
    from <http://xmlgraphics.apache.org/fop>.

#### Building in Git ####

*   GNU `autoconf` of at least version 2.59. Note that `autoconf` is not
    needed when building an unmodified version of the released source.

### Installing ###

*   An `install` program that can take multiple file names.

How to Build and Install Erlang/OTP
{'fraction_non_alphanumeric': 0.10582630427991253, 'fraction_numerical': 0.035770071852546076, 'mean_word_length': 2.866243961352657, 'pattern_counts': {'":': 4, '<': 25, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 4}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5662736', 'n_tokens_mistral': 4411, 'n_tokens_neox': 4024, 'n_words': 1625}