gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system+
How to install and use FermaT on a Linux machine
================================================
How to install and use FermaT on a Linux machine
================================================
-The machine that this 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.
-
-This 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,
+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.
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)
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.
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.
-use:
+Debian:
+
+ sudo apt-get install build-essential
+
+Mageia:
+
+ urpmi gcc make
+
+Fedora:
- sudo apt-get install build-essential
+ yum install gcc make
-When trying to build FermaT it migh 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).
+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
-------
+----
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
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
+not all. To be sure everything is OK run "make test" and check that
all the tests succeeded.
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
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
+ 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.
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
Main build
-===========
+==========
You need to download and extract fermat3:
You need to download and extract fermat3:
- wget http://www.cse.dmu.ac.uk/~mward/fermat3.tar.gz
- tar -xf fermat3.tar.gz
+ 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:
-Once you are inside the folder you need to "source" the appropriate
-DOIT file. This will set up a few environment variables that are
-needed for FermaT to work and are also needed for the build process.
+ cd fermat3
+ make test
-For Ubuntu this will probably be bash:
+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.
- cd fermat3
- source DOIT.bash
+A simple way to do this is to "source" the appropriate DOIT file
+from the fermat3 directory.
-After that you can start the build and test process with
+Most Linux systems use the bash shell by default:
- make test
+ cd fermat3
+ source DOIT.bash
+
+If you use csh or tcsh then:
-If everything is already built it will skip straith to the
-testing. You want to see all tests pass.
+ cd fermat3
+ source DOIT.csh
-You can alternatively start the build process directly with:
+After setting the environment variable and path, you can recompile FermaT
+with the command:
make-fermat
make-fermat
+You can test some basic WSL commands with:
-If everything is ok you should be able to enter "wsl" in the command
+ 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
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.
+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 include the install
-folder directly, for instance if we extracted fermat3 in our home:
+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/username/fermat3
+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
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
one already. This will be included by bash automatically. Then
you could run
one already. This will be included by bash automatically. Then
you could run
- source myDOIT.bash
+ source myDOIT.bash
from any terminal that you want to run WSL in.
from any terminal that you want to run WSL in.
End notes
=========
End notes
=========
-Copyright (C) 2014 Doni Pracner; Released under the GNU Free Documentation
+Copyright (C) 2014 Doni Pracner, Martin Ward; Released under the GNU Free Documentation
Licence https://www.gnu.org/licenses/fdl.html
Licence https://www.gnu.org/licenses/fdl.html