Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 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 "desktop" linux installation (such as Ubuntu), you may need to install the following packages: * 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: <code> sudo apt-get install autoconf bison flex gcc libc6-dev libglib2.0-dev libncurses5-dev make subversion </code> ===== Getting the source code ===== Get the source code using subversion, see [[http://cwb.sourceforge.net/download.php#svn|this page]] for instructions. Enter the new directory: <code bash> cd cwb-3.0 </code> ===== Edit config.mk ===== First you need to include the right platform in ''config.mk'' using your favorite editor, we used nano: <code bash> nano -w config.mk </code> Change the line: <file> include $(TOP)/config/platform/darwin-universal </file> to: <file> include $(TOP)/config/platform/linux </file> or <file> include $(TOP)/config/platform/linux-64 </file> or <file> include $(TOP)/config/platform/linux-opteron </file> This section of the file should now look like this: <file> [...] # PLATFORM-SPECIFIC CONFIGURATION (OS and CPU type) # # Pre-defined platform configuration files: # unix standard Unix configuration [must set ENDIAN manually!] # linux i386-Linux (generic) # linux-64 - configuration for 64-bit CPUs # linux-opteron - with optimimzation for AMD Opteron processor # darwin Mac OS X / Darwin [use one of the CPU-specific entries below] # darwin-g4 - with optimization for PowerPC G4 processor # darwin-g5 - with optimization for PowerPC G5 processor # darwin-i386 - configuration for i386-compatible processors # solaris SUN Solaris 8 for SPARC CPU # cygwin Win32 build using Cygwin emulation layer (experimental) # include $(TOP)/config/platform/linux [...] </file> ===== Compilation ===== Next compile the different components, one at a time. First clean and check dependencies: <code bash> make clean make depend </code> Then compile the corpus library: <code bash> make cl </code> Now ''editline'' <code bash> make editline </code> Then ''utilities'' <code bash> make utils </code> Finally compile ''cqp'': <code bash> make cqp </code> ===== Installation ===== Now we're ready to install the whole toolkit: <code bash> sudo make install </code> install/compile_linux.txt Last modified: 2010/12/03 09:30by eros