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.104, tested on Ubuntu 9.10 (Karmic Koala)

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:

sudo apt-get install autoconf bison flex gcc libc6-dev libglib2.0-dev libncurses5-dev make subversion

Get the source code using subversion, see this page for instructions.

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-universal

to:

include $(TOP)/config/platform/linux

or

include $(TOP)/config/platform/linux-64

or

include $(TOP)/config/platform/linux-opteron

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

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

Now we're ready to install the whole toolkit:

sudo make install
  • install/compile_linux.1269941324.txt.gz
  • Last modified: 2010/03/30 11:28
  • by 84.220.172.38