From 876d39cd86446ba0fe79ad20f1d261e5d85d659b Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 8 Jul 2013 17:20:21 +0200 Subject: Refuse to build SMP runtime by default without native atomics Build with fallback can be enabled by passing the `configure` command line argument `--disable-smp-require-native-atomics` --- HOWTO/INSTALL.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 8051bc4393..fa1b9d2e89 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -288,6 +288,14 @@ Some of the available `configure` options are: implementation available, you typically want to try using the `libatomic_ops` library. It can be downloaded from . +* `--disable-smp-require-native-atomics` - By default `configure` will + fail if an SMP runtime system is about to be built, and no implementation + for native atomic memory accesses can be found. If this happens, you are + encouraged to find a native atomic implementation that can be used, e.g., + using `libatomic_ops`, but by passing `--disable-smp-require-native-atomics` + you can build using a fallback implementation based on mutexes or spinlocks. + Performance of the SMP runtime system will however suffer immensely without + an implementation for native atomic memory accesses. If you or your system has special requirements please read the `Makefile` for additional configuration information. -- cgit v1.2.3 From a6e883426efb5b205122e85a4f868647e31206c5 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 19 Aug 2013 11:56:01 +0200 Subject: erts: Document --enable-static-nif/driver --- HOWTO/INSTALL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index fa1b9d2e89..9ea50ce86c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -296,6 +296,18 @@ Some of the available `configure` options are: you can build using a fallback implementation based on mutexes or spinlocks. Performance of the SMP runtime system will however suffer immensely without an implementation for native atomic memory accesses. +* `--enable-static-{nifs,drivers}` - To allow usage of nifs and drivers on OSs + that do not support dynamic linking of libraries it is possible to statically + link nifs and drivers with the main Erlang VM binary. This is done by passing + a comma seperated list to the archives that you want to statically link. e.g. + `--enable-static-nifs=/home/$USER/my_nif.a`. The path has to be absolute and the + name of the archive has to be the same as the module, i.e. `my_nif` in the + example above. This is also true for drivers, but then it is the driver name + that has to be the same as the filename. You also have to define + `STATIC_ERLANG_{NIF,DRIVER}` when compiling the .o files for the nif/driver. + If your nif/driver depends on some other dynamic library, you now have to link + that to the Erlang VM binary. This is easily achived by passing `LIBS=-llibname` + to configure. If you or your system has special requirements please read the `Makefile` for additional configuration information. -- cgit v1.2.3 From 0ed2039a7bef0137c1c6723e0401f96b7bf71de3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 29 Aug 2013 18:04:49 +0200 Subject: Add configure option --without-$app This is used to skip the specified app when building and releasing --- HOWTO/INSTALL.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index fa1b9d2e89..5bde47e1f6 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -296,6 +296,12 @@ Some of the available `configure` options are: you can build using a fallback implementation based on mutexes or spinlocks. Performance of the SMP runtime system will however suffer immensely without an implementation for native atomic memory accesses. +* `--without-$app` - By default all applications in Erlang/OTP will be included + in a release. If this is not wanted it is possible to specify that Erlang/OTP + should be compiled without that applications, i.e. `--without-wx`. There is + no automatic dependency handling inbetween applications. So if you disable + an application that another depends on, you also have to disable the + dependant application. If you or your system has special requirements please read the `Makefile` for additional configuration information. -- cgit v1.2.3 From ded2289a475af4eacb0ad363990282cdac2ede37 Mon Sep 17 00:00:00 2001 From: Jakub Date: Tue, 29 Oct 2013 10:57:42 +0000 Subject: Update INSTALL.md Added info how to generate configure file if building from git. --- HOWTO/INSTALL.md | 1 + 1 file changed, 1 insertion(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 5bde47e1f6..07a8db1a53 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -217,6 +217,7 @@ Step 4: Run the following commands to configure the build: $ ./configure [ options ] +If you are building it from git you will need to run `autoconf` to generate configure file. By default, Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`. To instead install in `/{bin,lib/erlang}`, use the `--prefix=` option. -- cgit v1.2.3 From ab86370cba95339703b3043470da3ee6fec9b360 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 15 Jan 2014 13:05:18 +0100 Subject: Update wx build instsructions for Darwin --- HOWTO/INSTALL.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 07a8db1a53..3dde37bfec 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -63,7 +63,7 @@ At Ericsson we have a "Daily Build and Test" that runs on: * x86 * OpenBSD 5.0 * x86\_64 -* Mac OS X 10.5.8 (Leopard), 10.6.0 (Snow Leopard), 10.7.3 (Lion) +* Mac OS X 10.5.8 (Leopard), 10.7.3 (Lion), 10.9 (Mavericks) * x86 * Windows XP SP3, 2003, Vista, 7 * x86 @@ -703,17 +703,18 @@ Install MacPorts (). Then: ### Building with wxErlang ### -If you want to build the `wx` application, you will need to get wxWidgets-2.9.4 (or later) -(`wxWidgets-2.9.4.tar.bz2` from ) +If you want to build the `wx` application, you will need to get wxWidgets-3.0 (or later) +(`wxWidgets-3.0.0.tar.bz2` from ) or get it from github: $ git clone git@github.com:wxWidgets/wxWidgets.git -Be aware that the wxWidgets-2.9 branch is a development branch of wxWidgets and the MacOsX -port still lags behind the other ports. +Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured +as the old releases and the MacOsX port still lags behind the other ports. -Configure and build wxMac: +Configure and build wxWidgets: - $ ./configure --with-cocoa --prefix=/usr/local + $ ./configure --with-cocoa --prefix=/usr/local + % Optional version and static libs: --with-macosx-version-min=10.9 --disable-shared $ make $ sudo make install $ export PATH=/usr/local/bin:$PATH @@ -724,12 +725,11 @@ Check that you got the correct wx-config ### Finish up ### -Build Erlang with the MacPorts GCC as the main compiler (using `clang` -for the Objective-C Cocoa code in the `wx` application): +Build Erlang $ export PATH=/usr/local/bin:$PATH $ cd $ERL_TOP - $ CC=/opt/local/bin/gcc-mp-4.5 CXX=/opt/local/bin/g++-mp-4.5 ./configure --enable-darwin-64bit + $ ./configure --enable-shared-zlib $ make $ sudo make install -- cgit v1.2.3 From a696ae0b0f801303e425f05da411c06e6d9045e8 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 27 Jan 2014 15:07:25 +0100 Subject: Fix MacOSX build instructions Remove confusing and obsolete build instructions for Lion. --- HOWTO/INSTALL.md | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 92d6737278..0d5ae3cfbe 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -680,39 +680,11 @@ If you develop linked-in drivers (shared library) you need to link using 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. +Install `Xcode` from the `AppStore` if it is not already installed. -Building a fast Erlang VM on Mac OS Lion ----------------------------------------- - -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 `beam_emu.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 +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 -[Homebrew](https://github.com/mxcl/homebrew/wiki/installation) or -Macports to update those tools. - -Install MacPorts (). Then: - - $ sudo port selfupdate - $ sudo port install gcc45 +universal - ### Building with wxErlang ### If you want to build the `wx` application, you will need to get wxWidgets-3.0 (or later) @@ -720,13 +692,14 @@ If you want to build the `wx` application, you will need to get wxWidgets-3.0 (o or get it from github: $ git clone git@github.com:wxWidgets/wxWidgets.git -Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured +Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured as the old releases and the MacOsX port still lags behind the other ports. -Configure and build wxWidgets: +Configure and build wxWidgets (on Mavericks - 10.9): - $ ./configure --with-cocoa --prefix=/usr/local - % Optional version and static libs: --with-macosx-version-min=10.9 --disable-shared + $ ./configure --with-cocoa --prefix=/usr/local + or without support for old versions and with static libs + $ ./configure --with-cocoa --prefix=/usr/local --with-macosx-version-min=10.9 --disable-shared $ make $ sudo make install $ export PATH=/usr/local/bin:$PATH @@ -791,7 +764,7 @@ Copyright and License %CopyrightBegin% -Copyright Ericsson AB 1998-2013. All Rights Reserved. +Copyright Ericsson AB 1998-2014. 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 -- cgit v1.2.3 From c1c03ae4ee50e58b7669ea88ec4d29c6b2b67c7b Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Thu, 9 Jan 2014 21:22:45 -0500 Subject: initial support for dirty schedulers and dirty NIFs Add initial support for dirty schedulers. There are two types of dirty schedulers: CPU schedulers and I/O schedulers. By default, there are as many dirty CPU schedulers as there are normal schedulers and as many dirty CPU schedulers online as normal schedulers online. There are 10 dirty I/O schedulers (similar to the choice of 10 as the default for async threads). By default, dirty schedulers are disabled and conditionally compiled out. To enable them, you must pass --enable-dirty-schedulers to the top-level configure script when building Erlang/OTP. Current dirty scheduler support requires the emulator to be built with SMP support. This restriction will be lifted in the future. You can specify the number of dirty schedulers with the command-line options +SDcpu (for dirty CPU schedulers) and +SDio (for dirty I/O schedulers). The +SDcpu option is similar to the +S option in that it takes two numbers separated by a colon: C1:C2, where C1 specifies the number of dirty schedulers available and C2 specifies the number of dirty schedulers online. The +SDPcpu option allows numbers of dirty CPU schedulers available and dirty CPU schedulers online to be specified as percentages, similar to the existing +SP option for normal schedulers. The number of dirty CPU schedulers created and dirty CPU schedulers online may not exceed the number of normal schedulers created and normal schedulers online, respectively. The +SDio option takes only a single number specifying the number of dirty I/O schedulers available and online. There is no support yet for programmatically changing at run time the number of dirty CPU schedulers online via erlang:system_flag/2. Also, changing the number of normal schedulers online via erlang:system_flag(schedulers_online, NewSchedulersOnline) should ensure that there are no more dirty CPU schedulers than normal schedulers, but this is not yet implemented. You can retrieve the number of dirty schedulers by passing dirty_cpu_schedulers, dirty_cpu_schedulers_online, or dirty_io_schedulers to erlang:system_info/1. Currently only NIFs are able to access dirty scheduler functionality. Neither drivers nor BIFs currently support dirty schedulers. This restriction will be addressed in the future. If dirty scheduler support is present in the runtime, the initial status line Erlang prints before presenting its interactive prompt will include the indicator "[ds:C1:C2:I]" where "ds" indicates "dirty schedulers", "C1" indicates the number of dirty CPU schedulers available, "C2" indicates the number of dirty CPU schedulers online, and "I" indicates the number of dirty I/O schedulers. Document The dirty NIF API in the erl_nif man page. The API closely follows Rickard Green's presentation slides from his talk "Future Extensions to the Native Interface", presented at the 2011 Erlang Factory held in the San Francisco Bay Area. Rickard's slides are available online at http://bit.ly/1m34UHB . Document the new erl command-line options, the additions to erlang:system_info/1, and also add the erlang:system_flag/2 dirty scheduler documentation even though it's not yet implemented. To determine whether the dirty NIF API is available, native code can check to see whether the C preprocessor macro ERL_NIF_DIRTY_SCHEDULER_SUPPORT is defined. To check if dirty schedulers are available at run time, native code can call the boolean enif_have_dirty_schedulers() function, and Erlang code can call erlang:system_info(dirty_cpu_schedulers), which raises badarg if no dirty scheduler support is available. Add a simple dirty NIF test to the emulator NIF suite. --- HOWTO/INSTALL.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 92d6737278..fe46cdfbb2 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -315,6 +315,11 @@ Some of the available `configure` options are: no automatic dependency handling inbetween applications. So if you disable an application that another depends on, you also have to disable the dependant application. +* `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers + functionality. Note that the dirty schedulers functionality is experimental, + and **not supported**. This functionality **will** be subject to backward + incompatible changes. Note that you should **not** enable the dirty scheduler + functionality on production systems. It is only provided for testing. If you or your system has special requirements please read the `Makefile` for additional configuration information. -- cgit v1.2.3 From 8401c39c6529ecda43213b31b0288dae2fc2cc62 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 29 Jan 2014 18:07:58 +0100 Subject: Minor update of INSTALL.md --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 702c949297..533960ef99 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -332,7 +332,7 @@ Erlang/OTP system which you can try by typing `bin/erl`. This should start up Erlang/OTP and give you a prompt: $ bin/erl - Erlang %OTP-REL% (erts-%ERTS-VSN%) [source] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false] + Erlang/OTP %OTP-REL% [erts-%ERTS-VSN%] [source] [smp:4:4] [async-threads:0] [kernel-poll:false] Eshell V%ERTS-VSN% (abort with ^G) 1> _ -- cgit v1.2.3 From 3fd4e3e770fbed95fd6fa2d547945ac71256339c Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sun, 16 Feb 2014 00:54:08 +0100 Subject: Misc adjustments of OTP version --- HOWTO/INSTALL.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 533960ef99..2a4abedfcf 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -189,16 +189,16 @@ section below before proceeding. Step 1: Start by unpacking the Erlang/OTP distribution file with your GNU compatible TAR program. - $ gunzip -c otp_src_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_src_%OTP-VSN%.tar.gz | tar xf - alternatively: - $ zcat otp_src_%OTP-REL%.tar.gz | tar xf - + $ zcat otp_src_%OTP-VSN%.tar.gz | tar xf - Step 2: Now cd into the base directory (`$ERL_TOP`). - $ cd otp_src_%OTP-REL% + $ cd otp_src_%OTP-VSN% ### Configuring ### @@ -553,13 +553,13 @@ For some graphical tools to find the on-line help you have to install the HTML documentation on top of the installed OTP applications, i.e. $ cd - $ gunzip -c otp_html_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_html_%OTP-VSN%.tar.gz | tar xf - For `erl -man ` to work the Unix manual pages have to be installed in the same way, i.e. $ cd - $ gunzip -c otp_man_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_man_%OTP-VSN%.tar.gz | tar xf - Where `` is @@ -803,9 +803,9 @@ Before modifying this document you need to have a look at the [Building in Git]: #How-to-Build-and-Install-ErlangOTP_Building-in-Git [Pre-built Source Release]: #How-to-Build-and-Install-ErlangOTP_Prebuilt-Source-Release [make and $ERL_TOP]: #How-to-Build-and-Install-ErlangOTP_make-and-ERLTOP - [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-REL%.tar.gz - [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-REL%.tar.gz - [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-REL%.tar.gz + [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-VSN%.tar.gz + [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-VSN%.tar.gz + [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-VSN%.tar.gz [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md [?TOC]: true -- cgit v1.2.3 From f51da9be40b578cdf386264312eb9b37d18ce778 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 14 Feb 2014 22:57:37 +0100 Subject: Build documentation with bootstrap system Enables build of documentation in source trees that has been cross built --- HOWTO/INSTALL.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 2a4abedfcf..c9f4062b83 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -500,21 +500,11 @@ The Erlang/OTP Documentation ### How to Build the Documentation ### - $ cd $ERL_TOP - -If you have just built Erlang/OTP in the current source tree, you have -already ran `configure` and do not need to do this again; otherwise, run -`configure`. - - $ ./configure [Configure Args] - -When building the documentation you need a full Erlang/OTP-%OTP-REL% system in -the `$PATH`. - - $ export PATH=:$PATH # Assuming bash/sh - -Build the documentation. +Before you can build the documentation you need to either [native build][] +or [cross build][] the Erlang/OTP system. After this you can build the +documentation as follows. + $ cd $ERL_TOP $ make docs The documentation can be installed either using the `install-docs` target, @@ -806,6 +796,8 @@ Before modifying this document you need to have a look at the [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-VSN%.tar.gz [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-VSN%.tar.gz [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-VSN%.tar.gz + [native build]: #How-to-Build-and-Install-ErlangOTP + [cross build]: INSTALL-CROSS.md [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md [?TOC]: true -- cgit v1.2.3 From b2017b91a5572f7bc2caf15082b4b105f3a3e21d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sun, 23 Feb 2014 20:04:30 +0100 Subject: Introduce configure option --with-assumed-cache-line-size=SIZE --- HOWTO/INSTALL.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index c9f4062b83..fb18676699 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -274,6 +274,11 @@ Some of the available `configure` options are: `(g)cc` * `--enable-m32-build` - Build 32-bit binaries using the `-m32` flag to `(g)cc` +* `--with-assumed-cache-line-size=SIZE` - Set assumed cache-line size in + bytes. Default is 64. Valid values are powers of two between and + including 16 and 8192. The runtime system use this value in order to + try to avoid false sharing. A too large value wastes memory. A to + small value will increase the amount of false sharing. * `--{with,without}-termcap` - termcap (without implies that only the old Erlang shell can be used) * `--with-javac=JAVAC` - Specify Java compiler to use -- cgit v1.2.3 From c7ddafbe6dbcc805a9758c4313f2d6b902983343 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 21 Feb 2014 09:29:40 +0100 Subject: Always default to disabled floating point exceptions on Linux This since there exist unresolved stability issues in the implementation for Linux. --- HOWTO/INSTALL.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 533960ef99..fd0108f1de 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -268,6 +268,11 @@ Some of the available `configure` options are: default if possible) * `--{enable,disable}-hipe` - HiPE support (enabled by default on supported platforms) +* `--{enable,disable}-fp-exceptions` - Floating point exceptions (an + optimization for floating point operations). The default differs + depending on operating system and hardware platform. Note that by + enabling this you might get a seemingly working system that sometimes + fail on floating point operations. * `--enable-darwin-universal` - Build universal binaries on darwin i386. * `--enable-darwin-64bit` - Build 64-bit binaries on darwin * `--enable-m64-build` - Build 64-bit binaries using the `-m64` flag to @@ -288,7 +293,7 @@ Some of the available `configure` options are: memory accesses. If `configure` should inform you about no native atomic implementation available, you typically want to try using the `libatomic_ops` library. It can be downloaded from - . + . * `--disable-smp-require-native-atomics` - By default `configure` will fail if an SMP runtime system is about to be built, and no implementation for native atomic memory accesses can be found. If this happens, you are -- cgit v1.2.3 From 0478647b0e5862db82c040d1f15012ec089b6d2f Mon Sep 17 00:00:00 2001 From: Sage Imel Date: Wed, 12 Mar 2014 16:42:59 -0700 Subject: Update compile instructions when compiling from git Updating to reflect the instructions found on the mailing list. http://erlang.org/pipermail/erlang-questions/2012-April/066184.html --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index bbde5bc08c..368947b36c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -217,7 +217,7 @@ Step 4: Run the following commands to configure the build: $ ./configure [ options ] -If you are building it from git you will need to run `autoconf` to generate configure file. +If you are building it from git you will need to run `./otp_build autoconf` to generate configure file. By default, Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`. To instead install in `/{bin,lib/erlang}`, use the `--prefix=` option. -- cgit v1.2.3 From 107b27ef809e4356ea258cbd820967ffb8fa0875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Lid=C3=A9n?= Date: Mon, 24 Feb 2014 09:23:29 +0100 Subject: Correct and clean up documentation The build and install documentation was not complete and needed some restructuring. --- HOWTO/INSTALL.md | 891 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 469 insertions(+), 422 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 368947b36c..f1bb8ec853 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -4,174 +4,109 @@ 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: +This document describes how to build and install Erlang/OTP-%OTP-REL%. +Erlang/OTP should be possible to build from source on any Unix/Linux system, +including OS X. You are advised to read the whole document +before attempting to build and install Erlang/OTP. - +The source code can be downloaded from the official site of Erlang/OTP or GitHub. +* +* -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 [$ERL_TOP/HOWTO/INSTALL-CROSS.md][] - document. - -* build Erlang/OTP on Windows, see the [$ERL_TOP/HOWTO/INSTALL-WIN32.md][] - document. - - Binary releases for Windows can be found at - . +Required Utilities +------------------ -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. +These are the tools you need in order to unpack and build Erlang/OTP. -Daily Build and Test --------------------- -At Ericsson we have a "Daily Build and Test" that runs on: +> *WARNING*: Please have a look at the [Known platform issues][] chapter +> before you start. -* 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.7.3 (Lion), 10.9 (Mavericks) - * x86 -* Windows XP SP3, 2003, Vista, 7 - * x86 -* Windows 7 - * x86\_64 +### Unpacking ### -We also have the following "Daily Cross Builds": +* GNU unzip, or a modern uncompress. +* A TAR program that understands the GNU TAR format for long filenames. -* SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64 -* SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64 +### Building ### -and the following "Daily Cross Build Tests": +* GNU `make` +* Compiler -- GNU C Compiler, `gcc` or the C compiler frontend for LLVM, `clang`. +* 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. +* `sed` -- Stream Editor for basic text transformation. -* SuSE Linux/GNU 10.1 x86\_64 +#### Building in Git #### -Versions Known NOT to Work --------------------------- +* GNU `autoconf` of at least version 2.59. Note that `autoconf` is not + needed when building an unmodified version of the released source. -* 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. +#### Building on OS X #### -* `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`. +* Xcode -- Download and install via the Mac App Store. + Read about [Building on a Mac][] before proceeding. -* 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: +### Installing ### - * - * +* An `install` program that can take multiple file names. -* `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 +Optional Utilities +------------------ - More information can be found at: +Some applications are automatically skipped if the dependencies aren't met. +Here is a list of utilities needed for those applications. You will +also find the utilities needed for building the documentation. - * - * +### Building ### -Required Utilities ------------------- +* OpenSSL -- The opensource toolkit for Secure Socket Layer + and Transport Layer Security. + Required for building the application `crypto`. + Further, `ssl` and `ssh` require a working crypto application and + will also be skipped if OpenSSL is missing. The `public_key` + application will available without `crypto`, but the functionality + will be very limited. + + The development package of OpenSSL including the header files are needed as well + as the binary command program `openssl`. At least version 0.9.8 of OpenSSL is required. + Read more and download from . +* Oracle Java SE JDK -- The Java Development Kit (Standard Edition). + Required for building the application `jinterface` and parts of `ic` and `orber`. + At least version 1.5.0 of the JDK is required. + + Download from . + We have also tested with IBM's JDK 1.5.0. +* X Windows -- Development headers and libraries are needed + to build the Erlang/OTP application `gs` on Unix/Linux. +* `flex` -- Headers and libraries are needed to build the flex + scanner for the `megaco` application on Unix/Linux. +* wxWidgets -- Toolkit for GUI applications. + Required for building the `wx` application. At least + version 3.0 of wxWidgets is required. -These are the tools you will need in order to unpack and build Erlang/OTP. + Download from + or get it from GitHub: -### Unpacking ### + Further instructions on wxWidgets, read [Building with wxErlang][]. -* 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 . -* 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 . 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 ### -#### Building Documentation #### +* `xsltproc` -- A command line XSLT processor. -* `xsltproc` -- XSLT processor. A tool for applying XSLT stylesheets - to XML documents. Can be downloaded from + A tool for applying XSLT stylesheets + to XML documents. Download xsltproc from . + * `fop` -- Apache FOP print formatter (requires Java). Can be downloaded from . -#### 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 ----------------------------------- @@ -186,65 +121,205 @@ section below before proceeding. ### Unpacking ### -Step 1: Start by unpacking the Erlang/OTP distribution file with your GNU +Start by unpacking the Erlang/OTP distribution file with your GNU compatible TAR program. - $ gunzip -c otp_src_%OTP-VSN%.tar.gz | tar xf - - -alternatively: - - $ zcat otp_src_%OTP-VSN%.tar.gz | tar xf - + $ tar -zxf otp_src_%OTP-VSN%.tar.gz # Assuming bash/sh - -Step 2: Now cd into the base directory (`$ERL_TOP`). +Now change directory into the base directory and set the `$ERL_TOP` variable. $ cd otp_src_%OTP-VSN% + $ export ERL_TOP=`pwd` # Assuming bash/sh ### Configuring ### -Step 3: On some platforms Perl may behave strangely if certain locales are -set, so optionally you may need to set the LANG variable: +Run the following commands to configure the build: - # Bourne shell - $ LANG=C; export LANG + $ ./configure [ options ] -or +> *NOTE*: If you are building Erlang/OTP from git you will need to run `./otp_build autoconf` to generate +> the configure scripts. - # C-Shell - $ setenv LANG C +By default, Erlang/OTP release will be installed in `/usr/local/{bin,lib/erlang}`. +If you for instance don't have the permission to install in the standard location, + you can install Erlang/OTP somewhere else. For example, to install in +`/opt/erlang/%OTP-VSN%/{bin,lib/erlang}`, use the `--prefix=/opt/erlang/%OTP-VSN%` option. -Step 4: Run the following commands to configure the build: +On some platforms Perl may behave strangely if certain locales are +set. If you get errors when building, try setting the LANG variable: - $ ./configure [ options ] + $ export LANG=C # Assuming bash/sh -If you are building it from git you will need to run `./otp_build autoconf` to generate configure file. -By default, Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`. -To instead install in `/{bin,lib/erlang}`, use the -`--prefix=` option. - -If you upgraded the source with some patch you may need to clean up -from previous builds before the new build. Before doing a `make clean`, -be sure to read the [Pre-built Source Release][] section below. ### Building ### -Step 5: Build the Erlang/OTP package. +Build the Erlang/OTP release. $ make + +### Testing ### + +Before installation you should test whether your build is working properly +by running our smoke test. The smoke test is a subset of the complete Erlang/OTP test suites. +First you will need to build and release the test suites. + + $ make release_tests + +This creates an additional folder in `$ERL_TOP/release` called `tests`. +Now, it's time to start the smoke test. + + $ cd release/tests/test_server + $ $ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop + +To verify that everything is ok you should open `$ERL_TOP/release/tests/test_server/index.html` +in your web browser and make sure that there are zero failed test cases. + +> *NOTE*: On builds without `crypto`, `ssl` and `ssh` there is a failed test case +> for undefined functions. Verify that the failed test case log only shows calls +> to skipped applications. + ### Installing ### -Step 6: Install then Erlang/OTP package +You are now ready to install the Erlang/OTP release! +The following command will install the release on your system. $ make install -### A Closer Look at the individual Steps ### -Let us go through them in some detail. +### Running ### + +You should now have a working release of Erlang/OTP! +Jump to [System Principles][] for instructions on running Erlang/OTP. + + +### How to Build the Documentation ### + +Make sure you're in the top directory in the source tree. + + $ cd $ERL_TOP + +If you have just built Erlang/OTP in the current source tree, you have +already ran `configure` and do not need to do this again; otherwise, run +`configure`. + + $ ./configure [Configure Args] + +When building the documentation you need a full Erlang/OTP-%OTP-VSN% system in +the `$PATH`. + + $ export PATH=$ERL_TOP/bin:$PATH # Assuming bash/sh + +Build the documentation. + + $ make docs + +#### Build Issues #### + +We have sometimes experienced problems with Oracle's `java` running out of +memory when running `fop`. Increasing the amount of memory available +as follows has in our case solved the problem. + + $ export FOP_OPTS="-Xmxm" + +More information can be found at +* . + + +### How to Install the Documentation ### + +The documentation can be installed either using the `install-docs` target, +or using the `release_docs` target. + +* If you have installed Erlang/OTP using the `install` target, install + the documentation using the `install-docs` target. Install locations + determined by `configure` will be used. `$DESTDIR` can be used the + same way as when doing `make install`. + + $ make install-docs + +* If you have installed Erlang/OTP using the `release` target, install + the documentation using the `release_docs` target. You typically want + to use the same `RELEASE_ROOT` as when invoking `make release`. + + $ make release_docs RELEASE_ROOT= -#### Configuring #### -Step 4 runs a configuration script created by the GNU autoconf utility, which +### Accessing the Documentation ### + +After installation you can access the documentation by + +* Reading man pages. Make sure that `erl` is referring to the + installed version. For example `/usr/local/bin/erl`. + Try viewing at the man page for Mnesia + + $ erl -man mnesia + +* Browsing the html pages by loading the page `/usr/local/lib/erlang/doc/erlang/index.html` + or `/lib/erlang/doc/erlang/index.html` if the prefix option has been used. + + +### How to Install the Pre-formatted Documentation ### + +Pre-formatted [html documentation][] and [man pages][] can be downloaded from +* . + +Extract the html archive in the installation directory. + + $ cd + $ tar -zxf otp_html_%OTP-VSN%.tar.gz + +For `erl -man ` to work the Unix manual pages have to be +installed in the same way, i.e. + + $ cd + $ tar -zxf otp_man_%OTP-VSN%.tar.gz + +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=`. +* `RELEASE_ROOT` if you have installed using + `make release RELEASE_ROOT=`. + + +Advanced configuration and build of Erlang/OTP +---------------------------------------------- + +If you want to tailor your Erlang/OTP build and installation, please read +on for detailed information about the individual steps. + +### make and $ERL\_TOP ### + +All the makefiles in the entire directory tree use the environment +variable `ERL_TOP` 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 `ERL_TOP` 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 lib/stdlib; env ERL_TOP= make + +where `` would be what you find `ERL_TOP` is set to in the top level +Makefile. + +### otp\_build vs configure/make ### + +Building Erlang/OTP can be done either by using the `$ERL_TOP/otp_build` +script, or by invoking `$ERL_TOP/configure` and `make` directly. Building using +`otp_build` is easier since it involves fewer steps, but the `otp_build` build +procedure is not as flexible as the `configure`/`make` build procedure. The binary +releases for Windows that we deliver are built using `otp_build`. + +### Configuring ### + +The configure script is created by the GNU autoconf utility, which checks for system specific features and then creates a number of makefiles. The configure script allows you to customize a number of parameters; @@ -260,10 +335,10 @@ use the `--prefix` argument like this: `./configure --prefix=`. Some of the available `configure` options are: * `--prefix=PATH` - Specify installation prefix. -* `--{enable,disable}-threads` - Thread support (enabled by default if - possible) + +* `--{enable,disable}-threads` - Thread support. This is enabled by default if possible. * `--{enable,disable}-smp-support` - SMP support (enabled by default if - possible) + a usable POSIX thread library or native Windows threads is found) * `--{enable,disable}-kernel-poll` - Kernel poll support (enabled by default if possible) * `--{enable,disable}-hipe` - HiPE support (enabled by default on supported @@ -321,9 +396,9 @@ Some of the available `configure` options are: to configure. * `--without-$app` - By default all applications in Erlang/OTP will be included in a release. If this is not wanted it is possible to specify that Erlang/OTP - should be compiled without that applications, i.e. `--without-wx`. There is - no automatic dependency handling inbetween applications. So if you disable - an application that another depends on, you also have to disable the + should be compiled without one or more applications, i.e. `--without-wx`. There is + no automatic dependency handling between applications. If you disable + an application that another application depends on, you also have to disable the dependant application. * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers functionality. Note that the dirty schedulers functionality is experimental, @@ -331,29 +406,136 @@ Some of the available `configure` options are: incompatible changes. Note that you should **not** enable the dirty scheduler functionality on production systems. It is only provided for testing. -If you or your system has special requirements please read the `Makefile` for -additional configuration information. +If you or your system has special requirements please read the `Makefile` for +additional configuration information. + + +### Building ### + +Building Erlang/OTP on a relatively fast computer takes approximately +5 minutes. To speed it up, you can utilize parallel make with the `-j` option. + + $ export MAKEFLAGS=-j8 # Assuming bash/sh + $ make + +If you've upgraded the source with a patch you may need to clean up from previous +builds before the new build. +Make sure to read the [Pre-built Source Release][] section below before doing a `make clean`. + +#### Within 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 `./otp_build autoconf` in +the `$ERL_TOP` 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. + +> *NOTE*: Running `./otp_build autoconf` is **not** needed when building +> an unmodified version of the released source. + +Other useful information can be found at our GitHub wiki: +* + +#### OS X (Darwin) #### + +Make sure that the command `hostname` returns a valid fully qualified host +name (this is configured in `/etc/hostconfig`). Otherwise you might experience +problems when running distributed systems. + +If you develop linked-in drivers (shared library) you need to link using +`gcc` and the flags `-bundle -flat_namespace -undefined suppress`. You also +include `-fno-common` in `CFLAGS` when compiling. Use `.so` as the library +suffix. + +If you have Xcode 4.3, or later, you will also need to download +"Command Line Tools" via the Downloads preference pane in Xcode. + +#### Building with wxErlang #### + +Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured +as the old releases and the OS X port still lags behind the other ports. + +Configure and build wxWidgets (on Mavericks - 10.9): + + $ ./configure --with-cocoa --prefix=/usr/local + or without support for old versions and with static libs + $ ./configure --with-cocoa --prefix=/usr/local --with-macosx-version-min=10.9 --disable-shared + $ make + $ sudo make install + $ export PATH=/usr/local/bin:$PATH + +Check that you got the correct wx-config + + $ which wx-config && wx-config --version-full + +Build Erlang/OTP + + $ export PATH=/usr/local/bin:$PATH + $ cd $ERL_TOP + $ ./configure --enable-shared-zlib + $ make + $ sudo make install + + +#### 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 `./otp_build remove_prebuilt_files` from the `$ERL_TOP` +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. + +> *WARNING*: Doing `make clean` in an arbitrary directory of the source +> tree, may remove files needed for bootstrapping the build. +> +> Doing `./otp_build save_bootstrap` from the `$ERL_TOP` directory before +> doing `make clean` will ensure that it will be possible to build after +> doing `make clean`. `./otp_build save_bootstrap` will be invoked +> automatically when `make` is invoked from `$ERL_TOP` with either the +> `clean` target, or the default target. It is also automatically invoked +> if `./otp_build remove_prebuilt_files` is invoked. + +#### How to Build a Debug Enabled Erlang RunTime System #### + +After completing all the normal building steps described above a debug +enabled runtime system can be built. To do this you have to change +directory to `$ERL_TOP/erts/emulator`. + +In this directory execute: + + $ make debug FLAVOR=$FLAVOR + +where `$FLAVOR` is either `plain` or `smp`. The flavor options will +produce a beam.debug and beam.smp.debug executable respectively. The +files are installed along side with the normal (opt) versions `beam.smp` +and `beam`. + +To start the debug enabled runtime system execute: -#### Building #### + $ $ERL_TOP/bin/cerl -debug -Step 5 builds the Erlang/OTP system. On a fast computer, this will take about -5 minutes. After completion of this step, you should have a working -Erlang/OTP system which you can try by typing `bin/erl`. This should start -up Erlang/OTP and give you a prompt: +The debug enabled runtime system features lock violation checking, +assert checking and various sanity checks to help a developer ensure +correctness. Some of these features can be enabled on a normal beam +using appropriate configure options. - $ bin/erl - Erlang/OTP %OTP-REL% [erts-%ERTS-VSN%] [source] [smp:4:4] [async-threads:0] [kernel-poll:false] +There are other types of runtime systems that can be built as well +using the similar steps just described. - Eshell V%ERTS-VSN% (abort with ^G) - 1> _ + $ make $TYPE FLAVOR=$FLAVOR -#### Installing #### +where `$TYPE` is `opt`, `gcov`, `gprof`, `debug`, `valgrind`, or `lcnt`. +These different beam types are useful for debugging and profiling +purposes. -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 ##### +### Installing ### * Staged install using [DESTDIR][]. You can perform the install phase in a temporary directory and later move the installation into @@ -435,7 +617,7 @@ without having to do step 5 again). if you want to try the system out, running test suites, etc, before doing the real install without `EXTRA_PREFIX`. -### Symbolic Links in --bindir ### +#### 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 @@ -449,156 +631,10 @@ passed to `configure`. One can force relative, or absolute links by passing 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 `./otp_build remove_prebuilt_files` from the `$ERL_TOP` -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. - -> *WARNING*: Doing `make clean` in an arbitrary directory of the source -> tree, may remove files needed for bootstrapping the build. -> -> Doing `./otp_build save_bootstrap` from the `$ERL_TOP` directory before -> doing `make clean` will ensure that it will be possible to build after -> doing `make clean`. `./otp_build save_bootstrap` will be invoked -> automatically when `make` is invoked from `$ERL_TOP` with either the -> `clean` target, or the default target. It is also automatically invoked -> if `./otp_build remove_prebuilt_files` 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 `./otp_build autoconf` in -the `$ERL_TOP` 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. - -> *NOTE*: Running `./otp_build 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 $ERL\_TOP ### - -All the makefiles in the entire directory tree use the environment -variable `ERL_TOP` 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 `ERL_TOP` 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 lib/stdlib; env ERL_TOP= make - -where `` would be what you find `ERL_TOP` is set to in the top level -Makefile. - -The Erlang/OTP Documentation ----------------------------- - -### How to Build the Documentation ### - -Before you can build the documentation you need to either [native build][] -or [cross build][] the Erlang/OTP system. After this you can build the -documentation as follows. - - $ cd $ERL_TOP - $ make docs - -The documentation can be installed either using the `install-docs` target, -or using the `release_docs` target. - -* If you have installed Erlang/OTP using the `install` target, install - the documentation using the `install-docs` target. Install locations - determined by `configure` will be used. `$DESTDIR` can be used the - same way as when doing `make install`. - - $ make install-docs - -* If you have installed Erlang/OTP using the `release` target, install - the documentation using the `release_docs` target. You typically want - to use the same `RELEASE_ROOT` as when invoking `make release`. - - $ make release_docs RELEASE_ROOT= - -#### Build Issues #### - -We have sometimes experienced problems with Sun's `java` running out of -memory when running `fop`. Increasing the amount of memory available -as follows has in our case solved the problem. - - $ export FOP_OPTS="-Xmxm" - -More information can be found at -. - -### How to Install the Pre-formatted Documentation ### - -Pre-formatted [html documentation][] and [man pages][] can be downloaded at -. - -For some graphical tools to find the on-line help you have to install -the HTML documentation on top of the installed OTP applications, i.e. - - $ cd - $ gunzip -c otp_html_%OTP-VSN%.tar.gz | tar xf - - -For `erl -man ` to work the Unix manual pages have to be -installed in the same way, i.e. - - $ cd - $ gunzip -c otp_man_%OTP-VSN%.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=`. -* `RELEASE_ROOT` if you have installed using - `make release RELEASE_ROOT=`. - -Support for SMP (Symmetric Multi Processing) --------------------------------------------- -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. +### Running ### -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 (Graphic System) -------------------- - -GS now Tcl/Tk 8.4. It will be searched for when starting GS. - -Using HiPE ----------- +#### Using HiPE #### HiPE supports the following system configurations: @@ -619,12 +655,12 @@ HiPE supports the following system configurations: * 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. + * OS X/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. + * Linux (Yellow Dog) and OS X 10.4 are supported. * SPARC: All UltraSPARC processors running 32-bit user code should work. @@ -643,11 +679,11 @@ 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 +* PowerPC: Linux, Mac OSX * SPARC: Linux * ARM: Linux -On other supported systems you need to `./configure --enable-hipe`. +On other supported systems, see [Advanced Configure][] on how to 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 @@ -659,7 +695,7 @@ or 1> c(Module, [native|OtherOptions]). -Using the erlc program, write like this: +Using the erlc program, write like this $ erlc +native Module.erl @@ -674,88 +710,103 @@ Use `hipe:help_options/0` to print out the available options. 1> hipe:help_options(). -Mac OS X (Darwin) ------------------ - -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 -flat_namespace -undefined suppress`. You also -include `-fno-common` in `CFLAGS` when compiling. Use `.so` as the library -suffix. - -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. - -### Building with wxErlang ### +#### Running with GS #### -If you want to build the `wx` application, you will need to get wxWidgets-3.0 (or later) -(`wxWidgets-3.0.0.tar.bz2` from ) -or get it from github: - $ git clone git@github.com:wxWidgets/wxWidgets.git - -Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured -as the old releases and the MacOsX port still lags behind the other ports. +The `gs` application requires the GUI toolkit Tcl/Tk to run. At least +version 8.4 is required. -Configure and build wxWidgets (on Mavericks - 10.9): - $ ./configure --with-cocoa --prefix=/usr/local - or without support for old versions and with static libs - $ ./configure --with-cocoa --prefix=/usr/local --with-macosx-version-min=10.9 --disable-shared - $ make - $ sudo make install - $ export PATH=/usr/local/bin:$PATH +Known platform issues +--------------------- -Check that you got the correct wx-config +* 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. - $ which wx-config +* `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`. -### Finish up ### +* 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: -Build Erlang + * + * - $ export PATH=/usr/local/bin:$PATH - $ cd $ERL_TOP - $ ./configure --enable-shared-zlib - $ make - $ sudo make install +* `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. Oracle has however + released patches that fixes the issue: -How to Build a Debug Enabled Erlang RunTime System --------------------------------------------------- + > Problem Description: 6448300 large mnttab can cause stack overrun + > during Solaris 9 getcwd -After completing all the normal building steps described above a debug -enabled runtime system can be built. To do this you have to change -directory to `$ERL_TOP/erts/emulator`. + More information can be found at: + * + * -In this directory execute: +* `sed` on Solaris seem to have some problems. For example on + Solaris 8, the BSD `sed` and XPG4 `sed` should be avoided. + Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris + platform. - $ make debug FLAVOR=$FLAVOR -where `$FLAVOR` is either `plain` or `smp`. The flavor options will -produce a beam.debug and beam.smp.debug executable respectively. The -files are installed along side with the normal (opt) versions `beam.smp` -and `beam`. +Daily Build and Test +-------------------- +At Ericsson we have a "Daily Build and Test" that runs on: -To start the debug enabled runtime system execute: +* 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 16 + * x86\_64 +* Gentoo Linux/GNU 1.12.11.1 + * x86 +* Ubuntu Linux/GNU 7.04, 10.04, 10.10, 11.04, 12.04 + * x86\_64 +* MontaVista Linux/GNU 4.0.1 + * PowerPC +* FreeBSD 10.0 + * x86 +* OpenBSD 5.4 + * x86\_64 +* OS X 10.5.8 (Leopard), 10.7.5 (Lion), 10.9.1 (Mavericks) + * x86 +* Windows XP SP3, 2003, Vista, 7 + * x86 +* Windows 7 + * x86\_64 - $ $ERL_TOP/bin/cerl -debug +We also have the following "Daily Cross Builds": -The debug enabled runtime system features lock violation checking, -assert checking and various sanity checks to help a developer ensure -correctness. Some of these features can be enabled on a normal beam -using appropriate configure options. +* SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64 +* SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64 -There are other types of runtime systems that can be built as well -using the similar steps just described. +and the following "Daily Cross Build Tests": - $ make $TYPE FLAVOR=$FLAVOR +* SuSE Linux/GNU 10.1 x86\_64 -where `$TYPE` is `opt`, `gcov`, `gprof`, `debug`, `valgrind`, or `lcnt`. -These different beam types are useful for debugging and profiling -purposes. Authors ------- @@ -764,6 +815,7 @@ Authors are mostly listed in the application's `AUTHORS` files, that is `$ERL_TOP/lib/*/AUTHORS` and `$ERL_TOP/erts/AUTHORS`, not in the individual source files. + Copyright and License --------------------- @@ -784,30 +836,25 @@ under the License. %CopyrightEnd% -More Information ----------------- - -More information can be found at . -Modifying This Document ------------------------ - -Before modifying this document you need to have a look at the -[$ERL_TOP/HOWTO/MARKDOWN.md][] document. [$ERL_TOP/HOWTO/INSTALL-CROSS.md]: INSTALL-CROSS.md [$ERL_TOP/HOWTO/INSTALL-WIN32.md]: INSTALL-WIN32.md [DESTDIR]: http://www.gnu.org/prep/standards/html_node/DESTDIR.html - [Building in Git]: #How-to-Build-and-Install-ErlangOTP_Building-in-Git - [Pre-built Source Release]: #How-to-Build-and-Install-ErlangOTP_Prebuilt-Source-Release - [make and $ERL_TOP]: #How-to-Build-and-Install-ErlangOTP_make-and-ERLTOP + [Building in Git]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Within-Git + [Advanced Configure]: #Advanced-configuration-and-build-of-ErlangOTP_Configuring + [Pre-built Source Release]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Prebuilt-Source-Release + [make and $ERL_TOP]: #Advanced-configuration-and-build-of-ErlangOTP_make-and-ERLTOP [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-VSN%.tar.gz [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-VSN%.tar.gz [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-VSN%.tar.gz + [System Principles]: ../system_principles/system_principles + [Known platform issues]: #Known-platform-issues [native build]: #How-to-Build-and-Install-ErlangOTP [cross build]: INSTALL-CROSS.md - [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md - - [?TOC]: true + [Required Utilities]: #Required-Utilities + [Optional Utilities]: #Optional-Utilities + [Building on a Mac]: #Advanced-configuration-and-build-of-ErlangOTP_Building_OS-X-Darwin + [Building with wxErlang]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Building-with-wxErlang -- cgit v1.2.3 From c5f6b2fd79eaf392a8a2f26cd50dd5ed73dda1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 31 Mar 2014 11:56:02 +0200 Subject: Update/remove references to --enable-shared-zlib In 9f57d8c4f86323cf7481c9a7e512486087bb5542, the configure option --enable-shared-zlib. It was replaced with --enable-builtin-zlib. --- HOWTO/INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index f1bb8ec853..1e346b09ef 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -365,7 +365,7 @@ Some of the available `configure` options are: * `--{with,without}-javac` - Java compiler (without implies that the `jinterface` application won't be built) * `--{enable,disable}-dynamic-ssl-lib` - Dynamic OpenSSL libraries -* `--{enable,disable}-shared-zlib` - Shared zlib library +* `--{enable,disable}-builtin-zlib` - Use the built-in source for zlib. * `--with-ssl=PATH` - Specify location of OpenSSL include and lib * `--{with,without}-ssl` - OpenSSL (without implies that the `crypto`, `ssh`, and `ssl` won't be built) @@ -478,7 +478,7 @@ Build Erlang/OTP $ export PATH=/usr/local/bin:$PATH $ cd $ERL_TOP - $ ./configure --enable-shared-zlib + $ ./configure $ make $ sudo make install -- cgit v1.2.3 From 063eff0766e4148fe385d195f4fadc384b6f15b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 31 Mar 2014 12:00:15 +0200 Subject: Update instructions for cloning the wxWidgets repository The master branch has incompatible changes by default. The safest course for now is to use the WX_3_0_branch. --- HOWTO/INSTALL.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 1e346b09ef..5b3a09df2b 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -458,8 +458,13 @@ If you have Xcode 4.3, or later, you will also need to download #### Building with wxErlang #### -Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured -as the old releases and the OS X port still lags behind the other ports. +If you want to build the `wx` application, you will need to get wxWidgets-3.0 +(`wxWidgets-3.0.0.tar.bz2` from ) or get it from github with bug fixes: + + $ git clone --branch WX_3_0_branch git@github.com:wxWidgets/wxWidgets.git + +Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as +mature as the old releases and the OS X port still lags behind the other ports. Configure and build wxWidgets (on Mavericks - 10.9): @@ -715,7 +720,6 @@ Use `hipe:help_options/0` to print out the available options. The `gs` application requires the GUI toolkit Tcl/Tk to run. At least version 8.4 is required. - Known platform issues --------------------- -- cgit v1.2.3 From 4007e9342c9d80808f856ce11391b664d1920d80 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 3 Jul 2014 14:47:33 +0200 Subject: Fix some spelling misstakes --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 5b3a09df2b..7a7e63164c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -385,7 +385,7 @@ Some of the available `configure` options are: * `--enable-static-{nifs,drivers}` - To allow usage of nifs and drivers on OSs that do not support dynamic linking of libraries it is possible to statically link nifs and drivers with the main Erlang VM binary. This is done by passing - a comma seperated list to the archives that you want to statically link. e.g. + a comma separated list to the archives that you want to statically link. e.g. `--enable-static-nifs=/home/$USER/my_nif.a`. The path has to be absolute and the name of the archive has to be the same as the module, i.e. `my_nif` in the example above. This is also true for drivers, but then it is the driver name -- cgit v1.2.3 From d79f5a55d40342bf8609969c960f54c6de6595c2 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 26 Nov 2014 11:41:25 +0100 Subject: Improve documentation about atomic operations --- HOWTO/INSTALL.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 7a7e63164c..53b1b8cd8a 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -409,6 +409,30 @@ Some of the available `configure` options are: If you or your system has special requirements please read the `Makefile` for additional configuration information. +#### Atomic Memory Operations and the VM #### + +The VM with SMP support makes quite a heavy use of atomic memory operations. +An implementation providing native atomic memory operations is therefore very +important when building Erlang/OTP. By default the VM will refuse to build +if native atomic memory operations are not available. + +Erlang/OTP itself provides implementations of native atomic memory operations +that can be used when compiling with a `gcc` compatible compiler on 32-bit +and 64-bit x86, 32-bit and 64-bit SPARC V9, and 32-bit PowerPC. When compiling +with a `gcc` compatible compiler on other architectures, the VM may be able to +make use of native atomic operations using the `__sync_*` primitives, but this +should only be used as a last resort since this wont give you optimal +performance. When compiling on Windows using a MicroSoft Visual C++ compiler +native atomic memory operations are provided by Windows APIs. + +You are recommended to use the native atomic implementation provided by +Erlang/OTP, or the API provided by Windows. If these do not provide native +atomics on your platform, you are recommended to build and install +[libatomic_ops][] before building Erlang/OTP. The `libatomic_ops` library +provides native atomic memory operations for a variety of platforms and +compilers. When building Erlang/OTP you need to inform the build system of +where the `libatomic_ops` library is installed using the +`--with-libatomic_ops=PATH` configure switch. ### Building ### @@ -862,3 +886,4 @@ under the License. [Optional Utilities]: #Optional-Utilities [Building on a Mac]: #Advanced-configuration-and-build-of-ErlangOTP_Building_OS-X-Darwin [Building with wxErlang]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Building-with-wxErlang + [libatomic_ops]: https://github.com/ivmai/libatomic_ops/ -- cgit v1.2.3 From 24fa075b5c0d54f2035a2ff510a82aa19187eda4 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 5 Jan 2015 11:04:34 +0100 Subject: Improve ethread atomics based on GCC builtins * Use of __atomic builtins when available. * Improved configure test that checks for missing memory barrier in __sync_synchronize(). The old approach was to verify known working gcc versions and check gcc version at compile time. Besides not being very safe, the old approach often unnecessarily caused usage of the very expensive workaround. * Introduced (no overhead) workaround for missing clobber in __sync_synchronize() when using buggy LLVM implementation of __sync_synchronize(). * Implement native memory barriers for ARM processors supporting the DMB instruction. * Use of volatile store on Alpha as atomic set operation if no __atomic_store_n() is available (already used on x86/x86_64 Sparc V9, PowerPC, and MIPS). Fallback used when not using volatile store is typically very expensive. * Use volatile load on Alpha and ARM as atomic read operation if no __atomic_load_n() is available (already used on x86/x86_64 Sparc V9, PowerPC, and MIPS). Fallback when not using volatile load is typically very expensive. --- HOWTO/INSTALL.md | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 53b1b8cd8a..7efea77d4c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -417,22 +417,33 @@ important when building Erlang/OTP. By default the VM will refuse to build if native atomic memory operations are not available. Erlang/OTP itself provides implementations of native atomic memory operations -that can be used when compiling with a `gcc` compatible compiler on 32-bit -and 64-bit x86, 32-bit and 64-bit SPARC V9, and 32-bit PowerPC. When compiling -with a `gcc` compatible compiler on other architectures, the VM may be able to -make use of native atomic operations using the `__sync_*` primitives, but this -should only be used as a last resort since this wont give you optimal -performance. When compiling on Windows using a MicroSoft Visual C++ compiler -native atomic memory operations are provided by Windows APIs. - -You are recommended to use the native atomic implementation provided by -Erlang/OTP, or the API provided by Windows. If these do not provide native -atomics on your platform, you are recommended to build and install -[libatomic_ops][] before building Erlang/OTP. The `libatomic_ops` library -provides native atomic memory operations for a variety of platforms and -compilers. When building Erlang/OTP you need to inform the build system of -where the `libatomic_ops` library is installed using the -`--with-libatomic_ops=PATH` configure switch. +that can be used when compiling with a `gcc` compatible compiler for 32/64-bit +x86, 32/64-bit SPARC V9, 32-bit PowerPC, or 32-bit Tile. When compiling with +a `gcc` compatible compiler for other architectures, the VM may be able to make +use of native atomic operations using the `__atomic_*` builtins (may be +available when using a `gcc` of at least version 4.7) and/or using the +`__sync_*` builtins (may be available when using a `gcc` of at least version +4.1). If only the `gcc`'s `__sync_*` builtins are available, the performance +will suffer. Such a configuration should only be used as a last resort. When +compiling on Windows using a MicroSoft Visual C++ compiler native atomic +memory operations are provided by Windows APIs. + +Native atomic implementation in the order preferred: +1. The implementation provided by Erlang/OTP. +2. The API provided by Windows. +3. The implementation based on the `gcc` `__atomic_*` builtins. +4. If none of the above are available for your architecture/compiler, you + are recommended to build and install [libatomic_ops][] before building + Erlang/OTP. The `libatomic_ops` library provides native atomic memory + operations for a variety of architectures and compilers. When building + Erlang/OTP you need to inform the build system of where the + `libatomic_ops` library is installed using the + `--with-libatomic_ops=PATH` `configure` switch. +5. As a last resort, the implementation solely based on the `gcc` + `__sync_*` builtins. This will however cause lots of expensive and + unnecessary memory barrier instructions to be issued. That is, + performance will suffer. The `configure` script will warn at the end + of its execution if it cannot find any other alternative than this. ### Building ### @@ -849,7 +860,7 @@ Copyright and License %CopyrightBegin% -Copyright Ericsson AB 1998-2014. All Rights Reserved. +Copyright Ericsson AB 1998-2015. 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 -- cgit v1.2.3 From 738c34d4bb8f1a3811acd00af8c6c12107f8315b Mon Sep 17 00:00:00 2001 From: Bruce Yinhe Date: Thu, 18 Jun 2015 11:31:02 +0200 Subject: Change license text to APLv2 --- HOWTO/INSTALL.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 7efea77d4c..f8900c501b 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -862,16 +862,17 @@ Copyright and License Copyright Ericsson AB 1998-2015. 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 http://www.erlang.org/. - -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. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. %CopyrightEnd% -- cgit v1.2.3 From f7da0720b17556a9e3df108463643ba10ab1b3a0 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 7 Jul 2015 15:58:43 +0200 Subject: Add the --enable-gettimeofday-as-os-system-time configure switch Forces usage of gettimeofday() for OS system time --- HOWTO/INSTALL.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index f8900c501b..4c89370691 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -400,6 +400,8 @@ Some of the available `configure` options are: no automatic dependency handling between applications. If you disable an application that another application depends on, you also have to disable the dependant application. +* `--enable-gettimeofday-as-os-system-time` - Force usage of `gettimeofday()` for + OS system time. * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers functionality. Note that the dirty schedulers functionality is experimental, and **not supported**. This functionality **will** be subject to backward -- cgit v1.2.3 From 4a864c1cbe16a42f3f5190881187e3c9849e985f Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 7 Jul 2015 22:32:38 +0200 Subject: Prefer monotonic time that stop during suspend --- HOWTO/INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 4c89370691..837e6cbd76 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -402,6 +402,10 @@ Some of the available `configure` options are: dependant application. * `--enable-gettimeofday-as-os-system-time` - Force usage of `gettimeofday()` for OS system time. +* `--enable-prefer-elapsed-monotonic-time-during-suspend` - Prefer an OS monotonic + time source with elapsed time during suspend. +* `--disable-prefer-elapsed-monotonic-time-during-suspend` - Do not prefer an OS + monotonic time source with elapsed time during suspend. * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers functionality. Note that the dirty schedulers functionality is experimental, and **not supported**. This functionality **will** be subject to backward -- cgit v1.2.3 From f146b442247c591dd9ae0ac3ad0409628804b4c5 Mon Sep 17 00:00:00 2001 From: Eric Appelt Date: Sun, 2 Aug 2015 16:14:13 +0100 Subject: Fix osx install wxWidgets instructions wxWidgets does not have a branch named `WX_3_0_branch`, but has `WX_3_0_BRANCH` Trying to clone with `--branch` set to the lowercase name fails. Fix branch name to `WX_3_0_BRANCH`. --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 837e6cbd76..9b2c77da7c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -502,7 +502,7 @@ If you have Xcode 4.3, or later, you will also need to download If you want to build the `wx` application, you will need to get wxWidgets-3.0 (`wxWidgets-3.0.0.tar.bz2` from ) or get it from github with bug fixes: - $ git clone --branch WX_3_0_branch git@github.com:wxWidgets/wxWidgets.git + $ git clone --branch WX_3_0_BRANCH git@github.com:wxWidgets/wxWidgets.git Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as mature as the old releases and the OS X port still lags behind the other ports. -- cgit v1.2.3 From 08f8b454596d51de367e5559b7104300c2a7b954 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 19 Aug 2015 16:15:32 +0200 Subject: Improve choice of clock sources at build time - Documented the configure switch --with-clock-resolution= - Changed default clock source for OS system time on Darwin to gettimeofday(). In order to use clock_get_time(CALENDER_CLOCK, ...) on Darwin, the user has to pass --with-clock-resolution=high when configuring the build. --- HOWTO/INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 837e6cbd76..6434eda253 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -406,6 +406,10 @@ Some of the available `configure` options are: time source with elapsed time during suspend. * `--disable-prefer-elapsed-monotonic-time-during-suspend` - Do not prefer an OS monotonic time source with elapsed time during suspend. +* `--with-clock-resolution=high|low` - Try to find clock sources for OS system + time, and OS monotonic time with higher or lower resolution than chosen by + default. Note that both alternatives may have a negative impact on the performance + and scalability compared to the default clock sources chosen. * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers functionality. Note that the dirty schedulers functionality is experimental, and **not supported**. This functionality **will** be subject to backward -- cgit v1.2.3 From e4dedc6cffb5025161d9a6295523b215e5a165c7 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 9 Sep 2015 17:41:41 +0200 Subject: Add configure switch --disable-saved-compile-time --- HOWTO/INSTALL.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 837e6cbd76..14bb265829 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -406,6 +406,8 @@ Some of the available `configure` options are: time source with elapsed time during suspend. * `--disable-prefer-elapsed-monotonic-time-during-suspend` - Do not prefer an OS monotonic time source with elapsed time during suspend. +* `--disable-saved-compile-time` - Disable saving of compile date and time + in the emulator binary. * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers functionality. Note that the dirty schedulers functionality is experimental, and **not supported**. This functionality **will** be subject to backward -- cgit v1.2.3 From f4b99c9bc3c1f8a52b35d0731253b5052e695b32 Mon Sep 17 00:00:00 2001 From: Derek Brown Date: Wed, 15 Apr 2015 17:36:27 -0400 Subject: Add details on the FOP formatter I found that I needed to take the two steps I added to INSTALL.md for this PR, or else fop execution when doing a "make docs" would fail with either a Java ClassNotFoundException or command "fop" not found: * Adding the FOP install directory to $FOP_HOME * Adding the fop script to $PATH --- HOWTO/INSTALL.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 0dab438b10..2f7088ba11 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -210,6 +210,14 @@ the `$PATH`. $ export PATH=$ERL_TOP/bin:$PATH # Assuming bash/sh +For the FOP print formatter, two steps must be taken: + +* Adding the location of your installation of `fop` in `$FOP_HOME`. + + $ export FOP_HOME=/path/to/fop/dir # Assuming bash/sh + +* Adding the `fop` script (in `$FOP_HOME`) to your `$PATH`, either by adding `$FOP_HOME` to `$PATH`, or by copying the `fop` script to a directory already in your `$PATH`. + Build the documentation. $ make docs -- cgit v1.2.3 From 2f1928b18b59ffb984530e104e737dd8d7449f25 Mon Sep 17 00:00:00 2001 From: Zandra Date: Fri, 18 Dec 2015 14:31:13 +0100 Subject: update java version in documentation --- HOWTO/INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 51e8648a4a..c1b6f44046 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -76,10 +76,10 @@ also find the utilities needed for building the documentation. Read more and download from . * Oracle Java SE JDK -- The Java Development Kit (Standard Edition). Required for building the application `jinterface` and parts of `ic` and `orber`. - At least version 1.5.0 of the JDK is required. + At least version 1.6.0 of the JDK is required. Download from . - We have also tested with IBM's JDK 1.5.0. + We have also tested with IBM's JDK 1.6.0. * X Windows -- Development headers and libraries are needed to build the Erlang/OTP application `gs` on Unix/Linux. * `flex` -- Headers and libraries are needed to build the flex -- cgit v1.2.3 From b6135ca68e8caf6ed8528c1274d4ed88b64c1480 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 18 Feb 2016 15:48:01 +0100 Subject: Add --with-ssl-incl and --with-ssl-rpath to docs --- HOWTO/INSTALL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 51e8648a4a..0a5b5799f8 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -374,9 +374,15 @@ Some of the available `configure` options are: `jinterface` application won't be built) * `--{enable,disable}-dynamic-ssl-lib` - Dynamic OpenSSL libraries * `--{enable,disable}-builtin-zlib` - Use the built-in source for zlib. -* `--with-ssl=PATH` - Specify location of OpenSSL include and lib * `--{with,without}-ssl` - OpenSSL (without implies that the `crypto`, `ssh`, and `ssl` won't be built) +* `--with-ssl=PATH` - Specify location of OpenSSL include and lib +* `--with-ssl-incl=PATH` - Location of OpenSSL `include` directory, + if different than specified by `--with-ssl=PATH` +* `--with-ssl-rpath=yes|no|PATHS` - Runtime library path for OpenSSL. + Default is `yes`, which equates to a number of standard locations. If + `no`, then no runtime library paths wil be used. Anything else should be + a comma separated list of paths. * `--with-libatomic_ops=PATH` - Use the `libatomic_ops` library for atomic memory accesses. If `configure` should inform you about no native atomic implementation available, you typically want to try using the -- cgit v1.2.3 From 4a39536d3566277e19838bd45f1c340e3d88b998 Mon Sep 17 00:00:00 2001 From: Prayag Verma Date: Wed, 3 Feb 2016 18:01:08 +0530 Subject: Fix typo in INSTALL.md Found a spelling mistake - `achived` > `achieved` --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 0b78f4ca56..c2655d2810 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -406,7 +406,7 @@ Some of the available `configure` options are: that has to be the same as the filename. You also have to define `STATIC_ERLANG_{NIF,DRIVER}` when compiling the .o files for the nif/driver. If your nif/driver depends on some other dynamic library, you now have to link - that to the Erlang VM binary. This is easily achived by passing `LIBS=-llibname` + that to the Erlang VM binary. This is easily achieved by passing `LIBS=-llibname` to configure. * `--without-$app` - By default all applications in Erlang/OTP will be included in a release. If this is not wanted it is possible to specify that Erlang/OTP -- cgit v1.2.3 From d166333d3c0d0584841f90654d63934edd076c5c Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 23 Feb 2016 17:22:56 +0100 Subject: typos --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 0b78f4ca56..a823d5abbc 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -381,7 +381,7 @@ Some of the available `configure` options are: if different than specified by `--with-ssl=PATH` * `--with-ssl-rpath=yes|no|PATHS` - Runtime library path for OpenSSL. Default is `yes`, which equates to a number of standard locations. If - `no`, then no runtime library paths wil be used. Anything else should be + `no`, then no runtime library paths will be used. Anything else should be a comma separated list of paths. * `--with-libatomic_ops=PATH` - Use the `libatomic_ops` library for atomic memory accesses. If `configure` should inform you about no native atomic -- cgit v1.2.3 From b4b74abfd0d5b22c6c2a8ba589e12df800e15e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 17 Mar 2016 10:08:47 +0100 Subject: configure: Remove obsolete --enable-darwin-* options Remove the options: --enable-darwin-universal --enable-darwin-64bit The --enable-darwin-universal option turns on universal binaries (Intel/PPC). It does not work on modern releases of OS X, and OTP 19 will most not likely build on an OS X release that still supports universal builds. The --enable-darwin-64bit option is not needed, because 64-bit builds are default on modern OS X releases. There is also the generic --enable-m64-build option. --- HOWTO/INSTALL.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 43bcdb3a9e..adfc44baae 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -356,8 +356,6 @@ Some of the available `configure` options are: depending on operating system and hardware platform. Note that by enabling this you might get a seemingly working system that sometimes fail on floating point operations. -* `--enable-darwin-universal` - Build universal binaries on darwin i386. -* `--enable-darwin-64bit` - Build 64-bit binaries on darwin * `--enable-m64-build` - Build 64-bit binaries using the `-m64` flag to `(g)cc` * `--enable-m32-build` - Build 32-bit binaries using the `-m32` flag to -- cgit v1.2.3 From 1096af72010f63d81914d0768f0218757dc50737 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Tue, 5 Apr 2016 15:30:55 -0400 Subject: Update INSTALL.md * Fixed a grammatical error. --- HOWTO/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 43bcdb3a9e..1d4b8333bb 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -68,7 +68,7 @@ also find the utilities needed for building the documentation. Required for building the application `crypto`. Further, `ssl` and `ssh` require a working crypto application and will also be skipped if OpenSSL is missing. The `public_key` - application will available without `crypto`, but the functionality + application is available without `crypto`, but the functionality will be very limited. The development package of OpenSSL including the header files are needed as well -- cgit v1.2.3 From 69d0c932c7d4a2bc3ce65c9c6d6aa54b23e803c3 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 23 May 2016 14:56:05 +0200 Subject: Adjust generated XML so it respects current DTD --- HOWTO/INSTALL.md | 1 + 1 file changed, 1 insertion(+) (limited to 'HOWTO/INSTALL.md') diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 2ae1ed3c8d..8632f46264 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -824,6 +824,7 @@ Known platform issues Daily Build and Test -------------------- + At Ericsson we have a "Daily Build and Test" that runs on: * Solaris 8, 9 -- cgit v1.2.3