gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
added tutorial for installing FermaT on Linux
[mjc2wsl.git] / docs / install-fermat-on-linux.txt
1 How to install and use FermaT on a Linux machine
2 ================================================
4 The machine that this instructions were tested with was a fresh Ubuntu
5 install, more precisely Lubuntu 14.04, 64 bit version. It came with
6 gcc 4.8.2 (4.8.2-19ubuntu1) installed.
8 This should work on most distributions from the Debian family (Ubuntu,
9 Mint, CrunchBang, ...) and with small changes on any other Linux or
10 BSD system. The main changes are in the usage of the package system -
11 debian uses ".deb" packages and the "apt-get" command, others use yum,
12 packman etc.
15 Dependencies
16 ============
18 GNU Compiler Collection (C)
19 -----------------------------
21 For building FermaT you need a working C compiler, GCC recommended. In
22 Ubuntu there is a convenient package "build-essential" that will
23 install most of the needed packages for building software.
25 use:
27 sudo apt-get install build-essential
29 When trying to build FermaT it migh complain about a missing
30 "sys/cdefs.h". This file can be found in libc6-dev package, but you
31 might also need to install "libc6-dev-i386" (even though it is a 64
32 bit system, the shared file is in the old library).
35 Perl
36 ------
38 Perl is included by default, but you also need some extra modules -
39 Bit::Vector and Set::IntRange.
41 If these modules are not installed WSL will work in most cases, but
42 not all. To be sure everything is ok run "make test" and check that
43 all the tests succeeded.
45 You can use "cpanm" command from the "cpanminus" package for
46 installing modules. It will automatically find and install any missing
47 module dependencies.
49 You can install them globally on the system with
51 sudo cpanm Bit::Vector
52 sudo cpanm Set::IntRange
54 If you don't want to (or can't) install them globally, you can
55 configure local modules. Try running cpanm without sudo for
56 suggestions how to do this.
59 Main build
60 ===========
62 You need to download and extract fermat3:
64 wget
65 tar -xf fermat3.tar.gz
68 Once you are inside the folder you need to "source" the appropriate
69 DOIT file. This will set up a few environment variables that are
70 needed for FermaT to work and are also needed for the build process.
72 For Ubuntu this will probably be bash:
74 cd fermat3
75 source DOIT.bash
77 After that you can start the build and test process with
79 make test
81 If everything is already built it will skip straith to the
82 testing. You want to see all tests pass.
84 You can alternatively start the build process directly with:
86 make-fermat
89 If everything is ok you should be able to enter "wsl" in the command
90 line and get a usage message.
93 Running WSL
94 ============
96 FermaT does not install system-wide on it's own. If you want to use it
97 in a command line you need to source DOIT again. Since DOIT.bash uses
98 pwd (print working directory) you need to run it in the fermat3
99 directory.
101 Alternatively you can make a copy of the file (let's call it
102 myDOIT.bash) and change the line "Fermat=`pwd` to include the install
103 folder directly, for instance if we extracted fermat3 in our home:
105 Fermat=/home/username/fermat3
107 You can then run that file from anywhere and it will setup the values
108 properly. For instance you can put this file somewhere on the PATH. A
109 convenient place is to make a "bin" folder in your home if there isn't
110 one already. This will be included by bash automatically. Then
111 you could run
113 source myDOIT.bash
115 from any terminal that you want to run WSL in.
117 If you want to have access to wsl in all of the shells you can add
118 these lines to your .bashrc file (in the home directory).
121 End notes
122 =========
124 Copyright (C) 2014 Doni Pracner; Released under the GNU Free Documentation
125 Licence maintanance Doni Pracner