ubuntu logoUbuntu and CCP4 ubuntu logo

My system

Dear World - I am now the proud owner of an Intel P4 D975 3.6 GHz machine. This is dual-core with EM64T architecture. It has a Sapphire ATI Radeon X1300 graphics card. I have installed Ubuntu 6.06 LTS (Dapper Drake). This document details what I've had to do to get things up and running, in particular with regard to CCP4. This is written "as is", but I hope some may find useful snippets here.

Update Dec 07: I have finally updated to Ubuntu 7.04, Feisty Fawn. This was prompted by the need to have a more recent gfortran - the update path for a given Ubuntu version only goes so far. Issues with the update:

  1. Need to via Ubuntu 6.10 (Edgy Eft) to use the in-situ update. There is now Ubuntu 7.10 - the Gutsy Gibbon - released in October 2007, but two upgrades are enough for now...
  2. It screwed up my X driver again, see below.
  3. Updates are hampered by download failures from the repositories.

Update May 08: Now upgraded to Ubuntu 8.04, Hardy Heron. Failed to upgrade to Gutsy Gibbon, so installed new Hardy Heron over top of Feisty Fawn. Hence lost lots of optional packages, ho hum. But basically all crystallographic stuff is working fine.

  1. Installing restricted drivers is now much easier, see below.
  2. Found brilliant app for installing 32bit compatibility libraries: getlibs (see http://ubuntuforums.org/showthread.php?t=474790)

Update Jan 10: Updated to Jaunty Jackalope (9.04) via Intrepid Ibex. Not going to Karmic Koala yet - reports of major user problems.

  1. Driver is set as "ati", which looks more useable than the "vesa" one I got originally (see below). Yes it is, see the ATI driver wiki, which says that "ati" is a wrapper for "radeon". Rumours that ATI don't support "fglrx" for jaunty and later. In fact, support has been moved from the proprietary "fglrx" drivers to the open source "radeon/radeonhd" drivers.
  2. Nevertheless, I do have problems with graphics programs such as VMD and Coot, with windows failing to refresh when moved or brought into focus. This seems to be solved by disabling the Composite extension. This is done with the section
    Section "Extensions"
    	Option "Composite" "Disable"
    in /etc/X11/xorg.conf
  3. Evolution now uses SQLite.

Update August 10: Tried to update to Lucid Lynx (10.04) via Karmic Koala, but screwed up somehow, so ended up installing fresh Lucid Lynx over the top of my existing installation. I got in a mess, so hard to give coherent comments:

  1. /etc/X11/xorg.conf is apparently no longer necessary, and at the moment I don't have one.
  2. I found "aptitude safe-upgrade" and "aptitude full-upgrade" quite useful.
  3. At one point, I got trapped with it booting into safe xterm mode. It took a while to discover that the "gnome-session" package had been lost.
  4. I think I have compiz running.
  5. It is now a beautiful mauve!

Update March 11: Upgraded to Maverick Meerkat (10.10). OK so far ...

See also Bill Scott's Scientific Computing on Ubuntu page.

Installing Ubuntu

  1. Downloaded the "AMD64" .iso file from ubuntu.com
  2. Burnt a bootable CD from the .iso file
  3. Insert CD and start machine. This gives you an OS straightaway because it is a "live CD" a la Knoppix.
  4. Follow instructions and install. Since this is only one CD, you get a basic OS with few packages. The idea is that you download packages as you need them, rather than fighting with 27 install disks.

Ubuntu as a guest OS

I have now installed VirtualBox onto my Windows laptop, and installed Ubuntu Lucid Lynx as a guest OS.

Basic install is very straightforward, but you find you are stuck at a maximum screen resolution of 800 x 600. The solution (thanks Ronan!) is to install Guest Additions. I followed the official route, downloaded the .iso, mounted it an external disc, and tried to install but failed. Despite apt-get-ing as many relevant packages as I could think of.

But I discovered that I could apt-get packages virtualbox-guest-additions and virualbox-ose-* (ose = open source edition), and that seems to do the trick. Not sure if I needed them all ...

Tip-of-the-day: "dkms status" is useful for seeing what has been added to the kernel.

Binary install of CCP4

  1. Downloaded the (32-bit) RH8 set of binaries. Just to see if it works - will try compile-from-source later.
  2. Did "sudo ./install.sh" and accepted all defaults.
  3. run-all crashed a few times, for the trivial reason that the basic Ubuntu doesn't have a C-shell! Found it via Synaptic and now run-all completes (haven't checked the numbers!).
  4. ccp4i doesn't work as no bltwish. This is a known problem: Ubuntu/Debian don't include bltwish in the Blt package. Bill Scott has supplied a supplmentary package to provide bltwish. Once you have downloaded this .deb file, run "sudo dpkg -i bltwish*.deb". Unfortunately for my purposes, it is 32-bit and incompatible with the Blt package I have. I therefore built from source, see below.
  5. Note, my version of bash doesn't like the re-definition of "alias" used in ccp4.setup-bash. However ccp4.setup-sh, which is used by the install.sh script, is fine. The re-definition of "alias" uses a function declaration which doesn't work inside eval for some reason. Adding the supposedly optional "function" keyword solves it. This will be in ccp4.setup-bash for 6.0.2

