1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
Overview
========
FORM uses the GNU autoconf tools to configure and install. In principle, the
three-step invocation
./configure
make
make install
should be enough to configure, compile, and install FORM with default settings
into the default path "/usr/bin". Nevertheless, you are strongly advised to
carefully read the following sections in order to prevent common mistakes and to
be able to choose the best configuration settings for your system.
Prerequisites
=============
In case you need to (re-)generate the script "configure" (see next section), you
have to have the GNU autoconf/automake programs installed on your system. You
should have at least autoconf version >= 2.59 and automake version >= 1.7.
For generating the configure script from a GIT repository, you also need Git.
To compile the sources you need reasonably modern C and C++ compilers, like for
example the GNU compiler collection (GCC) or the Intel C compiler. The
facilities in FORM for external communication need a POSIX compliant C library,
like the GNU glibc.
The threaded version of FORM needs a Posix compliant implementation of threads
(pthreads). The parallel version ParFORM needs an MPI implementation.
The automated test suite of FORM requires Ruby version >= 2.0 and the testing
framework "test/unit". For the latter, you may need to install test-unit gem
separately.
The manual needs a LaTeX installation with the commands "latex" and "dvips" or
"pdflatex" available. For the html format the command "htlatex" is needed.
The source code documentation needs Doxygen, at least in version 1.3.
As a default, FORM tries to use the GMP and MPFR libraries for fast numerics, the zlib
and Zstandard (zstd) libraries for fast compression, and the FLINT library for fast
polynomial arithmetic. If any of these libraries is not available, the corresponding
feature will be deactivated. GMP should be at least version 4.2, zlib should be at
least 1.2 and FLINT should be version 3.2 or higher.
To use arbitrary precision floating-point arithmetic in FORM, both GMP and MPFR are required; if either is not available, this feature will not be enabled.
Preparations
============
If you have acquired the FORM sources via GIT, several files will be missing,
especially the script "configure". To generate these files you have to issue
the command
autoreconf -i
If you have downloaded and extracted the tar-file distribution, these files are
already there and the above step is not necessary. But in case you experience
problems related to the GNU autoconf files, it can be a good idea to recreate
all these files with the command "autoreconf", maybe with the option "-f" to
force a recreation.
Configuration
=============
Running
./configure
will check your system and activate the available default settings. The chosen
configuration will be printed at the end of the running. To change the default
installation path use the "--prefix" option:
./configure --prefix=<path>
The FORM executables will then be installed into the directory "<path>/bin".
As a default, the sequential version (form) and the threaded version (tform) of
FORM will be selected for compilation. To prevent a flavor from being build, use
one of the following options:
./configure --disable-scalar
./configure --disable-threaded
If you want to build the parallel version ParFORM, then add the option:
./configure --enable-parform
If you want to build the debugging versions of these flavors, then add the
option:
./configure --enable-debug
Use one of the following options
./configure --without-gmp
./configure --without-zlib
./configure --without-mpfr
./configure --without-zstd
./configure --without-flint
to prevent FORM from using one of these libraries. The executable will not be
linked against this library then and the functionality will be provided by
internal code. Usually, you don't need to care about these options.
If you want to build without arbitrary-precision floating-point arithmetic,
configure with:
./configure --disable-float
This disables the float feature.
On Linux systems with "eu-addr2line" or "addr2line" available, it is strongly
recommended to enable backtracing to help diagnose internal errors. To compile
with backtrace support, configure with:
./configure --enable-backtrace
Note that in some cases (but not most!) this may incur a potential small ~1%
performance penalty.
The option
./configure --disable-largefile
forces FORM not to use large file support, i.e. to use _FILE_OFFSET_BITS==32 and
thereby restrict files to be less than 4GB in size on 32bit machines. Usually,
you don't need to care about this option.
To choose a compiler that is different from the one "configure" automatically
determines, you can set the environment variables "CC" and "CXX" on the command
line:
./configure CC=icc CXX=icpc CFLAGS=-Werror CXXFLAGS=-Werror
The above example shows also how to set additional compiler flags.
The detailed compiler/linker options for the release versions and the
debugging versions can be specified by the environment variables
COMPILEFLAGS
LINKFLAGS
DEBUGCOMPILEFLAGS
DEBUGLINKFLAGS
If they are not set, they will be chosen for the local machine where you are
compiling executables. If you would like to enable additional optimizations
specific to the machine on which you are compiling FORM, use the following
option. Note that the resulting binary may not run on CPUs with a different
feature set.
./configure --enable-native
The configure script creates a file "config.h" in which several options and
settings are passed on to the source code files via preprocessor definitions.
For short-term adjustments you can alter these settings manually, but beware
that they will be overwritten the next time "configure" runs.
Finally, the option "--help" shows the available options together with a short
explanation:
./configure --help
Compilation
===========
Issue the command
make
to build all activated FORM flavors (form, tform, ...). The compilation will
result in the executables sitting in the sources directory of the distribution.
To compile only a specific flavor of FORM, name it as a parameter:
make form
make tform
make vorm
make tvorm
make parform
make parvorm
Additional flags for the compiler or linker can be given at the command line,
for example:
make vorm CFLAGS=-O1 CXXFLAGS=-O1
To cleanup the distribution directory, the command
make clean
can be used.
Testing
=======
If Ruby version >= 2.0 and "test/unit" are installed on your system, the
configure script enables the automated test suite. Then you can run it by
make check
Documentation
=============
You need to change into the directory "doc" to build the documentation. There
you can choose to run one of the commands
make dvi
make ps
make pdf
make html
to build all documentation in the specified format. If you want to build only
the manual or the source code documentation, you need to change directory into
"doc/manual" or "doc/doxygen" before you issue the make commands.
Installation
============
With the command
make install
the compiled executables will be copied into the configured path ("/usr/bin" as
the default).
Troubleshooting
===============
No troubles to be shot, yet.
|