How to install and use FermaT on a Linux machine ================================================ These instructions should work on most distributions from the Debian family (Ubuntu, Mint, CrunchBang, ...) and with small changes on any other Linux or BSD system. The main changes are in the usage of the package system - Debian uses ".deb" packages and the "apt-get" command, others use yum, packman etc. The machine that these instructions were tested with was a fresh Ubuntu install, more precisely Lubuntu 14.04, 64 bit version. It came with gcc 4.8.2 (4.8.2-19ubuntu1) installed. It was also tested on a fresh install of CrunchBang Waldorf (based on Debian Wheezy), 64 bit version. It came with gcc (Debian 4.7.2-5) 4.7.2. Dependencies ============ GNU Compiler Collection (C) --------------------------- For building FermaT you need a working C compiler, GCC recommended. In Ubuntu there is a convenient package "build-essential" that will install most of the needed packages for building software. Debian: sudo apt-get install build-essential Mageia: urpmi gcc make Fedora: yum install gcc make When trying to build FermaT it might complain about a missing "sys/cdefs.h". This file can be found in libc6-dev package, but you might also need to install "libc6-dev-i386" (even though it is a 64 bit system, the shared file is in the old library). Perl ---- Perl is included by default, but you also need some extra modules - Bit::Vector and Set::IntRange. If these modules are not installed WSL will work in most cases, but not all. To be sure everything is OK run "make test" and check that all the tests succeeded. Debian: You can use "cpanm" command from the "cpanminus" package for installing modules. It will automatically find and install any missing module dependencies. You can install them globally on the system with sudo cpanm Bit::Vector sudo cpanm Set::IntRange If you don't want to (or can't) install them globally, you can configure local modules. Try running cpanm without sudo for suggestions how to do this. Mageia, Fedora and other Linux versions: If your system does not have cpanm, you can use the CPAN module directly: sudo perl -MCPAN -e shell This will start the CPAN shell. Type: install Set::IntRange to install Set::IntRange and Bit::Vector. Main build ========== You need to download and extract fermat3: wget http://www.cse.dmu.ac.uk/~mward/fermat3.tar.gz OR wget http://www.gkc.org.uk/fermat3.tar.gz tar -xf fermat3.tar.gz To compile and test FermaT: cd fermat3 make test To run the FermaT scripts from the command line (wsl, dotrans, make-fermat etc) you need to ensure that the fermat3/bin directory is in your path and the FermaT environment variable is set. A simple way to do this is to "source" the appropriate DOIT file from the fermat3 directory. Most Linux systems use the bash shell by default: cd fermat3 source DOIT.bash If you use csh or tcsh then: cd fermat3 source DOIT.csh After setting the environment variable and path, you can recompile FermaT with the command: make-fermat You can test some basic WSL commands with: test-fermat and test some transformations with: test-trans If everything is OK you should be able to enter "wsl" in the command line and get a usage message. Running WSL =========== FermaT does not install system-wide on it's own. If you want to use it in a command line you need to source DOIT again. Since DOIT.bash uses pwd (print working directory) you need to run it in the fermat3 directory. Alternatively you can make a copy of the file (let's call it myDOIT.bash) and change the line "Fermat=`pwd` to refer to the install folder directly, for instance if we extracted fermat3 in our home: FermaT=$HOME/fermat3 You can then run that file from anywhere and it will setup the values properly. For instance you can put this file somewhere on the PATH. A convenient place is to make a "bin" folder in your home if there isn't one already. This will be included by bash automatically. Then you could run source myDOIT.bash from any terminal that you want to run WSL in. If you want to have access to wsl in all of the shells you can add these lines to your .bashrc file (in the home directory). End notes ========= Copyright (C) 2014 Doni Pracner, Martin Ward; Released under the GNU Free Documentation Licence https://www.gnu.org/licenses/fdl.html