Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| install:compile_linux [2010/12/01 01:52] – UoIaulmGoSIyygUqcA 85.255.197.125 | install:compile_linux [2010/12/03 09:30] (current) – old revision restored eros | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - |   | + | ====== Compiling CWB from source under Linux ====== | 
| + | |||
| + | Compilation and installation of CWB version 2.2.104, tested on Ubuntu 9.10 (Karmic Koala) | ||
| + | |||
| + | ===== Prerequisites ===== | ||
| + | |||
| + | You just need a working linux installation. If you're using a " | ||
| + | |||
| + | * autoconf | ||
| + | * bison | ||
| + | * flex | ||
| + | * gcc | ||
| + | * libc6-dev | ||
| + | * libglib2.0-dev | ||
| + | * libncurses5-dev | ||
| + | * make | ||
| + | * subversion | ||
| + | |||
| + | So, in case they are not installed, all you have to do in Ubuntu is: | ||
| + | |||
| + | < | ||
| + | sudo apt-get install autoconf bison flex gcc libc6-dev libglib2.0-dev libncurses5-dev make subversion | ||
| + | </ | ||
| + | ===== Getting the source code ===== | ||
| + | |||
| + | Get the source code using subversion, see [[http://cwb.sourceforge.net/download.php# | ||
| + | |||
| + | Enter the new directory: | ||
| + | |||
| + | <code bash> | ||
| + | cd cwb-3.0 | ||
| + | </code> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Edit config.mk ===== | ||
| + | |||
| + | First you need to include the right platform in '' | ||
| + | |||
| + | <code bash> | ||
| + | nano -w config.mk | ||
| + | </code> | ||
| + | |||
| + | Change the line: | ||
| + | |||
| + | < | ||
| + | include $(TOP)/config/platform/ | ||
| + | </ | ||
| + | |||
| + | to: | ||
| + | |||
| + | < | ||
| + | include $(TOP)/ | ||
| + | </ | ||
| + | |||
| + | or | ||
| + | |||
| + | < | ||
| + | include $(TOP)/ | ||
| + | </ | ||
| + | |||
| + | or | ||
| + | |||
| + | < | ||
| + | include $(TOP)/ | ||
| + | </ | ||
| + | |||
| + | This section of the file should now look like this: | ||
| + | |||
| + | < | ||
| + | [...] | ||
| + | # PLATFORM-SPECIFIC CONFIGURATION (OS and CPU type) | ||
| + | # | ||
| + | # Pre-defined platform configuration files:  | ||
| + | #        | ||
| + | #        | ||
| + | #          | ||
| + | #          | ||
| + | #        | ||
| + | #          | ||
| + | #          | ||
| + | #          | ||
| + | #        | ||
| + | #        | ||
| + | # | ||
| + | include $(TOP)/ | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Compilation ===== | ||
| + | |||
| + | Next compile the different components, one at a time. First clean and check dependencies: | ||
| + | |||
| + | <code bash> | ||
| + | make clean | ||
| + | make depend | ||
| + | </ | ||
| + | |||
| + | Then compile the corpus library: | ||
| + | |||
| + | <code bash> | ||
| + | make cl | ||
| + | </ | ||
| + | |||
| + | Now '' | ||
| + | |||
| + | <code bash> | ||
| + | make editline | ||
| + | </ | ||
| + | |||
| + | Then '' | ||
| + | |||
| + | <code bash> | ||
| + | make utils | ||
| + | </ | ||
| + | |||
| + | Finally compile '' | ||
| + | |||
| + | <code bash> | ||
| + | make cqp | ||
| + | </ | ||
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | Now we're ready to install the whole toolkit: | ||
| + | |||
| + | <code bash> | ||
| + | sudo make install | ||
| + | </code> | ||