Source build of TclTkBlt

  1. This was my first bit of building, and so needed to download a few things from Synaptic: gcc-4.0, make
  2. Took the CCP4 source bundle and ran "sudo ./install.sh"
  3. There appear to be some syntax errors in the Tcl and Tk configure files:
    $ diff tcl8.4.9/unix/configure_orig tcl8.4.9/unix/configure
    <               system=MP-RAS-`awk '{print }' /etc/.relid'`
    >               system=MP-RAS-`awk '{print }' /etc/.relid`
    <               system=MP-RAS-`awk '{print }' /etc/.relid'`
    >               system=MP-RAS-`awk '{print }' /etc/.relid`
    and similarly for Tk.
  4. There is no explicit 64-bit support. However, gcc on my system defaults to 64-bit, so that's OK.

Source build of CCP4

  1. Needed to download a few more things from Synaptic: gfortran 4.0.3, m4
  2. Using CVS version of CCP4, which has a few differences from 6.0.1
  3. Using "configure --with-shared-libs --with-warnings --disable-x linux"
  4. There are on-going issues with gfortran, so this section will get out-of-date very soon! For the record, I've fixed a problem with SETFLAGS and lgglib.
  5. It seems gfortran buffers the Fortran output so that it appears after the C output, and hence the program log files look a mess. Remember, we enforce C line buffering in library_utils.c, so that output from the C libraries appears almost straightaway. We therefore need to switch off the Fortran buffering with "export GFORTRAN_UNBUFFERED_ALL=Y". Thanks to Charles for this hint.
  6. Now trying to build the x-windows stuff. I found I needed to download the Xaw headers (package libxaw7-dev in synaptic), the ncurses headers (package libncurses5-dev in synaptic) and also the "flex" tool. After that, all was fine.
  7. Need "bison" package (synaptic) for RCSB PDB_EXTRACT suite.
  8. Miles Pufall (Oct 2006) reports that he needed the following packages in addition:

Source build of Phaser

  1. File .../src/phaser/conf/configure-options needs line changing to "setenv LD_ASSUME_KERNEL 2.6.15" (previously 2.4.1). I am investigating how this should be done automatically.
  2. My build failed trying to find pyconfig.h Disovered that in the usual Ubuntu way, python is only partially installed. Using Synaptic to install package python2.4-dev solves it.

Binary install of Coot

Got Kevin's recent Ubuntu build from: http://www.ysbl.york.ac.uk/~cowtan/coot/. That failed with:

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'
CATASTROPHIC ERROR:: in gl_extras  no GtkGL widget!
CATASTROPHIC ERROR:: failed to create Gtk GL widget
This is a problem with my X server, which I solved (see below). With that, Kevin's build runs fine.

I had also tried using the RH8 binaries. Complains about missing libgdk_imlib.so.1 In fact, I have this 64-bit but not 32-bit. I started providing libraries, either taking from Kevin's distro, or adding softlinks in /usr/lib32, but too many required, and got bored.

Source build of Coot

Miguel Ortiz Lombardia posted a set of instructions on the Coot BB to get coot-0.2 built on Ubuntu. These worked for me, except that I needed to download a few more packages through Synaptic and make a few more soft links (this just means my set-up was less complete than his).

Packages downloaded: guile-1.6, guile-1.6-dev, libglib1.2-dev, libgtk1.2-dev, libatk1.0-dev, libglade2-dev, libglib2.0-dev, libgtk2.0-dev, libgtkgl2.0-1, libgtkgl2.0-dev, imlib11, imlib11-dev, libimlib2-dev, libgsl0, libgsl0-dev, gtkglarea5, gtkglarea5-dev, gdk-imlib11-dev, libart-2.0-dev, libart2, libgtk-canvas1, libgtk-canvas1-dev, libart-dev

That's not meant to be an exhaustive list (!) but just suggestions of what to try if something won't link. Hint: if something says it can't find *-config script, you are missing the *-dev package.

Coot 0.2 requires a more recent version of Clipper than is available in CCP4 6.0.2 The version in ftp://ftp.ccp4.ac.uk/prerelease/ccp4-onlylibs-dev.tar.gz works.

Graphics, drivers and X server

I have a "Sapphire ATI Radeon X1300" graphics card. My original Ubuntu system had the "vesa" driver, which apparently is crap and only a fallback driver. Essentially, I swapped to using the "fglrx" driver which worked, but that was not as straightforward as I would have hoped.

Update Hardy Heron: "fglrx" drivers can now be installed from Synaptic (needs restricted software source available). They are enabled from Administration -> Hardware Drivers.

A useful guide is available at http://wiki.cchtml.com/index.php/Ubuntu_Dapper_Installation_Guide for Dapper, or http://wiki.cchtml.com/index.php/Ubuntu_Feisty_Installation_Guide for Feisty. Method 1 didn't seem to work for me, but Method 2 did. The problem with Method 1 is that it installs too old a version of the driver (see /var/log/Xorg.0.log) so you need to use Method 2 to install the latest version. Drivers are available from here.

A miscellaneous set of hints:

Different wallpapers for different workspaces

Unlike KDE, Gnome doesn't allow you by default to have multiple wallpapers for different workspaces. Thankfully, there is the Wallpapoz tool which is easy to install, and does the job.

Martyn Winn
Last modified: Wed Dec 19 10:47:06 GMT 2007