install:compile_linux

This is an old revision of the document!


Compiling CWB from source under Linux

Compilation and installation of CWB version 2.2.b98

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

Get the source code from here, and unpack it:

tar xf cwb-XXXXXX.tgz

Enter the new directory:

cd cwb-3.0

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
[...]

Then we compile the different components, one at a time. First we clean and check dependencies:

make clean
make depend

Then we compile the corpus library:

make cl

Editline is a bit of a problem at the time, hopefully it will be fixed very soon, but right now you have to follow this procedures to compile it correctly:

cd editline
make clean
autoconf 
./configure
cd ..
make editline

Then the utilities

make utils

Finally we compile cqp:

make cqp

Now we're ready to install the whole toolkit:

sudo make install
  • install/compile_linux.1219078519.txt.gz
  • Last modified: 2008/08/18 18:55
  • by 137.204.90.135