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