CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Views: 418346
1
2
<!-- %W install.xml GAP documentation Greg Gamble -->
3
<!-- %H -->
4
<!-- %Y Copyright (C) 2001, School of Math & Comp. Sci., St Andrews, Scotland -->
5
6
7
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
8
<Chapter Label="Installing and Loading the Example Package">
9
<Heading>Installing and Loading the Example Package</Heading>
10
11
12
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
13
<Section Label="Unpacking the Example Package">
14
<Heading>Unpacking the Example Package</Heading>
15
16
If the &Example; package was obtained as a part of the &GAP; distribution
17
from the <Q>Download</Q> section of the &GAP; website, you may proceed
18
to Section <Ref Sect="Compiling Binaries of the Example Package"/>.
19
Alternatively, the &Example; package may be installed using a separate archive,
20
for example, for an update or an installation in a non-default location
21
(see <Ref Sect="GAP Root Directories" BookName="ref"/>).
22
<P/>
23
24
Below we describe the installation procedure for the <File>.tar.gz</File>
25
archive format. Installation using other archive formats is performed in a
26
similar way.
27
<P/>
28
29
To install the &Example; package, unpack the archive file, which should
30
have a name of form <C>example-<A>XXX</A>.tar.gz</C> for some version number
31
<A>XXX</A>, by typing
32
<P/>
33
&nbsp;&nbsp;<C>gzip -dc example-<A>XXX</A>.tar.gz | tar xpv</C>
34
<P/>
35
36
It may be unpacked in one of the following locations:
37
<List>
38
<Item>
39
in the <File>pkg</File> directory of your &GAP;&nbsp;4 installation;
40
</Item>
41
<Item>
42
or in a directory named <File>.gap/pkg</File> in your home directory
43
(to be added to the &GAP; root directory unless &GAP; is started with
44
<C>-r</C> option);
45
</Item>
46
<Item>
47
or in a directory named <File>pkg</File> in another directory of your
48
choice (e.g.&nbsp;in the directory <File>mygap</File> in your home
49
directory).
50
</Item>
51
</List>
52
53
In the latter case one one must start &GAP; with the <C>-l</C> option,
54
e.g.&nbsp;if your private <F>pkg</F> directory is a subdirectory of
55
<F>mygap</F> in your home directory you might type:
56
<P/>
57
&nbsp;&nbsp;<C>gap -l ";<A>myhomedir</A>/mygap"</C>
58
<P/>
59
where <A>myhomedir</A> is the path to your home directory, which (since
60
&GAP;&nbsp;4.3) may be replaced by a tilde (the empty path before the
61
semicolon is filled in by the default path of the &GAP;&nbsp;4 home
62
directory).
63
64
</Section>
65
66
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
67
<Section Label="Compiling Binaries of the Example Package">
68
<Heading>Compiling Binaries of the Example Package</Heading>
69
70
After unpacking the archive, go to the newly created <F>example</F> directory
71
and call <C>./configure</C> to use the default <C>../..</C> path to the
72
&GAP; home directory or <C>./configure <A>path</A></C> where <A>path</A> is
73
the path to the &GAP; home directory, if the package is being installed in a
74
non-default location. So for example if you install the package in the
75
<F>~/.gap/pkg</F> directory and the &GAP; home directory is <F>~/gap4r5</F>
76
then you have to call
77
<P/>
78
<Log><![CDATA[
79
./configure ../../../gap4r5/
80
]]></Log>
81
<P/>
82
This will fetch the architecture type for which &GAP; has been compiled
83
last and create a <F>Makefile</F>. Now simply call
84
<P/>
85
<Log><![CDATA[
86
make
87
]]></Log>
88
<P/>
89
to compile the binary and to install it in the appropriate place.
90
91
</Section>
92
93
94
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
95
<Section Label="Loading the Example Package">
96
<Heading>Loading the Example Package</Heading>
97
98
To use the &Example; Package you have to request it explicitly. This is
99
done by calling <Ref Func="LoadPackage" BookName="ref"/>:
100
<P/>
101
<Example><![CDATA[
102
gap> LoadPackage("example");
103
----------------------------------------------------------------
104
Loading Example 3.3 (Example/Template of a GAP Package)
105
by Werner Nickel (http://www.mathematik.tu-darmstadt.de/~nickel),
106
Greg Gamble (http://www.math.rwth-aachen.de/~Greg.Gamble), and
107
Alexander Konovalov (http://www.cs.st-andrews.ac.uk/~alexk/).
108
----------------------------------------------------------------
109
true
110
]]></Example>
111
<P/>
112
113
If &GAP; cannot find a working binary, the call to <C>LoadPackage</C> will
114
still succeed but a warning is issued informing that the <C>HelloWorld()</C>
115
function will be unavailable.
116
<P/>
117
If you want to load the &Example; package by default, you can put the
118
<C>LoadPackage</C> command into your <F>gaprc</F> file
119
(see Section&nbsp;<Ref Sect="The gap.ini and gaprc files" BookName="ref"/>).
120
121
</Section>
122
</Chapter>
123
124
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
125
<!-- %% -->
126
<!-- %E -->
127
128
129