Bioscreencast Wiki > Crystallography Howtos > Installing ccp4-6.0.99e on 64 bit Ubuntu

Installing ccp4-6.0.99e on 64 bit Ubuntu

From $1

Table of contents
No headers

A really short guide to getting ccp4-6.0.99e running on a dual cpu , 64 bit Ubuntu  box   .  The installation of Ubuntu was a default installation from CD with no customization of the kernel.

The steps followed to get CCP4 working were:

  1. Obtain the ccp4 pre-release packages from the links in the email announcing ccp4-6.0.99e
  2. Untar the packages to a users home directory 
  3. "cd" into the directory and edit the ccp4.setup-sh for bash shell (Note 1) . You only want to change the location of the $CCP4_MASTER variable.
  4. Source that file ccp4-setup.sh . You will get some messages about some files that need patching. We will ignore these for now
  5. Start the Build- By running ./configure
  6. You will notice that ubuntu does not come with gfortran which is a new compiler that replaced g77 in gcc 4  with support for fortran90 code.  These requires the installation of all these required package.
    1. sudo apt-get install build-essential
    2. sudo apt-get install gfortran
    3. sudo apt-get install m4
  7. Now you can run the configure command ./configure
  8. Assuming you get no errors in the configure i.e it ends with a build script , which it saves to a file "config.status" .
  9. Run the build by issuing command make
  10. In my system csh was not present so AsetxViewer complained about makeman.csh not being able to run, so install the cshell by "sudo apt-get install csh"
  11. The mosflm build complains with errors in compiling chelp.o. The chelp.c source file requires the ncurses.h or curses.h header files to compile. A nice ubuntu utility that informs you of the packages that contain files like "ncurses.h" is the apt-file set of utilities. You can install apt-file using "sudo apt-get install apt-file" followed by "sudo apt-file update".  This creates a Database of all package contents and their constituent  files which you can quicly query to look for missing files in the future.
  12. Look for the ncurses.h using sudo apt-file search ncurses.h . (This can also be done with apt-cache search ncurses.h , which is already part of out of the box Ubuntu). This tells you that package libncurses5-dev has ncurses.h that will be installed in /usr/include/ncurses.h. SO install the package now with
    1.  sudo apt-get install libncurses5-dev.
  13. Edit chel.c to look for the ncurses.h header in the right place .Add the line #include "/usr/include/ncurses.h" to the line after #include chelp.h
  14. Also modify the mosflm Makefile in $CCP4_MASTER/ccp4-6.0.99e/x-windows/Mosflm/mosflm and add the flag "-lncurses " to the linker flags  i.e LDFLAGS =  -lncurses
  15. The next set of missing components to tackle are the  xorg ( which replaced X11)  development libraries. These are needed for the many ccp4 programs like XCCP4JIFFY , xdlmapman , ipmosflm, the hklview program , the xplot84driver that generates postscipt plots of your patterson maps etc.                The make for mosflm executable fails with a failure to find "-lxdl_view" , this is the library is used to performs all these duties .                                                                                                                                     Change directory into the $CCP4_MASTERccp4-6.0.99e/x-windows/xdl_view/src  Directory. We will try and re-run the make for this library and look at the errors. We see that several headers are missing . 

    We can use the apt-file search Xlib.h to locate the package that contains Xlib.h

    sudo apt-file search "Xlib.h"

    Wou will see that the libx11-dev package has it

    libx11-dev: /usr/include/X11/Xlib.h. We will install libx11-dev

      Now The Install willcomplain of "Instrinsic.h" missing. Locate "IIntrinsic .h  using sudo apt-file search "Intrinsic.h,
      We will install libxt-dev since the apt-file search revealed
      libxt-dev: /usr/include/X11/Intrinsic.h
  16. The make process complains about a series of problems with xplot84driver compilation . "cd" into the XCCPJIFFY directory "cd $CCP4_MASTER/ccp4-6.0.99e/x-windows/XCCPJIFFY. Try running make and you see the errors
  17. xplot84driver.c:18:29: error: X11/Xaw/Command.h: No such file or directory

    We will provide those with  "sudo apt-file search Command.h" to find the library . The library exists in xaw3dg-dev. Install it "sudo apt-get install  xaw3dg-dev". This installs the include files in "/usr/include/X11/Xaw3d/Command.h" whereas the source files expect the header files  in X11/Xaw /Coomand.h

    At this step , I manually edited the files and changed their includes definition to match the system location . The Files I had to edit were xplot84driver.c . EditString.h , EditStringP.h , msg_box.c , hardcopy_ctrl.c and plot84_file.c.

    Running make after editing these files gives an error complaining that "cannot find -lXaw"

    "sudo apt-get install libxaw7-dev" takes care of that

     

    17.  Now we need to install tcl tk , blt and their header files and associated libraries

  1. sudo apt-get install tk8.4
  2. sudo apt-get install tcl8.4
  3. sudo apt-get install tcl8.4-dev

18. Now get the BLT source from sourceforge

wget http://downloads.sourceforge.net/blt...0&big_mirror=0

You also need a patch file for compiling bltwish for 64 bit.  Reproduced here. Copy this file to the root directory of the blt2.4z and run

patch -p0 <copied-patch-file.patch

 

 

--- blt2.4z/src/bltTree.c.64bit-fixes    2002-09-29 07:44:12.000000000 +0200
+++ blt2.4z/src/bltTree.c    2003-07-31 12:22:53.000000000 +0200
@@ -95,17 +95,16 @@ static Value *TreeNextValue _ANSI_ARGS_(
  */
 
 #define REBUILD_MULTIPLIER    3
+#define START_LOGSIZE        5 /* Initial hash table size is 32. */
+#define MAX_LIST_VALUES        20 /* Convert to hash table when node
+                    * value list gets bigger than this
+                    * many values. */
 
 #if (SIZEOF_VOID_P == 8)
 #define RANDOM_INDEX(i)        HashOneWord(mask, downshift, i)
 #define BITSPERWORD        64
 #else 
 
-#define START_LOGSIZE        5 /* Initial hash table size is 32. */
-#define MAX_LIST_VALUES        20 /* Convert to hash table when node
-                    * value list gets bigger than this
-                    * many values. */
-
 /*
  * The following macro takes a preliminary integer hash value and
  * produces an index into a hash tables bucket list.  The idea is

This patches the blt source

CD into the source and configure it with the command

 ./configure  --prefix . --with-blt=. --with-tcl=/usr/lib/tcl8.4 --with-tk=/usr/lib/tk8.4 --with-tclincls=/usr/include/tcl8.4 --with-tkincls=/usr/include/tcl8.4 --x-libraries=/usr/lib/X11/

 Then run the config.status with "./config.status" to get the Makefile. Run "make" and "sudo make install"

You can also manually copy the blt2.4z/src/bltwish executable to the /usr/bin directory and then edit the $CCP4I_TCLTK to point to the /usr/bin directory

Run ccp4 i and everything other than phaser should be setup

 

 

Note1: For some reason the bash setup script returns a mysteious error "bash: 1: command not found

" .  but the ccp4-setup.sh works just fine. So just type "source include/ccp4-setup.sh" and that should work. Also Martin Wynns Note here explains whats wrong with ccp4-setup.bash. its got to do with an improper "alias" definition

Note2: The xplot84driver has some issues . To get around these use pltdev to convert *.plt files to *.ps files . See this page for troubleshooting Patterson map viewing problems

Tags:
FileSizeDateAttached by 
 blt2.4z-64bit-patch
No description
891 bytes20:25, 15 Sep 2008harijayActions
Images (0)
 
Comments (0)
You must login to post a comment.