3 Building and Installing Erlang/OTP Table of Contents. This document describes how to build and install Erlang/OTP-R15B03. 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: The source code for Erlang/OTP can also be found in a Git repository: 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 document. build Erlang/OTP on Windows, see the document.
Binary releases for Windows can be found at. 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. $ bin/erl Erlang R15B03 (erts-5.9.3.1) source smp:4:4 rq:4 async-threads:0 kernel-poll:false Eshell V5.9.3.1 (abort with ^G) 1 Installing Step 6 is optional. It installs Erlang/OTP at a standardized location (if you change your mind about where you wish to install you can rerun step 4, without having to do step 5 again).
Alternative Installation Procedures. Staged install using. You can perform the install phase in a temporary directory and later move the installation into its correct location by use of the DESTDIR variable. $ make DESTDIR= install The installation will be created in a location prefixed by $DESTDIR. It can, however, not be run from there. It needs to be moved into the correct location before it can be run. If DESTDIR have not been set but INSTALLPREFIX has been set, DESTDIR will be set to INSTALLPREFIX.
Note that INSTALLPREFIX in pre R13B04 was buggy and behaved as EXTRAPREFIX (see below). There are lots of areas of use for an installation procedure using DESTDIR, e.g. When creating a package, cross compiling, etc. Here is an example where the installation should be located under /opt/local. $./configure -prefix=/opt/local $ make $ make DESTDIR=/tmp/erlang-build install $ cd /tmp/erlang-build/opt/local $ # gnu-tar is used in this example $ tar -zcf /home/me/my-erlang-build.tgz. $ su - Password:.
$ cd /opt/local $ tar -zxf /home/me/my-erlang-build.tgz. Install using the release target. Instead of doing make install you can create the installation in whatever directory you like using the release target and run the Install script yourself. RELEASEROOT is used for specifying the directory where the installation should be created. This is what by default ends up under /usr/local/lib/erlang if you do the install using make install. All installation paths provided in the configure phase are ignored, as well as DESTDIR, and INSTALLPREFIX.
If you want links from a specific bin directory to the installation you have to set those up yourself. An example where Erlang/OTP should be located at /home/me/OTP. $./Install -cross -minimal -sasl where:.minimal Creates an installation that starts up a minimal amount of applications, i.e., only kernel and stdlib are started. The minimal system is normally enough, and is what make install uses.sasl Creates an installation that also starts up the sasl application.cross For cross compilation.
Informs the install script that it is run on the build machine. The absolute path to the Erlang installation to use at run time. This is often the same as the current working directory, but does not have to be.
Erlang For Mac Free
It can follow any other path through the file system to the same directory. If neither -minimal, nor -sasl is passed as argument you will be prompted. Test install using EXTRAPREFIX. The content of the EXTRAPREFIX variable will prefix all installation paths when doing make install. Note that EXTRAPREFIX is similar to DESTDIR, but it does not have the same effect as DESTDIR.
The installation can and have to be run from the location specified by EXTRAPREFIX. That is, it can be useful if you want to try the system out, running test suites, etc, before doing the real install without EXTRAPREFIX. Symbolic Links in -bindir When doing make install and the default installation prefix is used, relative symbolic links will be created from /usr/local/bin to all public Erlang/OTP executables in /usr/local/lib/erlang/bin.
The installation phase will try to create relative symbolic links as long as -bindir and the Erlang bin directory, located under -libdir, both have -exec-prefix as prefix. Where -exec-prefix defaults to -prefix.prefix, -exec-prefix, -bindir, and -libdir are all arguments that can be passed to configure. One can force relative, or absolute links by passing BINDIRSYMLINKS=relative absolute as arguments to make during the install phase. Note that such a request might cause a failure if the request cannot be satisfied. Pre-built Source Release The source release is delivered with a lot of platform independent build results already pre-built. If you want to remove these pre-built files, invoke./otpbuild removeprebuiltfiles from the $ERLTOP directory. After you have done this, you can build exactly the same way as before, but the build process will take a much longer time.
Erlang For Mac Os
Doing make clean in an arbitrary directory of the source tree, may remove files needed for bootstrapping the build. Doing./otpbuild savebootstrap from the $ERLTOP directory before doing make clean will ensure that it will be possible to build after doing make clean./otpbuild savebootstrap will be invoked automatically when make is invoked from $ERLTOP with either the clean target, or the default target. It is also automatically invoked if./otpbuild removeprebuiltfiles is invoked.
Building in Git When building in a Git working directory you also have to have a GNU autoconf of at least version 2.59 on your system, because you need to generate the configure scripts before you can start building. The configure scripts are generated by invoking./otpbuild autoconf in the $ERLTOP directory. The configure scripts also have to be regenerated when a configure.in or aclocal.m4 file has been modified. Note that when checking out a branch a configure.in or aclocal.m4 file may change content, and you may therefore have to regenerate the configure scripts when checking out a branch. Regenerated configure scripts imply that you have to run configure and build again.
Running./otpbuild autoconf is not needed when building an unmodified version of the released source. Other useful information can be found at our github wiki: make and $ERLTOP All the makefiles in the entire directory tree use the environment variable ERLTOP to find the absolute path of the installation. The configure script will figure this out and set it in the top level Makefile (which, when building, it will pass on). However, when developing it is sometimes convenient to be able to run make in a subdirectory. To do this you must set the ERLTOP variable before you run make. For example, assume your GNU make program is called make and you want to rebuild the application STDLIB, then you could do.
$ cd $ gunzip -c otpmanR15B03.tar.gz tar xf - Where is. /lib/erlang if you have installed Erlang/OTP using make install. $DESTDIR/lib/erlang if you have installed Erlang/OTP using make install DESTDIR=. RELEASEROOT if you have installed using make release RELEASEROOT=. An emulator with SMP support will be built by default on most platforms if a usable POSIX thread library or native Windows threads is found.
You can force building of an SMP emulator, by using./configure -enable-smp-support. However, if configure does not automatically enable SMP support, the build is very likely to fail. Use./configure -disable-smp-support if you for some reason do not want to have the emulator with SMP support built. If SMP support is enabled, support for threaded I/O will also be turned on (also in the emulator without SMP support). The erl command will automatically start the SMP emulator if the computer has more than one logical processor. You can force a start of the emulator with SMP support by passing -smp enable as command line arguments to erl, and you can force a start of the emulator without SMP support by passing -smp disable.
GS now Tcl/Tk 8.4. It will be searched for when starting GS. HiPE supports the following system configurations:. x86: All 32-bit and 64-bit mode processors should work. Linux: Fedora Core is supported.
Both 32-bit and 64-bit modes are supported. NPTL glibc is strongly preferred, or a LinuxThreads glibc configured for 'floating stacks'. Old non-floating stacks glibcs have a fundamental problem that makes HiPE support and threads support mutually exclusive. Solaris: Solaris 10 (32-bit and 64-bit) and 9 (32-bit) are supported. The build requires a version of the GNU C compiler (gcc) that has been configured to use the GNU assembler (gas). Sun's x86 assembler is emphatically not supported. FreeBSD: FreeBSD 6.1 and 6.2 in 32-bit and 64-bit modes should work.
MacOSX/Darwin: Darwin 9.8.0 in 32-bit mode should work. PowerPC: All 32-bit 6xx/7xx(G3)/74xx(G4) processors should work.
32-bit mode on 970 (G5) and POWER5 processors should work. Linux (Yellow Dog) and Mac OSX 10.4 are supported. SPARC: All UltraSPARC processors running 32-bit user code should work.
Solaris 9 is supported. The build requires a gcc that has been configured to use Sun's assembler and linker. Using the GNU assembler but Sun's linker has been known to cause problems.
Erlang For Mac Pro
Linux (Aurora) is supported. ARM: ARMv5TE (i.e. XScale) processors should work. Both big-endian and little-endian modes are supported.
Linux is supported. HiPE is automatically enabled on the following systems:.
x86 in 32-bit mode: Linux, Solaris, FreeBSD. x86 in 64-bit mode: Linux, Solaris, FreeBSD. PowerPC: Linux, MacOSX. SPARC: Linux.
ARM: Linux On other supported systems you need to./configure -enable-hipe. If you are running on a platform supporting HiPE and if you have not disabled HiPE, you can compile a module into native code like this from the Erlang shell.
1 hipe:helpoptions. Make sure that the command hostname returns a valid fully qualified host name (this is configured in /etc/hostconfig). If you develop linked-in drivers (shared library) you need to link using gcc and the flags -bundle -flatnamespace -undefined suppress. You also include -fno-common in CFLAGS when compiling. Use.so as the library suffix. Use the -enable-darwin-64bit configure flag to build a 64-bit binaries on Mac OS X.
(This information was written when Mac OS X Leopard was the current release. It may no longer work.) Universal 32bit binaries can be built on an Intel Mac using the -enable-darwin-universal configure option. There still may occur problems with certain applications using this option, but the base system should run smoothly. When building universal binaries on a PowerPC Mac (at least on Tiger), you must point out a suitable SDK that contains universal binaries.
For instance, to build universal binaries for Tiger (10.4). $ export MACOSXDEPLOYMENTTARGET=10.4 Experimental support for 64bit x86 darwin binaries can be enabled using the -enable-darwin-64bit configure flag. The 64bit binaries are best built and run on Leopard, but most of the system also works on Tiger (Tiger's 64bit libraries are, however, limited; therefore e.g. Odbc, crypto, ssl etc. Are not supported in Tiger).
64bit PPC binaries are not supported and we have no plans to add such support (no machines to test on). Universal binaries and 64bit binaries are mutually exclusive options. Starting with Xcode 4.2, Apple no longer includes a 'real' gcc compiler (not based on the LLVM). Building with llvm-gcc or clang will work, but the performance of the Erlang run-time system will not be the best possible. Note that if you have gcc-4.2 installed and included in PATH (from a previous version of Xcode), configure will automatically make sure that gcc-4.2 will be used to compile beamemu.c (the source file most in need of gcc). If you don't have gcc-4.2.
And want to build a run-time system with the best possible performance, do like this: Install Xcode from the AppStore if it is not already installed. If you have Xcode 4.3, or later, you will also need to download 'Command Line Tools' via the Downloads preference pane in Xcode. Some tools may still be lacking or out-of-date, we recommend using or Macports to update those tools. Install MacPorts ( ). $ make $TYPE FLAVOR=$FLAVOR where $TYPE is opt, gcov, gprof, debug, valgrind, or lcnt. These different beam types are useful for debugging and profiling purposes.
Authors are mostly listed in the application's AUTHORS files, that is $ERLTOP/lib/./AUTHORS and $ERLTOP/erts/AUTHORS, not in the individual source files. Copyright Ericsson AB 1998-2012. All Rights Reserved.
The contents of this file are subject to the Erlang Public License, Version 1.1, (the 'License'); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software.
If not, it can be retrieved online at Software distributed under the License is distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. More information can be found at. Before modifying this document you need to have a look at the $ERLTOP/README.md.txt document.