Skip to content

Installation

Takahiro Ueda edited this page Feb 5, 2019 · 25 revisions

Using a package manager

The easiest way to install a stable version of FORM would be to use a package manager, although package managers tend to have old versions of FORM in their official repositories or FORM may be not available (see Repology). As of the beginning of February 2019, there are a few user repositories for package managers to install FORM 4.2.1:

  • AUR (Arch Linux)
pacaur -S form
brew install tueda/form/form

Building from the source distribution

You can build your own FORM binaries on Unix-like systems. To compile FORM sources, you need reasonably modern C and C++ compilers and the make utility. We recommend to build FORM with two external libraries, GMP and zlib. Moreover, it is highly recommended to run the test suite to check whether executables are correctly compiled, which needs Ruby with the so-called test/unit library. All of them can be installed by:

  • Debian or Ubuntu
sudo apt-get update
sudo apt-get install build-essential libgmp-dev ruby zlib1g-dev
  • Fedora 29
sudo dnf install gcc-c++ gmp-devel make ruby rubygem-test-unit zlib-devel
  • CentOS 7
sudo yum install gcc-c++ gmp-devel make ruby rubygem-minitest zlib-devel
  • Cygwin (with apt-cyg)
apt-cyg update
apt-cyg install gcc-g++ libgmp-devel make ruby zlib-devel

Source distributions of stable versions of FORM can be found in the Releases page as files with the name form-<version>.tar.gz. (The page also contains pre-built reference manuals and binaries for some specific systems). As of February 2019, the latest source distribution is form-4.2.1.tar.gz. After downloading the source distribution and unpacking it, you need to type the following commands in the generated directory:

./configure
make
make check
sudo make install

By default, make install installs binaries into /usr/local/bin. This installation path can be changed by passing the --prefix=DIR option to the ./configure script. You can also manually copy the compiled binary sources/form to any directory. In addition to form, tform will be compiled when POSIX Threads are available. More advanced options are found in the help message shown by ./configure --help. The file "INSTALL" also contains description of some options.

Building from the source repository

If you are not satisfied with a release version for some reason, you can build FORM from the development repository. This requires additional software: Git and Autoconf/Automake. They can be installed by, in addition to the packages shown in the previous section:

  • Debian or Ubuntu
sudo apt-get install automake git
  • Fedora 29
sudo dnf install automake git
  • CentOS 7
sudo yum install automake git
  • Cygwin (with apt-cyg)
apt-cyg install automake git

Then, you can clone the repository by

git clone https://github.com/vermaseren/form

which generates a form directory. Type the following commands in the generated directory:

autoreconf -i
./configure
make
make check
sudo make install
Clone this wiki locally