# Changes in INSTALL[890:974c48bda29e:1233:490d89913a17] in lemon

Ignore:
File:
1 edited

### Legend:

Unmodified
 r890 ========================= Since you are reading this I assume you already obtained one of the release tarballs and successfully extracted it. The latest version of LEMON is available at our web page (http://lemon.cs.elte.hu/). This file contains instructions for building and installing LEMON from source on Linux. The process on Windows is similar. LEMON provides two different build environments, one is based on "autotool", while the other is based on "cmake". This file contains instructions only for the former one, which is the recommended build environment on Linux, Mac OSX and other unices or if you use Cygwin on Windows. For cmake installation instructions visit http://lemon.cs.elte.hu. Note that it is not necessary to install LEMON in order to use it. Instead, you can easily integrate it with your own code directly. For instructions, see https://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile In order to install LEMON from the extracted source tarball you have to issue the following commands: 1. cd lemon-x.y.z' 1. Step into the root of the source directory. This command changes to the directory which was created when you extracted the sources. The x.y.z part is a version number. $cd lemon-x.y.z 2. ./configure' 2. Create a build subdirectory and step into it. This command runs the configure shell script, which does some checks and creates the makefiles.$ mkdir build $cd build 3. make' 3. Perform system checks and create the makefiles. This command compiles the non-template part of LEMON into libemon.a file. It also compiles the programs in the tools subdirectory by default.$ cmake .. 4. make check' 4. Build LEMON. This step is optional, but recommended. It runs the test programs that we developed for LEMON to check whether the library works properly on your platform. $make 5. make install' This command compiles the non-template part of LEMON into libemon.a file. It also compiles the programs in the 'tools' and 'demo' subdirectories. 5. [Optional] Compile and run the self-tests.$ make check 5. [Optional] Generate the user documentation. $make html The release tarballs already include the documentation. Note that for this step you need to have the following tools installed: Python, Doxygen, Graphviz, Ghostscript, LaTeX. 6. [Optional] Install LEMON$ make install This command installs LEMON under /usr/local (you will need root privileges to be able to do that). If you want to install it to some other location, then pass the --prefix=DIRECTORY flag to configure in step 2. For example: ./configure --prefix=/home/username/lemon'. 6. make install-html' This command installs the documentation under share/doc/lemon/docs. The generated documentation is included in the tarball. If you want to generate it yourself, then run make html'. Note that for this you need to have the following programs installed: Doxygen, Graphviz, Ghostscript, Latex. privileges to be able to do that). If you want to install it to some other location, then pass the -DCMAKE_INSTALL_PREFIX=DIRECTORY flag to cmake in Step 3. For example: $cmake -DCMAKE_INSTALL_PREFIX=/home/username/lemon' Configure Options and Variables =============================== In step 2 you can customize the actions of configure by setting variables and passing options to it. This can be done like this: ./configure [OPTION]... [VARIABLE=VALUE]...' In Step 3, you can customize the build process by passing options to CMAKE. Below you will find some useful variables and options (see ./configure --help' for more):$ cmake [OPTIONS] .. CXX='comp' You find a list of the most useful options below. Change the C++ compiler to 'comp'. CXXFLAGS='flags' Pass the 'flags' to the compiler. For example CXXFLAGS='-O3 -march=pentium-m' turns on generation of aggressively optimized Pentium-M specific code. --prefix=PREFIX -DCMAKE_INSTALL_PREFIX=PREFIX Set the installation prefix to PREFIX. By default it is /usr/local. --enable-tools -DCMAKE_BUILD_TYPE=[Release|Debug|Maintainer|...] Build the programs in the tools subdirectory (default). This sets the compiler options. The choices are the following --disable-tools 'Release': A strong optimization is turned on (-O3 with gcc). This is the default setting and we strongly recommend using this for the final compilation. Do not build the programs in the tools subdirectory. 'Debug': Optimization is turned off and debug info is added (-O0 -ggdb with gcc). If is recommended during the development. --with-glpk[=PREFIX] 'Maintainer': The same as 'Debug' but the compiler warnings are converted to errors (-Werror with gcc). In addition, 'make' will also automatically compile and execute the test codes. It is the best way of ensuring that LEMON codebase is clean and safe. Enable GLPK support (default). You should specify the prefix too if you installed GLPK to some non-standard location (e.g. your home directory). If it is not found, GLPK support will be disabled. 'RelWithDebInfo': Optimized build with debug info. --with-glpk-includedir=DIR 'MinSizeRel': Size optimized build (-Os with gcc) The directory where the GLPK header files are located. This is only useful when the GLPK headers and libraries are not under the same prefix (which is unlikely). -DTEST_WITH_VALGRIND=YES --with-glpk-libdir=DIR Using this, the test codes will be executed using valgrind. It is a very effective way of identifying indexing problems and memory leaks. The directory where the GLPK libraries are located. This is only useful when the GLPK headers and libraries are not under the same prefix (which is unlikely). -DCMAKE_CXX_COMPILER=path-to-compiler --without-glpk Change the compiler to be used. Disable GLPK support. -DBUILD_SHARED_LIBS=TRUE --with-cplex[=PREFIX] Build shared library instead of static one. Think twice if you really want to use this option. Enable CPLEX support (default). You should specify the prefix too if you installed CPLEX to some non-standard location (e.g. /opt/ilog/cplex75). If it is not found, CPLEX support will be disabled. -DLEMON_DOC_SOURCE_BROWSER=YES --with-cplex-includedir=DIR Include the browsable cross referenced LEMON source code into the doc. It makes the doc quite bloated, but may be useful for developing LEMON itself. The directory where the CPLEX header files are located. This is only useful when the CPLEX headers and libraries are not under the same prefix (e.g.  /usr/local/cplex/cplex75/include). -DLEMON_DOC_USE_MATHJAX=YES --with-cplex-libdir=DIR Use MathJax (http://mathjax.org) for rendering the math formulae in the doc.  It of much higher quality compared to the default LaTeX generated static images and it allows copy&paste of the formulae to LaTeX, Open Office, MS Word etc. documents. The directory where the CPLEX libraries are located. This is only useful when the CPLEX headers and libraries are not under the same prefix (e.g. /usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt). On the other hand, it needs either Internet access or a locally installed version of MathJax to properly render the doc. --without-cplex -DLEMON_DOC_MATHJAX_RELPATH=DIRECTORY The location of the MathJax library. It defaults to http://www.mathjax.org/mathjax, which necessitates Internet access for proper rendering. The easiest way to make it usable offline is to set this parameter to 'mathjax' and copy all files of the MathJax library into the 'doc/html/mathjax' subdirectory of the build location. Disable CPLEX support. See http://docs.mathjax.org/en/latest/installation.html for more details. --with-soplex[=PREFIX] -DLEMON_ENABLE_GLPK=NO -DLEMON_ENABLE_COIN=NO -DLEMON_ENABLE_ILOG=NO Enable SoPlex support (default). You should specify the prefix too if you installed SoPlex to some non-standard location (e.g. your home directory). If it is not found, SoPlex support will be disabled. Enable optional third party libraries. They are all enabled by default. --with-soplex-includedir=DIR -DLEMON_DEFAULT_LP=GLPK The directory where the SoPlex header files are located. This is only useful when the SoPlex headers and libraries are not under the same prefix (which is unlikely). Sets the default LP solver backend. The supported values are CPLEX, CLP and GLPK. By default, it is set to the first one which is enabled and succesfully discovered. --with-soplex-libdir=DIR -DLEMON_DEFAULT_MIP=GLPK The directory where the SoPlex libraries are located. This is only useful when the SoPlex headers and libraries are not under the same prefix (which is unlikely). Sets the default MIP solver backend. The supported values are CPLEX, CBC and GLPK. By default, it is set to the first one which is enabled and succesfully discovered. --without-soplex -DGLPK_ROOT_DIR=DIRECTORY -DCOIN_ROOT_DIR=DIRECTORY -DILOG_ROOT_DIR=DIRECTORY Disable SoPlex support. --with-coin[=PREFIX] Enable support for COIN-OR solvers (CLP and CBC). You should specify the prefix too. (by default, COIN-OR tools install themselves to the source code directory). This command enables the solvers that are actually found. --with-coin-includedir=DIR The directory where the COIN-OR header files are located. This is only useful when the COIN-OR headers and libraries are not under the same prefix (which is unlikely). --with-coin-libdir=DIR The directory where the COIN-OR libraries are located. This is only useful when the COIN-OR headers and libraries are not under the same prefix (which is unlikely). --without-coin Disable COIN-OR support. Root directory prefixes of optional third party libraries. Makefile Variables ================== Some Makefile variables are reserved by the GNU Coding Standards for the use of the "user" - the person building the package. For instance, CXX and CXXFLAGS are such variables, and have the same meaning as explained in the previous section. These variables can be set on the command line when invoking make' like this: make [VARIABLE=VALUE]...' make VERBOSE=1 WARNINGCXXFLAGS is a non-standard Makefile variable introduced by us to hold several compiler flags related to warnings. Its default value can be overridden when invoking make'. For example to disable all warning flags use make WARNINGCXXFLAGS='. In order to turn off a single flag from the default set of warning flags, you can use the CXXFLAGS variable, since this is passed after WARNINGCXXFLAGS. For example to turn off -Wold-style-cast' (which is used by default when g++ is detected) you can use make CXXFLAGS="-g -O2 -Wno-old-style-cast"'. This results in a more verbose output by showing the full compiler and linker commands.