Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563501 views
1
2
2 Installing and Loading the Example Package
3
4
5
2.1 Unpacking the Example Package
6
7
If the Example package was obtained as a part of the GAP distribution from
8
the Download section of the GAP website, you may proceed to Section 2.2.
9
Alternatively, the Example package may be installed using a separate
10
archive, for example, for an update or an installation in a non-default
11
location (see 'Reference: GAP Root Directories').
12
13
Below we describe the installation procedure for the .tar.gz archive format.
14
Installation using other archive formats is performed in a similar way.
15
16
To install the Example package, unpack the archive file, which should have a
17
name of form example-XXX.tar.gz for some version number XXX, by typing
18
19
  gzip -dc example-XXX.tar.gz | tar xpv
20
21
It may be unpacked in one of the following locations:
22
23
 in the pkg directory of your GAP 4 installation;
24
25
 or in a directory named .gap/pkg in your home directory (to be added
26
to the GAP root directory unless GAP is started with -r option);
27
28
 or in a directory named pkg in another directory of your choice
29
(e.g. in the directory mygap in your home directory).
30
31
In the latter case one one must start GAP with the -l option, e.g. if your
32
private pkg directory is a subdirectory of mygap in your home directory you
33
might type:
34
35
  gap -l ";myhomedir/mygap"
36
37
where myhomedir is the path to your home directory, which (since GAP 4.3)
38
may be replaced by a tilde (the empty path before the semicolon is filled in
39
by the default path of the GAP 4 home directory).
40
41
42
2.2 Compiling Binaries of the Example Package
43
44
After unpacking the archive, go to the newly created example directory and
45
call ./configure to use the default ../.. path to the GAP home directory or
46
./configure path where path is the path to the GAP home directory, if the
47
package is being installed in a non-default location. So for example if you
48
install the package in the ~/.gap/pkg directory and the GAP home directory
49
is ~/gap4r5 then you have to call
50
51
 Example 
52
./configure ../../../gap4r5/
53

54
55
This will fetch the architecture type for which GAP has been compiled last
56
and create a Makefile. Now simply call
57
58
 Example 
59
make
60

61
62
to compile the binary and to install it in the appropriate place.
63
64
65
2.3 Loading the Example Package
66
67
To use the Example Package you have to request it explicitly. This is done
68
by calling LoadPackage (Reference: LoadPackage):
69
70
 Example 
71
gap> LoadPackage("example");
72
----------------------------------------------------------------
73
Loading Example 3.3 (Example/Template of a GAP Package)
74
by Werner Nickel (http://www.mathematik.tu-darmstadt.de/~nickel),
75
 Greg Gamble (http://www.math.rwth-aachen.de/~Greg.Gamble), and
76
 Alexander Konovalov (http://www.cs.st-andrews.ac.uk/~alexk/).
77
----------------------------------------------------------------
78
true
79

80
81
If GAP cannot find a working binary, the call to LoadPackage will still
82
succeed but a warning is issued informing that the HelloWorld() function
83
will be unavailable.
84
85
If you want to load the Example package by default, you can put the
86
LoadPackage command into your gaprc file (see Section 'Reference: The
87
gap.ini and gaprc files').
88
89
90