COIN-OR::LEMON - Graph Library

source: lemon-project-template-glpk/deps/glpk/doc/glpk07.tex @ 9:33de93886c88

subpack-glpk
Last change on this file since 9:33de93886c88 was 9:33de93886c88, checked in by Alpar Juttner <alpar@…>, 12 years ago

Import GLPK 4.47

File size: 9.7 KB
Line 
1%* glpk07.tex *%
2
3\chapter{Installing GLPK on Your Computer}
4\label{install}
5
6\section{Downloading the distribution tarball}
7
8The distribution tarball of the most recent version of the GLPK
9package can be found on \url{http://ftp.gnu.org/gnu/glpk/} [via http]
10and \url{ftp://ftp.gnu.org/gnu/glpk/} [via FTP]. It can also be found
11on one of the FTP mirrors; see \url{http://www.gnu.org/prep/ftp.html}.
12Please use a mirror if possible.
13
14To make sure that the GLPK distribution tarball you have downloaded is
15intact you need to download the corresponding `\verb|.sig|' file and
16run a command like this:
17
18\begin{verbatim}
19   gpg --verify glpk-4.38.tar.gz.sig
20\end{verbatim}
21
22\noindent
23If that command fails because you do not have the required public key,
24run the following command to import it:
25
26\begin{verbatim}
27   gpg --keyserver keys.gnupg.net --recv-keys 5981E818
28\end{verbatim}
29
30\noindent
31and then re-run the previous command.
32
33\section{Unpacking the distribution tarball}
34
35The GLPK package (like all other GNU software) is distributed in the
36form of packed archive. This is one file named \verb|glpk-X.Y.tar.gz|,
37where {\it X} is the major version number and {\it Y} is the minor
38version number.
39
40In order to prepare the distribution for installation you should:
41
42\medskip
43
441. Copy the GLPK distribution file to a working subdirectory.
45
46\medskip
47
482. Unpack the distribution file with the following command:
49
50\begin{verbatim}
51   gzip -d glpk-X.Y.tar.gz
52\end{verbatim}
53
54\noindent
55that renames the distribution file to \verb|glpk-X.Y.tar|.
56
57\medskip
58
593. Unarchive the distribution file with the following command:
60
61\begin{verbatim}
62   tar -x < glpk-X.Y.tar
63\end{verbatim}
64
65\noindent
66that automatically creates the subdirectory \verb|glpk-X.Y| containing
67the GLPK distribution.
68
69
70\section{Configuring the package}
71
72After unpacking and unarchiving the GLPK distribution you should
73configure the package, i.e. automatically tune it for your platform.
74
75Normally, you should just \verb|cd| to the subdirectory
76\verb|glpk-X.Y| and run the configure script, e.g.
77
78\begin{verbatim}
79   ./configure
80\end{verbatim}
81
82The `\verb|configure|' shell script attempts to guess correct values
83for various system-dependent variables used during compilation. It uses
84those values to create a `\verb|Makefile|' in each directory of the
85package. It also creates file `\verb|config.h|' containing
86platform-dependent definitions. Finally, it creates a shell script
87`\verb|config.status|' that you can run in the future to recreate the
88current configuration, a file `\verb|config.cache|' that saves the
89results of its tests to speed up reconfiguring, and a file
90`\verb|config.log|' containing compiler output (useful mainly for
91debugging `\verb|configure|').
92
93Running `\verb|configure|' takes about a few minutes. While it is
94running, it displays some informational messages that tell you what it
95is doing. If you don't want to see these messages, run
96`\verb|configure|' with its standard output redirected to
97`\verb|dev/null|'; for example, `\verb|./configure > /dev/null|'.
98
99By default both static and shared versions of the GLPK library will be
100compiled. Compilation of the shared librariy can be turned off by
101specifying the `\verb|--disable-shared|' option to `\verb|configure|',
102e.g.
103
104\begin{verbatim}
105   ./configure --disable-shared
106\end{verbatim}
107
108\noindent
109If you encounter problems building the library try using the above
110option, because some platforms do not support shared libraries.
111
112\newpage
113
114The GLPK package has some optional features listed below. By default
115all these features are disabled. To enable a feature the corresponding
116option should be passed to the configure script.
117
118\bigskip
119
120\noindent
121\verb|--with-gmp         | Enable using the GNU MP bignum library
122
123\medskip
124
125This feature allows the exact simplex solver to use the GNU MP bignum
126library. If it is disabled, the exact simplex solver uses the GLPK
127bignum module, which provides the same functionality as GNU MP, however,
128it is much less efficient.
129
130For details about the GNU MP bignum library see its web page at
131\url{http://gmplib.org/}.
132
133\bigskip
134
135\noindent
136\verb|--with-zlib        |
137Enable using the zlib data compression library
138
139\medskip
140
141This feature allows GLPK API routines and the stand-alone solver to
142read and write compressed data files performing compression and
143decompression ``on the fly'' (compressed data files are recognized by
144suffix `\verb|.gz|' in the file name). It may be useful in case of
145large MPS files to save the disk space.
146
147For details about the zlib compression library see its web page at
148\url{http://www.zlib.net/}.
149
150\bigskip
151
152\noindent
153\verb|--enable-dl        | The same as `\verb|--enable-dl=ltdl|'
154
155\noindent
156\verb|--enable-dl=ltdl   | Enable shared library support (GNU)
157
158\noindent
159\verb|--enable-dl=dlfcn  | Enable shared library support (POSIX)
160
161\medskip
162
163Currently this feature is only needed to provide dynamic linking to
164ODBC and MySQL shared libraries (see below).
165
166For details about the GNU shared library support see the manual at
167\url{http://www.gnu.org/software/libtool/manual/}.
168
169\bigskip
170
171\noindent
172\verb|--enable-odbc      |
173Enable using ODBC table driver (\verb|libiodbc|)
174
175\noindent
176\verb|--enable-odbc=unix |
177Enable using ODBC table driver (\verb|libodbc|)
178
179\medskip
180
181This feature allows transmitting data between MathProg model objects
182and relational databases accessed through ODBC.
183
184For more details about this feature see the supplement ``Using Data
185Tables in the GNU MathProg Modeling Language'' (\verb|doc/tables.pdf|).
186
187\bigskip
188
189\noindent
190\verb|--enable-mysql     |
191Enable using MySQL table driver (\verb|libmysql|)
192
193\medskip
194
195This feature allows transmitting data between MathProg model objects
196and MySQL relational databases.
197
198For more details about this feature see the supplement ``Using Data
199Tables in the GNU MathProg Modeling Language'' (\verb|doc/tables.pdf|).
200
201\section{Compiling the package}
202
203Normally, you can compile (build) the package by typing the command:
204
205\begin{verbatim}
206   make
207\end{verbatim}
208
209\noindent
210It reads `\verb|Makefile|' generated by `\verb|configure|' and performs
211all necessary jobs.
212
213If you want, you can override the `\verb|make|' variables \verb|CFLAGS|
214and \verb|LDFLAGS| like this:
215
216\begin{verbatim}
217   make CFLAGS=-O2 LDFLAGS=-s
218\end{verbatim}
219
220To compile the package in a different directory from the one containing
221the source code, you must use a version of `\verb|make|' that supports
222`\verb|VPATH|' variable, such as GNU `\verb|make|'. `\verb|cd|' to the
223directory where you want the object files and executables to go and run
224the `\verb|configure|' script. `\verb|configure|' automatically checks
225for the source code in the directory that `\verb|configure|' is in and
226in `\verb|..|'. If for some reason `\verb|configure|' is not in the
227source code directory that you are configuring, then it will report that
228it can't find the source code. In that case, run `\verb|configure|' with
229the option `\verb|--srcdir=DIR|', where \verb|DIR| is the directory that
230contains the source code.
231
232Some systems require unusual options for compilation or linking that
233the `\verb|configure|' script does not know about. You can give
234`\verb|configure|' initial values for variables by setting them in the
235environment. Using a Bourne-compatible shell, you can do that on the
236command line like this:
237
238\begin{verbatim}
239   CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
240\end{verbatim}
241
242\noindent
243Or on systems that have the `\verb|env|' program, you can do it like
244this:
245
246\begin{verbatim}
247   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
248\end{verbatim}
249
250Here are the `\verb|make|' variables that you might want to override
251with environment variables when running `\verb|configure|'.
252
253For these variables, any value given in the environment overrides the
254value that `\verb|configure|' would choose:
255
256\medskip
257
258\noindent
259\verb|CC      | C compiler program. The default is `\verb|cc|'.
260
261\medskip
262
263\noindent
264\verb|INSTALL | Program used to install files. The default value is
265`\verb|install|' if
266
267\noindent
268\verb|        | you have it, otherwise `\verb|cp|'.
269
270\medskip
271
272For these variables, any value given in the environment is added to the
273value that `\verb|configure|' chooses:
274
275\medskip
276
277\noindent
278\verb|DEFS    | Configuration options, in the form
279`\verb|-Dfoo -Dbar| \dots'.
280
281\medskip
282
283\noindent
284\verb|LIBS    | Libraries to link with, in the form
285`\verb|-lfoo -lbar| \dots'.
286
287\section{Checking the package}
288
289To check the package, i.e. to run some tests included in the package,
290you can use the following command:
291
292\begin{verbatim}
293   make check
294\end{verbatim}
295
296\section{Installing the package}
297
298Normally, to install the GLPK package you should type the following
299command:
300
301\begin{verbatim}
302   make install
303\end{verbatim}
304
305\noindent
306By default, `\verb|make install|' will install the package's files in
307`\verb|usr/local/bin|', `\verb|usr/local/lib|', etc. You can specify an
308installation prefix other than `\verb|/usr/local|' by giving
309`\verb|configure|' the option `\verb|--prefix=PATH|'. Alternately, you
310can do so by consistently giving a value for the `\verb|prefix|'
311variable when you run `\verb|make|', e.g.
312
313\begin{verbatim}
314   make prefix=/usr/gnu
315   make prefix=/usr/gnu install
316\end{verbatim}
317
318After installing you can remove the program binaries and object files
319from the source directory by typing `\verb|make clean|'. To remove all
320files that `\verb|configure|' created (`\verb|Makefile|',
321`\verb|config.status|', etc.), just type `\verb|make distclean|'.
322
323The file `\verb|configure.ac|' is used to create `\verb|configure|' by
324a program called `\verb|autoconf|'. You only need it if you want to
325remake `\verb|configure|' using a newer version of `\verb|autoconf|'.
326
327\section{Uninstalling the package}
328
329To uninstall the GLPK package, i.e. to remove all the package's files
330from the system places, you can use the following command:
331
332\begin{verbatim}
333   make uninstall
334\end{verbatim}
335
336%* eof *%
Note: See TracBrowser for help on using the repository browser.