05 August 2008


CCP4 is an open-source, scientific application used in crystallography. It is written in C++ and Fortran and runs best on Linux.

A client needed help today in compiling this application on Red Hat Enterprise Linux (RHEL) 5. This blog posting is intended to provide a brief outline of getting CCP4 running on that platform.

Here's what not to try:
  1. download source
  2. use yum to get all of your prerequisites such as an old gcc compiler for c++ and fortran
  3. source the includes/ccp4.setup file after editing some of its variables
  4. set the CC and CXX environment variables to /usr/bin/gcc34
  5. ./configure linux
  6. make
That is guaranteed to fail. It blows up at the point that it is compiling the MMDB for the Clipper subcomponent. Interestingly, telling the configure script to disable clipper has no effect.

One requirement of CCP4 is that it needs Tcl, Tk, and BLT. Tcl and Tk are not well supported in RHEL5 and BLT is non-existent. By not "well supported" I mean that the tk-devel and tcl-devel rpm packages do not exist from the main Red Hat repositories.

To get around this show-stopper, I turned to my CentOS 5.2 box. CentOS is a clone of RHEL. It has a few packages that RHEL does not, especially, the Tcl and Tk libraries and header files.

Here's the recipe of what actually worked:

Build Tk/Tcl/BLT
  1. on a CentOS 5 box, use yum to install tk-devel and tcl-devel
  2. download the Tk/Tcl/BLT tarball from the CCP4 site linked above
  3. unpack the tarball and cd into it
  4. run ./configure (perhaps with --prefix=_____)
  5. note carefully the directories that it says that it will write to
  6. make; make install
  7. create a tar file with the files and locations listed in the configure output
  8. copy the resultant tar file to the RHEL box
  9. extract the files from the tar file into the same directory locations and overwrite, if necessary
Install CCP4
  1. The trick is not to compile from source but, instead, to download the linux binaries. They claim to be known to compile under the ancient RH 8/9. Grab it anyway.
  2. Unpack the binaries, edit and source the includes/ccp4.setup file, and run the BINARY.setup file.
That's it! CCP4 ought to be running on your RHEL 5 machine by this point.

No comments:

Post a Comment