| | 1 | = Install on Linux/Unix (using autotool) = |
| | 2 | |
| | 3 | == Hardware and Software Requirements == |
| | 4 | |
| | 5 | In LEMON we use C++ templates heavily, thus compilation takes a |
| | 6 | considerable amount of time and memory. So some decent box would be |
| | 7 | advantageous, but otherwise there are no special hardware requirements. |
| | 8 | |
| | 9 | You will need a recent C++ compiler. Our primary target is the GNU C++ |
| | 10 | Compiler (g++), from version 3.3 upwards. We also checked the Intel C++ |
| | 11 | Compiler (icc) and Microsoft Visual C++ (on Windows). |
| | 12 | If you want to develop with LEMON under Windows, you can use a Windows |
| | 13 | installer or you can consider using Cygwin. |
| | 14 | |
| | 15 | In this description we will suppose a Linux environment and GNU C++ Compiler. |
| | 16 | If you would like to develop under Windows and use a Windows installer, |
| | 17 | you could skip the following sections and continue reading |
| | 18 | \ref basic_concepts. |
| | 19 | However keep in mind that you have to make appropriate steps instead of |
| | 20 | the instructions detailed here to be able to use LEMON with your compiler. |
| | 21 | |
| | 22 | === LP Solver Requirements === |
| | 23 | |
| | 24 | The LEMON LP solver interface can use the GLPK (GNU Linear Programming |
| | 25 | Kit), CPLEX and {{{SoPlex}}} solver. If you want to use it, you will need at |
| | 26 | least one of these. |
| | 27 | See the '''{{{INSTALL}}}''' file how to enable these at compile time. |
| | 28 | |
| | 29 | === Install from Source === |
| | 30 | |
| | 31 | You can download LEMON from the web site: |
| | 32 | [http://lemon.cs.elte.hu]. |
| | 33 | There you will find released versions in form of {{{.tar.gz}}} files. |
| | 34 | If you want a developer version (for example you want to contribute in |
| | 35 | developing LEMON) then you might want to use our Mercurial repository. |
| | 36 | This case is detailed [install_hg later], so from now on we |
| | 37 | suppose that you downloaded a {{{.tar.gz}}} file. |
| | 38 | |
| | 39 | Thus you have to do the following steps. |
| | 40 | |
| | 41 | Download the tarball either from the browser or just issuing |
| | 42 | |
| | 43 | {{{ |
| | 44 | wget http://lemon.cs.elte.hu/pub/sources/lemon-1.0.tar.gz |
| | 45 | }}} |
| | 46 | |
| | 47 | Note, that the tarball is named {{{lemon-x.y.z.tar.gz}}} where {{{x}}}, {{{y}}} and {{{z}}} (which is missing if it is 0) are numbers indicating the |
| | 48 | version of the library, in our example we will have |
| | 49 | {{{lemon-1.0.1.tar.gz}}}. |
| | 50 | |
| | 51 | Then issue the following commands: |
| | 52 | |
| | 53 | {{{ |
| | 54 | tar xvzf lemon-1.0.1.tar.gz |
| | 55 | cd lemon-1.0.1 |
| | 56 | ./configure |
| | 57 | make |
| | 58 | make check # This is optional, but recommended. It runs a bunch of tests. |
| | 59 | make install |
| | 60 | }}} |
| | 61 | |
| | 62 | These commands install LEMON under {{{/usr/local}}} (you will |
| | 63 | need root privileges to be able to install to that |
| | 64 | directory). If you want to install it to some other place, then |
| | 65 | pass the {{{--prefix=DIRECTORY}}} flag to {{{./configure}}}, for example: |
| | 66 | |
| | 67 | {{{ |
| | 68 | ./configure --prefix=/home/username/lemon |
| | 69 | }}} |
| | 70 | |
| | 71 | We briefly explain these commands below. |
| | 72 | |
| | 73 | {{{ |
| | 74 | tar xvzf lemon-1.0.tar.gz |
| | 75 | }}} |
| | 76 | This command untars the {{{tar.gz}}} file into a directory named |
| | 77 | {{{lemon-1.0}}}. |
| | 78 | |
| | 79 | {{{ |
| | 80 | cd lemon-1.0 |
| | 81 | }}} |
| | 82 | This command enters the directory. |
| | 83 | |
| | 84 | {{{ |
| | 85 | ./configure |
| | 86 | }}} |
| | 87 | This command runs the configure shell script, which does some checks and |
| | 88 | creates the makefiles. |
| | 89 | |
| | 90 | {{{ |
| | 91 | make |
| | 92 | }}} |
| | 93 | This command compiles the non-template part of LEMON into {{{libemon.a}}} |
| | 94 | file. It also compiles the programs in the tools and demo subdirectories |
| | 95 | when enabled. |
| | 96 | |
| | 97 | {{{ |
| | 98 | make check |
| | 99 | }}} |
| | 100 | This step is optional, but recommended. It performs a bunch of library |
| | 101 | self-tests. |
| | 102 | |
| | 103 | {{{ |
| | 104 | make install |
| | 105 | }}} |
| | 106 | This command will copy the directory structure to its final destination |
| | 107 | (e.g. to {{{/usr/local}}}) so that your system can access it. |
| | 108 | This command should be issued as "root", unless you provided a |
| | 109 | {{{--prefix}}} switch to the {{{configure}}} to install the library in |
| | 110 | non-default location. |
| | 111 | |
| | 112 | Several other configure flags can be passed to {{{./configure}}}. |
| | 113 | For more information see the {{{INSTALL}}} file. |
| | 114 | |
| | 115 | === Install the Latest Development Version === |
| | 116 | |
| | 117 | You can also use the latest (developer) version of LEMON from our Mercurial |
| | 118 | repository. You need a couple additional tool for that. |
| | 119 | |
| | 120 | - [http://www.selenic.com/mercurial Mercurial] |
| | 121 | - for obtaining the latest code (and for contributing into it) |
| | 122 | - [http://www.gnu.org/software/automake/ automake] (1.7 or newer) |
| | 123 | - [http://www.gnu.org/software/autoconf/ autoconf] (2.59 or newer) |
| | 124 | - [http://www.gnu.org/software/libtool/ libtool] |
| | 125 | - [http://pkgconfig.freedesktop.org/ pkgconfig] |
| | 126 | - for initializing the build framework |
| | 127 | - [http://doxygen.org Doxygen] |
| | 128 | - for generating the documentations (optional, but recommended) |
| | 129 | |
| | 130 | Once you have all these tools installed, the process is fairly easy. |
| | 131 | First, you have to get the copy of the latest version. |
| | 132 | |
| | 133 | {{{ |
| | 134 | hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src |
| | 135 | }}} |
| | 136 | |
| | 137 | The next step is to initialize the build system. |
| | 138 | |
| | 139 | {{{ |
| | 140 | autoreconf -vif |
| | 141 | }}} |
| | 142 | |
| | 143 | Then the process is the same as in case of using the release tarball. |
| | 144 | |
| | 145 | {{{ |
| | 146 | ./configure |
| | 147 | make |
| | 148 | make check # This is optional, but recommended. It runs a bunch of tests. |
| | 149 | make install |
| | 150 | }}} |
| | 151 | |
| | 152 | To generate the documentation, just run |
| | 153 | {{{ |
| | 154 | make html |
| | 155 | }}} |