This is an old revision of the document!
Compiling CWB from source under Linux
Compilation and installation of CWB version cwb-2.2.b99-RC1, tested on Ubuntu 8.04 (Hardy Haron)
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
- libncurses5-dev
So, in case they are not installed, all you have to do in Ubuntu (or other debian-based distros such as Mepis) is:
sudo apt-get install autoconf bison flex gcc libc6-dev libncurses5-dev
Getting the source code
Get the source code from here, and unpack it:
tar xf cwb-XXXXXX.tgz
Enter the new directory:
cd /cwb-2.2.b99-RC1
Edit config.mk
First you need to include the right platform in config.mk
using your favorite editor, we used nano:
nano -w config.mk
Change the line:
include $(TOP)/config/platform/darwin-g4
to:
include $(TOP)/config/platform/linux
This section of the file should now look like this:
[...] # 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 [...]
Compilation
Next compile the different components, one at a time. First clean and check dependencies:
make clean make depend
Then compile the corpus library:
make cl
Now editline
make editline
Then utilities
make utils
Finally compile cqp
:
make cqp
Installation
Now we're ready to install the whole toolkit:
sudo make install