Installing mathemagix
with configure |
This section concerns the compilation, installation, or local use of
several Mathemagix packages together, from
sources.
1.Dependencies
For a minimal build of the Mathemagix
interpreter, you will need to ensure that Libtool
has been installed on your system with support for building dynamic
libraries. In addition, you probably want to install Readline, which is convenient if you want to use
the interpreter from a shell.
The other packages of Mathemagix each come with
their specific dependencies; see the package list. The
two most important dependencies are Gmp
and Mpfr, which are required by
almost all other packages. Developers also need to install Autotools, cmake, Doxygen,
and TeXmacs.
2.Downloading from the svn server
The sources of Mathemagix can be downloaded from
the svn server located at https://sourcesup.renater.fr/projects/mmx/
via the following command:
svn checkout https://subversion.renater.fr/anonscm/svn/mmx/ |
This will create a mmx directory containing all the
source files.
Remark. If you have an account on SourceSup,
then you may ask to join the Mathemagix project and contribute your
own code. If you created such a developer account “my-name”, then you should use the following
command instead for checking out:
svn checkout --username my-name https://subversion.renater.fr/authscm/my-name/svn/mmx/ |
3.Installation
Mathemagix packages comply with the standard GNU
installation procedure. For a complete description please refer to the
documentation of individual packages. In this section we describe how
several packages can be configured, compiled and installed with the
top level tools available in the mmx directory.
3.1.Configuration
In a text terminal or console, and within the mmx
directory, you can type the following command:
The default list of the packages to be handled is thus printed. The
latter list can be customized thanks to the –enable-package
options. Dependencies are treated automatically. For instance
./configure --enable-algebramix --enable-mmxlight |
will build the package algebramix and the interpreter
mmxlight, as well as all dependencies (in this case
basix and numerix). Notice that extra
packages can be enabled a posteriori, simply by redoing a ./configure; this will not recompile the packages
which are already available.
To build Mathemagix on certain architectures you
may need to specify additional include and library paths. For example,
if external dependencies have been installed via Macports
on a MacOS platform then you have to type:
./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib |
Default installation path is /usr/local/, but you can
customize it with the –prefix option as follows:
In order to build the html documentation, you have to
add the option –enable-doc to the configure
script, but it requires that TeXmacs and Doxygen are installed on your platform. Finally the
list of all configuration options is obtained using:
3.2.Compilation
Once the configuration stage is finished you can start the compilation
by typing:
The following command performs the installation of Mathemagix:
3.3.Development mode
If you do not want to install Mathemagix, then
you can use it, either to try or to contribute, via the
development mode. For this purpose you need to setup the
paths needed for the applications to be built and used locally, by
typing the following command in the mmx directory:
This will allow you for instance to run the tests, the benchmarks, and
the interpreter without installation, by typing for instance:
Since Mathemagix consists of several packages,
this development mode is convenient for developers. Indeed, otherwise
reinstalling a package after a modification may cause dependant
packages to be recompiled over and over again. In case you have passed
the –enable-doc option you can build the whole
html documentation by typing make html.
If the one wants to run make in the specific package only then one can type:
The other targets (which behave similarly) are:
-
check [package-check]
-
run the test suite of the package(s).
-
clean [package-clean]
-
clean the package(s).
-
confclean [package-confclean]
-
clean the configuration file of the package(s).
-
dist [package-dist]
-
build the distribution archive .tar.gz for each
selected package.
-
distclean [package-distclean]
-
clean the built files and the Makefile(s).
-
html [package-html]
-
build the html documentation of the package(s).
-
install [package-install]
-
install the package(s) in the directory specified by the option
–prefix=… of configure.
-
uninstall [package-uninstall]
-
unsintall the package(s).
4.Global Variables
The following variables should not be modified, unless you really know
what you are doing.
-
MMX_PREFIX_DIR: prefix used for the installation.
If not set then basix-config –prefix is used
by default.
-
MMX_USER_DIR: path to user's ressources. If not
set then $HOME/.mathemagix is used by default.
-
MMX_SYSCONF_DIR: path to configuration directory.
It is set to $MMX_PREFIX_DIR/etc by default.
-
MMX_LOAD_PATH: path for loading Mathemagix
files. If not set then .:'user_path'/mmx:'prefix_path'/mmx
is used by default.
Beside global variables a global boot file is located at 'prefix_path'/etc/mathemagix/boot.mmx.
It is automatically loaded by mmx-light. At the end,
the latter boot file further loads a user boot file located at $MMX_USER_DIR/etc/boot.mmx. Use the shell option –noboot to disable these loadings.
5.Known problems
-
Within the autotools, the development mode
does not perfectly behave. In fact, if a version of Mathemagix
is already installed on your system (in /usr/local/
as a default place) then you must prevent from of accidental
linking conflicts by using the following 'trick':
./configure --prefix=/tmp/dummy |
assuming that /tmp/dummy is an empty directory.
The latter option ensures that no local installation is to be
found in the /tmp/dummy directory, hence
preventing from linking of a library in development with another
one already installed.
-
Windows support via MinGW
is still incomplete. You will need to configure using the option
–enable-embedded. This will result in one
huge executable to which all individual libraries have been linked
statically. Not all packages have been tested yet too.
-
Under some Linux distributions you may face a problem with SELinux
whenever it is in standard strict mode. Indeed SELinux will
prevent you from loading Mathemagix's
dynamic librairies when in the development mode. As a solution you
can go to your administration / security menu and
Allow the use of shared libraries with Text
Relocation. We strongly recommend you to refer to the SELinux
documentation to really know what this change involves for the
global security of your system.
© 2008–2021 Joris van der Hoeven, Grégoire Lecerf
Permission is granted to copy, distribute and/or modify this document
under the terms of the
GNU General Public License. If you
don't have this file, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.