gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
ef964e99c165472a0bd3c5c8a8b613288eca8adb
[mjc2wsl.git] / docs / install-fermat-on-linux.txt
2 How to install and use FermaT on a Linux machine
3 ================================================
5 The machine that this instructions were tested with was a fresh Ubuntu
6 install, more precisely Lubuntu 14.04, 64 bit version. It came with
7 gcc 4.8.2 (4.8.2-19ubuntu1) installed.
9 This should work on most distributions from the Debian family (Ubuntu,
10 Mint, CrunchBang, ...) and with small changes on any other Linux or
11 BSD system. The main changes are in the usage of the package system -
12 debian uses ".deb" packages and the "apt-get" command, others use yum,
13 packman etc.
16 Dependencies
17 ============
19 GNU Compiler Collection (C)
20 ---------------------------
22 For building FermaT you need a working C compiler, GCC recommended. In
23 Ubuntu there is a convenient package "build-essential" that will
24 install most of the needed packages for building software.
26 Debian:
28 sudo apt-get install build-essential
30 Mageia:
32 urpmi gcc make
34 Fedora:
36 yum install gcc make
38 When trying to build FermaT it might complain about a missing
39 "sys/cdefs.h". This file can be found in libc6-dev package,
40 but you might also need to install "libc6-dev-i386" (even though
41 it is a 64 bit system, the shared file is in the old library).
44 Perl
45 ----
47 Perl is included by default, but you also need some extra modules -
48 Bit::Vector and Set::IntRange.
50 If these modules are not installed WSL will work in most cases, but
51 not all. To be sure everything is ok run "make test" and check that
52 all the tests succeeded.
54 Debian:
56 You can use "cpanm" command from the "cpanminus" package for
57 installing modules. It will automatically find and install any missing
58 module dependencies.
60 You can install them globally on the system with
62 sudo cpanm Bit::Vector
63 sudo cpanm Set::IntRange
65 If you don't want to (or can't) install them globally, you can
66 configure local modules. Try running cpanm without sudo for
67 suggestions how to do this.
69 Mageia, Fedora and other Linux versions:
71 If your system does not have cpanm, you can use the CPAN module directly:
73 sudo perl -MCPAN -e shell
75 This will start the CPAN shell. Type:
77 install Set::IntRange
79 to install Set::IntRange and Bit::Vector.
82 Main build
83 ==========
85 You need to download and extract fermat3:
87 wget http://www.cse.dmu.ac.uk/~mward/fermat3.tar.gz
88 OR
89 wget http://www.gkc.org.uk/fermat3.tar.gz
91 tar -xf fermat3.tar.gz
93 To compile and test FermaT:
95 cd fermat3
96 make test
98 To run the FermaT scripts from the command line (wsl, dotrans,
99 make-fermat etc) you need to ensure that the fermat3/bin directory
100 is in your path and the FermaT environment variable is set.
102 A simple way to do this is to "source" the appropriate DOIT file
103 from the fermat3 directory.
105 Most Linux systems use the bash shell by default:
107 cd fermat3
108 source DOIT.bash
110 If you use csh or tcsh then:
112 cd fermat3
113 source DOIT.csh
115 After setting the envirotment variable and path, you can recompile FermaT
116 with the command:
118 make-fermat
120 You can test some basic WSL commands with:
122 test-fermat
124 and test some transformations with:
126 test-trans
128 If everything is ok you should be able to enter "wsl" in the command
129 line and get a usage message.
132 Running WSL
133 ===========
135 FermaT does not install system-wide on it's own. If you want
136 to use it in a command line you need to source DOIT again.
137 Since DOIT.bash uses pwd (print working directory) you need to run
138 it in the fermat3 directory.
140 Alternatively you can make a copy of the file (let's call it myDOIT.bash)
141 and change the line "Fermat=`pwd` to refer to the install folder directly,
142 for instance if we extracted fermat3 in our home:
144 FermaT=/home/user/fermat3
146 You can then run that file from anywhere and it will setup the values
147 properly. For instance you can put this file somewhere on the PATH. A
148 convenient place is to make a "bin" folder in your home if there isn't
149 one already. This will be included by bash automatically. Then
150 you could run
152 source myDOIT.bash
154 from any terminal that you want to run WSL in.
156 If you want to have access to wsl in all of the shells you can add
157 these lines to your .bashrc file (in the home directory).
160 End notes
161 =========
163 Copyright (C) 2014 Doni Pracner, Martin Ward; Released under the GNU Free Documentation
164 Licence https://www.gnu.org/licenses/fdl.html
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner