STFC
Computational Science and Engineering Department
CCP4
BBSRC
CCP4Home What is CCP4? CCP4 Projects Downloads Documentation Courses Developers CCP4 people

CCP4 under Linux


Linux has been a standard supported platform for CCP4 since version 4.1 of the software suite. With the increased maturity of the platform and GNU compiler suite the installation should be straightforward, see the CCP4 Installation Documentation. (Note that CCP4 also supports an option to configure and build the suite using the Intel compiler set, via the configure system linux_intel_compilers.)

However, with the proliferation of different flavours of Linux (Red Hat, SuSE, Mandrake, Debian, Fedora...) it is increasingly difficult for us to keep up-to-date with all the issues that might occur when installing CCP4 on these platforms. Often, experiences vary and reports of problems (and their solutions) are anecdotal.

This page records some of those experiences with installing and using CCP4 under different versions of Linux (with thanks to those people who supplied this information, for taking the time to send it to us). Additional details of the status of CCP4 under linux may also be found in the pages maintained by Kevin Cowtan: http://www.ysbl.york.ac.uk/~cowtan/ccp4/ccp4.html.



Debian

See http://www.debian.org.

Ubuntu

6.5 (January 2014, reported by Kevin Cowtan)

I don't know if anyone else is having problems with ccp4i fonts looking very ugly under Linux, in particular recent versions of Ubuntu? I couldn't find anything about it online.

Well, if you are, I have the solution.

  1. Install at least the xfonts-75dpi or xfonts-100dpi packages
  2. Create a .rootrc file in your home directory containing X11.UseXft: Yes

The following commands should fix it for you. You'll have to enter your password after the first step:

sudo apt-get install xfonts-100dpi
echo "X11.UseXft: Yes" >> .rootrc

6.3.0 (Ville Uski, December 2012)

I compiled CCP4 6.3.0 in a Linux container, running Ubuntu 12.04 ('Precise Pangolin'). To do this, I installed the same packages as for CCP4 6.2.0, below, and additionally these packages:

6.2.0 (Ville Uski, September 2011)

To compile manually CCP4 6.2.0 with Phaser & CCTBX from sources on 64-bit Ubuntu 11.04, Natty Narwhal, I installed the following packages:

xfonts-100dpi includes the same fonts as xfonts-75dpi, but the former package seemed to be broken.

To build the Tcl/Tk++ source, I also installed

This now builds without problems on Ubuntu.

6.1.24 (David Waterman, April 2011)

In order to compile CCP4 6.1.24 with Phaser & CCTBX from source on 64-bit Ubuntu 10.10 I installed these packages:

Other dependencies were either already present or installed automatically with the above. As explained, the default blt on Ubuntu doesn't contain bltwish and one that does isn't available on the standard repositories. So, you may need to build your own from the sources on the ftp site. Note that old versions of the tcltkplusplus tarball contain syntax errors in the build scripts that cause problems on Ubuntu. An updated tarball will be available with release 6.2.0.

In addition to the above packages, in order to build the tcltkplusplus source successfully I needed to install:

6.1.24 (Eugene Krissinel)

Compiling CCP4 from sources on freshly installed Ubuntu 10.04 will need the following packages installed from Ubuntu repositories:

The ccp4 binaries are 32-bit, so when using 64-bit ubuntu the 32-bit compatibility library is required (thanks Ben Eisenbraun for the tip)

So are you running a 64-bit installation?  (uname -m)
Do you have the ia32-libs package installed? (dpkg -l ia32-libs)

In order to install, use command

apt-get install [package-name]

For example,

apt-get install gcc

There is no harm in running apt-get if needed package is already installed, so you may want to simply get them all.

6.0 (Martyn Winn)

I'm now the proud owner of an Ubuntu 6.06 (Dapper Drake) system. Some notes on setting it up, and in particular installing and running CCP4, are on this page.

6.0-prerelease (Bill Scott, January 2006)

I'm not a developer, but I messed around a bit with gfortran on the latest debian (ubuntu).

Mosflm compiles but is completely broken by gfortran 4.0. Using the CCP4 5.99.5 patch, I found that CCP4 compiles out of the box with gfortran, gcc4 and g++4. (I found that I had to have CCP4 build its own version of fftw for clipper to compile). I ran the unix runnable examples. It hangs on findncs.exam. watertidy-3shells failed. The g77 version I compiled passes all the tests.

Bill

PS: As you found, g77-3.4 works just great with gcc-4.x

Debian 3.0 (Woody)

5.0.1 (Tom Caradoc-Davies, July 2004)

I am writing about a minor hassle when installing CCP4-5.0.1 on Debian Woody systems which is a fault of Debian and NOT CCP4!

I installed CCP4-5.0.1 on a Debian Woody (3.0) system and got an error complaining about a missing libg2c.so.0. This package does not appear to be in the current Stable Debian distro despite installed g77/f77/gcc/fortran libs etc.

This can be fixed by installing the debian package libg2c0 from either Testing:
http://packages.debian.org/testing/libs/libg2c0

Or Unstable:
http://packages.debian.org/unstable/libs/libg2c0

You probably know about this already but I just wanted to let you know in case you have any Debian users Emailing you in the future with this problem.

Debian 3.3 (Sid)

Debian 3.3 Sid (unstable) includes version 4 of the GNU compilers and associated libraries which include gfortran 4.0.3. CCP4 will not compile with this. Install the g77 compiler using

     apt-get install g77
then see the gfortran advice.


Red Hat and Fedora problems

Missing fonts for X11 programs

(July, 2010)

Later versions of Fedora using Xorg X11 do not have the adobe-courier fonts required by several of the X11 programs. These can be installed using yum

Missing bltwish in Fedora extras rpm

(March, August 2005)

The BLT 2.4-10.z rpm on Fedora Extras has a bug which means it does not install bltwish. Dave Love came up with a solution and a patched version of the RPM is available (see below). This has been found to work on Fedora Core 3 and Red Hat Enterprise WS 4.

Install this patched rpm.

     rpm -Uvh blt-2.4-11.z.i386.rpm

It could be necessary to create a couple of symbolic links too. If you get a bltwish not found error:

     ln -s /usr/bin/bltwish24 /usr/bin/bltwish

If bltwish complains that it can't find libBLT24:

     ln -s /usr/lib/blt2.4/libBLT24.so /usr/lib/libBLT24.so

Fedora

6.1.24 (Eugene Krissinel, Sept 2010)

Compiling CCP4 from sources on freshly installed Fedora 13 will need the following packages installed from Fedora repositories:

In order to install, use command

yum install [package-name]

For example,

yum install gcc

There is no harm in running yum if needed package is already installed, so you may want to simply get them all.

(July 2004)

Reports are coming in of CCP4 running successfully on the Fedora platform. In particular, the RedHat 9 binaries distributed for CCP4 release 5 apparently work OK.

The automatic download script download-5.0.1.sh won't work because the OS version is not found correctly. The script can be edited after line 215 to add "os_version=9" so that it looks like:

    ...
    binsystem="linux"
    # For Red Hat systems try to locate a version
    if test -f /etc/redhat-release; then
      # Get the os version from the redhat file
      os_version=`cat /etc/redhat-release | cut -d" " -f5`
    else
      # Default to the earlier version
      os_version=8.0
    fi
    os_version=9     <-- Add this line
    os_version="RedHat${os_version}"
    ;;
  SunOS)
    ...

(Reported by Phil Evans, December 2005)

There is a reported problem with SCALA on Fedora3, the program gets "stuck". This has been traced to the LAPACK routine DSYEV, when the suite is compiled against the system-supplied LAPACK libraries.

Currently the fix is to build the suite using the Netlib LAPACK libraries which are supplied as part of the CCP4 distribution, by specifying the --with-netlib-lapack option of configure when initially building the suite.

For more details, see Jay Painter's page on Fedora Core 3.

Fedora Core 4

Fedora Core 4 comes with version 4 of the GNU compilers and associated libraries. To install a binary version of CCP4 6 make sure you have installed the compatibility packages listed below then select the Fedora Core 1-4 packages from the download pages.

For help compiling CCP4 on these systems see the gfortran advice.

Older advice. The above advice should be sufficient. Tony Pemberton reports a successful installation under FC4, following Jay Painter's instructions for FC3: "I used the suggested GCC-3.3.5 vanilla source. I compiled and installed in /usr/local using the native compiler. Then removed the default gcc rpm (native) using yum remove gcc (also gets rid of other related stuff - dependencies). The installation [of CCP4] was then very straightforward."

Red Hat 9

(July 2004)

There are problems running CCP4 programs when the suite is compiled with the --with-shared-libs option and using the compilers shipped with RH9.

The installation falls over when the ccif installation tries to run the cifdic_to_symtab program. If this is circumvented, then the suite appears to install, but programs such as sfall die with a segmentation fault. This has been observed at least for CCP4 versions 5.0 and 5.0.1. There are no problems when compiling statically, i.e. without the --with-shared-libs option.

This problem has been traced to problems in the gcc compilers. The problems go when RedHat up2date is run and at least these packages are updated:

     glibc-2.3.2-27.9.6.i686.rpm          glibc-utils-2.3.2-27.9.6.i386.rpm
     glibc-common-2.3.2-27.9.6.i386.rpm   nptl-devel-2.3.2-27.9.6.i686.rpm
     glibc-devel-2.3.2-27.9.6.i386.rpm    nscd-2.3.2-27.9.6.i386.rpm
     glibc-profile-2.3.2-27.9.6.i386.rpm

CentOS

CentOS is a re-distribution of Red Hat's open source software. See www.centos.org.

We have had a report that the CCP4 RedHat binaries for 5.99.5 work fine on CentOS 4.2

Scientific Linux 6.0

(David Waterman, April 2011)

Like CentOS, Scientific Linux is a free & open source distribution based on Red Hat Enterprise Linux. I installed Scientific Linux 6.0 using the two "Everything" DVD images from the download site. To build CCP4 6.1.24 with Phaser & CCTBX I first installed the following packages:

I built Tcl/Tk/Blt and the extras required for iMosflm using the tcltkplusplus-8.4.18-src.tar.gz tarball available in the /extras subdirectories of the ftp site. Note this tarball will be updated for the 6.2.0 release.


SuSE

Advice on installing the SuSE Linux operating system can be found here.

SuSE 10

The CCTBX Python bindings from the executable install of Phaser/CCTBX do not work correctly with SuSe 10. Either use the CCP4 Python binaries too (follow this advice) or compile as follows.

A tested combination which works on SuSe 10 is to select source files for CCP4, Phaser/CCTBX, CHOOCH and TclTkBLT, and the SuSe 9-9.2 executables for Coot and CCP4MG. It is not necessary to install the CCP4 version of Python, but you should ensure you have the SuSe Python development packages installed (see below). If you do install the CCP4 Python (which must be done from source) you should be aware that will have to separately install any non-standard Python modules (e.g. Numeric) for use with the CCP4 version of Python. SuSe 10 comes with version 4 of the GNU compilers and associated libraries so you will need several compatibility packages. Make sure you have installed the packages listed below.

These can be installed using YaST2.

You can then compile and install by sourcing the install.sh script in the CCP4 download archive after setting the FC environment variable to g77 (see the gfortran advice).

SuSE 9.1

(From Graeme Winter, July 2004)

Firstly, you need to ensure that you have the following packages installed - some will be there by default but I'm trying to cover all bases here!

That's all I can think of for the moment. You can use "yast" to install these (probably what I would do) or redhat-config-packages in the case of redhat linux.

Once you have these installed, download or get hold of the latest tarball of CCP4 (ccp4-5.0.1.tar.gz at the time of writing) and decide where you want this installed - for instance /opt/xtal

So, what next... we need to unpack the tarball in this directory:

tar xfz ccp4-5.0.1.tar.gz -C /opt/xtal

