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

611072 views
1
\Chapter{Installing XGAP}
2
3
Installing {\XGAP} should be easy once you have installed {\GAP} itself. We
4
assume here that you want to install {\XGAP} in its standard location,
5
which is in the ``pkg'' subdirectory of the main {\GAP4} installation.
6
7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
\Section{Overview}
9
10
You have to perform the following steps to install {\XGAP}:
11
12
\beginlist
13
\item{--} Get the sources
14
\item{--} Unpack the sources
15
\item{--} Use the <configure> script to adjust everything to your specific
16
system
17
\item{--} Compile the C part of {\XGAP}
18
\item{--} Edit a certain startup script (if necessary) and install it in
19
an executable location in your system
20
\endlist
21
22
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23
\Section{What you need to install XGAP}
24
25
Being a graphical user interface to {\GAP}, {\XGAP} of course needs
26
graphics. At the moment this means that you need the X window system in the
27
Version 11 Release 5 or newer. On the other hand the type of Unix you use
28
should not matter. Please file an issue report on
29
\begintt
30
https://github.com/gap-packages/xgap/issues
31
\endtt
32
if you encounter problems with certain system configurations.
33
Note that usage on
34
a computer running Microsoft Windows is not officially supported.
35
See the file `xgap/README.Windows' for a report how it could
36
still work on Windows.
37
38
Because {\XGAP} contains a C-part you need a C compiler.
39
40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
\Section{Getting and unpacking the sources}
42
43
In most cases, the {\XGAP} package will already be included in the main
44
distribution. However, you can also download the sources of the latest
45
version from
46
47
\begintt
48
https://gap-packages.github.io/xgap/
49
\endtt
50
51
You need only one file with the name ``xgap-4.26.tar.gz''
52
which is in the subdirectory for the packages.
53
You now change your current directory to the `pkg' subdirectory of the
54
location where you installed
55
{\GAP}
56
Now you extract the sources for the {\XGAP} package:
57
58
\begintt
59
# tar xzvf xgap-4.26.tar.gz
60
...
61
\endtt
62
63
The <tar> utility unpacks the files and stores them into the apropriate
64
subdirectories. {\XGAP} resides completely in the following subdirectory
65
(assuming standard location):
66
67
\begintt
68
gap4r8/pkg/xgap
69
\endtt
70
71
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
\Section{Configuring and Compiling the C part}
73
74
You have to change your current working directory to the ``xgap''
75
subdirectory. You do this by
76
77
\begintt
78
# cd xgap
79
\endtt
80
81
if your current working directory is the one, where you used
82
<tar>. There you invoke the <configure> script by:
83
84
\begintt
85
# ./configure
86
creating cache ./config.cache
87
checking for make... make
88
checking build system type... x86_64-unknown-linux-gnu
89
checking host system type... x86_64-unknown-linux-gnu
90
checking target system type... x86_64-unknown-linux-gnu
91
checking for gcc... gcc
92
checking whether the C compiler (gcc ) works... yes
93
checking whether the C compiler (gcc ) is a cross-compiler... no
94
checking whether we are using GNU C... yes
95
...
96
updating cache ./config.cache
97
creating ./config.status
98
creating Makefile
99
creating xgap.sh
100
\endtt
101
102
$\ldots$ indicate omissions.
103
This script tries to determine, which kind of operating system and
104
libraries you have installed and configures the source
105
accordingly. Normally this should produce some output but no error
106
messages.
107
108
Note that you can add ``CONFIGNAME=default64'' after the <./configure>
109
command (with ``default64'' replaced by a configuration name you used
110
to compile {\GAP} with) to compile for a different than the standard
111
configuration.
112
113
The last step of the script produces some makefiles which are
114
used to compile the code. You do this by typing
115
116
\begintt
117
# make
118
mkdir -p bin/x86_64-unknown-linux-gnu-gcc
119
cp cnf/configure.out bin/x86_64-unknown-linux-gnu-gcc/configure
120
( cd bin/x86_64-unknown-linux-gnu-gcc ; CC=gcc ./configure )
121
checking for gcc... gcc
122
checking whether the C compiler works... yes
123
...
124
creating ./config.status
125
creating Makefile
126
creating config.h
127
( cd bin/x86_64-unknown-linux-gnu-gcc ; make CC=gcc )
128
make[1]: Entering directory
129
`/scratch/neunhoef/4.0/pkg/xgap/bin/x86_64-unknown-linux-gnu-gcc'
130
gcc -I. -g -O2 -o xcmds.o -c ../../src.x11/xcmds.c
131
...
132
make[1]: Leaving directory \ # line broken for this manual!
133
`/usr/local/lib/gap4/pkg/xgap/bin/i686-unknown-linux2.0.34-gcc'
134
\endtt
135
136
(a few lines were broken for typesetting purposes in this manual, the
137
position is marked by a backslash)
138
139
Now all C sources are compiled and a binary executable is built. It is
140
stored in a subdirectory of the ``bin'' subdirectory in your ``xgap''
141
directory. The name of this location has something to do with your
142
installation. It could for example be
143
144
\begintt
145
bin/x86_64-unknown-linux-gnu-gcc/xgap
146
\endtt
147
148
if you compile on a 64-bit Linux system using the GNU-C-Compiler.
149
150
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151
\Section{Installing the Startup Script}
152
153
To make the startup of {\XGAP} more convenient there is a startup script
154
which contains also some configuration information like the position of
155
your {\GAP} installation. It is in the ``xgap'' directory
156
and is called ``xgap.sh''. This file is automatically generated
157
by the `configure' script and normally you should *not* have to change
158
anything in it. Just copy it to some location that people have in their
159
``PATH'' environment variable, for example to ``/usr/local/bin''.
160
This completes the installation.
161
162
If you want to change anything in the installation, you
163
can also edit the script until the line
164
165
\begintt
166
## STOP EDITING HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
167
\endtt
168
169
You can specify the directory where {\GAP} is installed (``GAP\_DIR''),
170
the amount of memory that {\GAP} should use as initial workspace
171
(``GAP\_MEM''), the name of the {\GAP}-executable (``GAP\_PRG'') and the
172
name of the {\XGAP}-executable (``XGAP\_PRG''). The first three are exactly
173
the same things that you could edit in the main {\GAP} startup script.
174
After that you have the possibility to control the behaviour of the {\XGAP}
175
startup script. You can specify whether {\XGAP} goes into the background
176
(``DAEMON'') and whether it prints out information about its parameters
177
(``VERBOSE''). Note that it is possible to combine ``DAEMON=YES''
178
and ``VERBOSE=YES'' because the script actually runs in the foreground and
179
only the C program is put into the background.
180
181
182
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183
\Section{Installing in a different than the standard location}
184
185
It could happen that you do not want to install {\XGAP} in its
186
standard location, perhaps because you do not want to bother your
187
system administrator and have no access to the {\GAP} directory. In
188
this case you can unpack {\XGAP} in any other location within a
189
``pkg'' directory with the <tar> command as described above. Let us
190
call this directory ``pkg'' for the moment. You get an ``xgap''
191
subdirectory with all the files of {\XGAP} in it. You follow the
192
standard procedure with one exception:
193
194
In the ``./configure'' command, add the following option:
195
196
\begintt
197
./configure --with-gaproot=/usr/local/lib/gap4r8
198
\endtt
199
200
if `/usr/local/lib/gap4r8' is the location of the main {\GAP} installation.
201
You can find out where the main {\GAP4} installation is by starting
202
{\GAP} as usual and looking at the variable `GAPInfo.RootPaths'
203
within {\GAP}.
204
205