Ubuntu and CCP4
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:
- 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...
- It screwed up my X driver again, see below.
- 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.
- Installing restricted drivers is now much easier, see below.
- 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.
- 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.
- 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"
EndSection
in /etc/X11/xorg.conf
- Evolution now uses SQLite.
See also Bill Scott's
Scientific Computing on Ubuntu page.
Installing Ubuntu
- Downloaded the "AMD64" .iso file from ubuntu.com
- Burnt a bootable CD from the .iso file
- Insert CD and start machine. This gives you an OS straightaway because
it is a "live CD" a la Knoppix.
- 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.
Binary install of CCP4
- Downloaded the (32-bit) RH8 set of binaries. Just to see if it
works - will try compile-from-source later.
- Did "sudo ./install.sh" and accepted all defaults.
- 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!).
- 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.
- 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
- This was my first bit of building, and so needed to download a few
things from Synaptic: gcc-4.0, make
- Took the CCP4 source bundle and ran "sudo ./install.sh"
- 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
2134c2134
< system=MP-RAS-`awk '{print }' /etc/.relid'`
---
> system=MP-RAS-`awk '{print }' /etc/.relid`
7325c7325
< system=MP-RAS-`awk '{print }' /etc/.relid'`
---
> system=MP-RAS-`awk '{print }' /etc/.relid`
and similarly for Tk.
- There is no explicit 64-bit support. However, gcc on my system
defaults to 64-bit, so that's OK.
Source build of CCP4
- Needed to download a few more things from Synaptic: gfortran 4.0.3, m4
- Using CVS version of CCP4, which has a few differences from 6.0.1
- Using "configure --with-shared-libs --with-warnings --disable-x linux"
- 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.
- 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.
- 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.
- Need "bison" package (synaptic) for RCSB PDB_EXTRACT suite.
- Miles Pufall (Oct 2006) reports that he needed the following packages
in addition:
- glkcanvas (I installed a number of variants - not sure which worked)
- automake (1.4-1.9) (MDW: I seem to remember getting warnings, but this
should not be necessary since we supply .in files as well as .am files)
- f2c
- gawk
- guile (MDW: presumably just for Coot)
Source build of Phaser
- 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.
- 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