Skip to content

Installation

Takahiro Ueda edited this page Nov 22, 2022 · 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 November 2022, at least the following user repositories for package managers to install FORM 4.3.0 are available:

  • 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 building 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. As of November 2022, the latest source distribution is form-4.3.0.tar.gz. Note that GitHub provides "Source code (zip)" and "Source code (tar.gz)" links, but these are really "only source code" and insufficient for building. The page also contains pre-built reference manuals and binaries for some specific systems.

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 descriptions 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. Note that shallow clones may not work because the build system needs to find the release tag. Then, type the following commands in the generated directory:

autoreconf -i
./configure
make
make check
sudo make install

Continuous integration

A GitHub Action (setup-form) is available.

Clone this wiki locally