and then go in and make the changes to ccp4.setup as well documented elsewhere (I'm sure Peter can supply you with a link for this) The next stage is to decide where this is going to be running. If the machine is a laptop or PC with low-ish resolution (1024x768) the Mosflm GUI will be "too big" for the screen - but we can fix this!

cd $CCP4/x-windows/Mosflm
./to_small.csh

Ok, assuming that this is all now sorted, to the "configure; make; make install dance":

cd $CCP4
./configure --with-x linux
make
make install

probably a good time for a cup of tea now.

Finally you`ll need to have tcl/tk/blt installed - there is a binary tarball on the CCP4 ftp site or CD which I use for this - just unpack this somewhere and set the appropriate pointer in ccp4.setup - I think that is something like CCP4_TCLTK.

SuSE 8.1

(January 2006)

The CCP4 6.0 binaries for linux are known not to work with glibc 2.2.5 which comes with this SuSE distribution. It is recommended that you install the suite from the source code if you are using SuSE 8.1.


Gentoo

See http://www.gentoo.org.

Donnie Berkholz has provided autotools for building most things in the src and x-windows directories:

"I finished up pretty much everything in src/ (except pdb_extract and phaser) in a day or so, but x-windows/ isn't done yet. The tarball's available at: http://dev.gentoo.org/~spyderous/ccp4-6.0-autotool.tar.bz2 It includes a README file in src/ that describes some caveats I haven't fixed yet, such as mandatory X/tcl/tk support, lack of support for internal lapack, etc. So far, it's pretty much the minimum necessary to get things working; lots more needs to be converted from system/OS tests to feature tests in the source code."

(October 2006)

Klaas Decanniere installed CCP4 on an amd64 using gcc4.1.1:

The automatic install script failed, so I went about and did manual install (static libraries, gfortran).

Things I have changed to get it going:

- in ccp4-6.0.1/src/harvest_app_/pdb_extract/etc/make.platform.gnu4 deleted the -Werror flag (it worked very well, detecting a calculation that will never get used and exiting).

- csh is no longer maintained on gentoo, and install depends on it. I've forced installation of csh, but that didn't work, so I dumped csh again. I then installed tcsh, searched for all csh scripts, and changed #! /bin/csh into #! /bin/tcsh. This seems to do the trick.

This seems to compile everything, and preliminary tests are looking good. Now for coot.


Compiler Issues

gfortran

gfortran supplanted g77 as of the 4.x release of the GNU compilers. gfortran has the potential advantage that it supports some Fortran-90 features.

CCP4 6.0 will compile under gfortran 4.1 and 4.2. It will not, however, compile using gfortran 4.0. A patch is available that will make most things compile under gfortran 4.0 (but will then break g77 compilation). However, some programs (notably Mosflm) may not run properly.

The current advice (January 2006) is to use an appropriate version of g77 with gcc-4.x. On Suse 10 and Fedora Core 4 this involves installing the appropriate packages (see Suse 10, FC 4, Debian 3.3), then setting the environment variable FC to "g77" before the configure/compile/install of CCP4, or to upgrade gfortran to 4.2. The latest gfortran binaries are available from the gfortran wiki.

Problems with gcc versions 2.96, 2.97

(Date uncertain - late 2000?)

Problems have been reported with gcc 2.96. GCC versions 2.96 and 2.97 (gcc -v) are not part of the stable tree, they are developmental (http://www.gnu.org/software/gcc/gcc.html).

Warning: Red Hat 7.0 comes with gcc 2.96(.54). The compilation of the suite may be unreliable. Run the refmac5_tls.exam in $CEXAM/unix/runnable: this should stop after 20 cycles with an Free R-factor of about 0.198.

2.95-1:   Works for refmac at -O2
2.96-54:  Fails for CCP4 libraries and refmac5 -O1
2.96-69:  May fail for CCP4 libraries or refmac5 -O1 (result of RH bug fix for gcc 2.96 
                                                      of 19-12-00)

Please watch http://www.redhat.com/support/errata.

We do not know the extent of this problem. A solution, at the price of an order of a magnitude slower execution, is to turn off optimization (-O0) for all compilations.

Note: The recommend GNU compiler set is gcc 2.95.2 with g77 0.5.25. (22-02-01)

Problems with g77 version 0.5.23

(Date uncertain - late 2000?)

Thanks to Fred for the majority of this and for pointing out the problem!

If you follow the usual procedure of configure/make the make will stop when trying to make amore.f in $CPROG with a horrid fortran compiler error which seems to mean nothing!

what you should do is edit $CPROG/Makefile to change the FOPTIM line from -O to -O0 then the make procedure for the main suite will run ok.

The resulting code will mean that the supported programs will not be optimised and will not be at their best performance. If you are really troubled by this then you can make amore with the -O0 option and the remainder of the programs with -O[0-3] eg -O3

Incomplete compiler installation

(Date uncertain - late 2000?)

Some distributions do not install the kernel-headers and glibc-devel rpms by default. This results in linking failing with "asm/errno.h: No such file or directory". The solution is to install the missing rpms.

Problems with gcc versions 3.4.1

Thanks to Vladimir Guranovic, 5th August 2003

A problem has been identified with g++ 3.4.1 when compiling pdb_extract, although this does not affect the rest of the suite. Accessing of protected variables (defined in the base class) without specifying full scope identifier, from the methods in the derived class is not recognized and those variables are identified as not being defined.

At the moment, the only way to avoid this is to compile with pre-3.4.* compilers. Recommended GNU compiler set is gcc-3.3.3.


Issues with Python

Determining the compilation options for your Python binaries

The Python configuration information can be found in the Makefile in the python<version>/config directory. For example in a Suse 10 standard Python installation it is in /usr/lib/python2.4/config/Makefile.

This is useful for ensuring you have the correct version of the cctbx Python interface for your system. One Phaser/CCTBX package will work with Python compiled with the --enable-unicode=ucs4 option while the other will work with systems compiled with utf8 unicode. Look for enable-unicode in the python<version>/config file to see which is appropriate for your system. For Suse 10 it is ucs4.