EMAN2 Development
System Setup HowTo
0. Introduction
This document gives the step-by-step guide on how to set up EMAN2
development system on Linux, SGI IRIX, and Windows. It includes
installation of the 3rd party libraries as well as setting up login
shell.
The intended
audience is EMAN2 developers and EMAN2 users.
NOTE:
For any
3rd-party package listed in the document, if you can get the proper
binary version for your platform, you won't need to compile it from the
source code.
1.
Linux.
Let's take Mandrake 10.0 as an example
1) install the following
rpms available on the Mandrake CDs
libfftw2-2.1.5-3mdk.i586.rpm
libfftw2-devel-2.1.5-3mdk.i586.rpm
libgsl0-1.4-5mdk.i586.rpm
libgsl0-devel-1.4-5mdk.i586.rpm
libhdf5_0-1.4.5-1mdk.i586.rpm
libhdf5_0-devel-1.4.5-1mdk.i586.rpm
libpython2.3-devel-2.3.3-2mdk.i586.rpm
python-numeric-23.1-2mdk.i586.rpm
python-numeric-devel-23.1-2mdk.i586.rpm
libtiff3-devel-3.5.7-11mdk.i586.rpm
To install a XYZ.rpm, do the
following:
a) login
in as root
b) rpm
-i XYZ.rpm
2) install boost python
0.
Download 'bjam' for linux from http://www.boost.org.
1.
Download boost source from http://www.boost.org. Assume it's
boost_1_32_0.
% cd /usr/local/src
% tar zxf boost_1_32_0.tar.gz
% cd boost_1_32_0.
2.
set up environment variables "PYTHON_ROOT"
and "PYTHON_VERSION".
For example, if your python is at
/usr/bin/python. PYTHON_ROOT is
"/usr". if your python is 2.2.X,
PYTHON_VERSION is '2.2'.
a) check your shell: % echo $SHELL
b) if you are using bash/zsh, do
% export PYTHON_VERSION=2.2
% export PYTHON_ROOT=/usr
if you are using csh/tcsh, do
% setenv PYTHON_VERSION 2.2
% setenv PYTHON_ROOT /usr
3.
cd libs/python/build
4.
run 'bjam' : % bjam
5.
login as root
6.
cp -df bin-stage/libboost_python.so* /usr/local/lib
cd ../../..; cp -rf boost /usr/local/include
3) install CMake
(http://www.cmake.org)
Let's take
cmake version 2.0.5 as an example.
- download
it from http://www.cmake.org
- gunzip
cmake-2.0.5.tar.gz
- tar xf
cmake-2.0.5.tar
- login as root
- cd
cmake-2.0.5
- ./configure
- make
- make install
5) Install
EMAN2.
The typical way to install EMAN2
is as follows. For more details, please refer the INSTALL document.
% cd $HOME
% mkdir -p EMAN2/src
% cd EMAN2/src
% gunzip eman2.tar.gz
% tar xf eman2.tar
% mkdir build
% cd build
% cmake ../eman2
% make
% make install
6) set up
your login shell
- For csh/tcsh, add the
following to the end of your $HOME/.cshrc file:
setenv EMAN2DIR $HOME/EMAN2
setenv
PATH $EMAN2DIR/bin:${PATH}
setenv
LD_LIBRARY_PATH $EMAN2DIR/lib
setenv
PYTHONPATH .:$HOME/EMAN2/lib
- For bash, add the following
to the end of your $HOME/.bashrc. For zsh, add it to the end of your
$HOME/.zshrc.
export EMAN2DIR=$HOME/EMAN2
export PATH=$EMAN2DIR/bin:${PATH}
export LD_LIBRARY_PATH=$EMAN2DIR/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=.:$HOME/EMAN2/lib:${PYTHONPATH}
2. SGI IRIX.
1) install fftw from
source
Assume you are
installing fftw-2.1.5.tar.gz
-
get fftw source code from (http://www.fftw.org/)
-
gunzip fftw-2.1.5.tar.gz
-
tar xf fftw-2.1.5.tar
-
cd fftw-2.1.5
-
./configure --enable-static=no --enable-shared=yes --enable-float
--enable-type-prefix
-
make
-
login as root
-
make install
2) install gsl from source
Assume you are
installing gsl-1.4.tar.gz
-
get source from http://www.gnu.org/software/gsl/
-
gunzip gsl-1.4.tar.gz
-
tar xf gsl-1.4.tar
-
cd gsl-1.4
-
./configure
-
make
-
login as root
-
make install
3) install hdf5 from
source
Assume you are
installing hdf5-1.6.3.tar.gz
-
get source from http://hdf.ncsa.uiuc.edu/HDF5
-
gunzip hdf5-1.6.3.tar.gz
-
tar xf hdf5-1.6.3.tar.gz
-
cd hdf5-1.6.3
-
./configure
-
make
-
login as root
-
make install
4) install python from
source
Assume you are
installing Python-2.3.4.tgz
-
get source from http://www.python.org
-
gunzip Python-2.3.4.tgz
-
tar xf Python-2.3.4.tar
-
cd Python-2.3.4
-
./configure
-
make
-
login as root
-
make install
5) install boost python from source
Assume you are
installing boost_1_32_0
-
Download 'bjam' for SGI IRIX from http://www.boost.org
-
Download boost source from http://www.boost.org.
-
gunzip boost_1_32_0.tar.gz
-
tar xf boost_1_32_0.tar
-
cd boost_1_32_0
-
set up environment variables "PYTHON_ROOT"
and "PYTHON_VERSION".
For example, if your python is at /usr/bin/python.
PYTHON_ROOT is
"/usr". if your python is 2.3.4, PYTHON_VERSION is
'2.3'.
a) check your shell: % echo $SHELL
b) if you are using bash/zsh, do
% export PYTHON_VERSION=2.3
% export PYTHON_ROOT=/usr
if you are using csh/tcsh, do
% setenv PYTHON_VERSION 2.3
% setenv PYTHON_ROOT /usr
-
cd libs/python/build
-
% bjam "-sTOOLS=mipspro"
-
login as root
-
cp -df bin-stage/libboost_python.so* /usr/local/lib
cd ../../..; cp -rf boost
/usr/local/include
6) install CMake
(http://www.cmake.org) from
source
Assume you are
installing cmake version 2.0.5.
- download
it from http://www.cmake.org
- gunzip
cmake-2.0.5.tar.gz
- tar xf
cmake-2.0.5.tar
- login as root
- cd
cmake-2.0.5
- ./configure
- make
- make install
7)install numpy
Assume you are installing numpy-23.6.tar.gz
- go to web site http://scipy.org
- download numpy-1.0.1.tar.gz
- gunzip numpy-1.0.1.tar.gz
- tar xf numpy-1.0.1.tar
- login as root
- cd numpy-1.0.1
- python
setup.py install
8) Install EMAN2. (see
linux section 5)
9) Set up login
shell (see linux section 6)
3.
Microsoft Windows
Assume you want to install all libs under C:\lib; all
headers under C:\include. EMAN2 under: C:\EMAN2\
0. Computer Environment Variables
- HOME = C:\
- PATH: add
C:\EMAN2\lib;C:\EMAN2\bin;C:\lib to your PATH
1. Software Installation
1.1. A list of the softwares to install
- CMake
- python
- fftw
- zlib
- PNG
- szlib
- HDF5
- gsl
- boost python
- Numric python numpy
- visual
studio .NET
2003
1.2 install CMake
(http://www.cmake.org)
Assume you are
installing cmake version 2.0.5.
-
download CMSetup205.exe from http://www.cmake.org
-
run CMSetup205.exe
1.3 install Python
Assume you are
installing Python-2.3.4.exe
-
download Python-2.3.4.exe from http://www.python.org
-
run Python-2.3.4.exe and install it under C:\
1.4 install fftw
Assume you are
installing fftw 2.1.3
-
get fftw213.libs.zip from http://www.fftw.org/download.html
-
unzip fftw213.libs.zip
-
copy FFTW2dll.dll FFTW2dll.lib RFFTW2dll.lib RFFTW2dll.dll C:\lib
-
copy the following files from a linux machine (which has fftw installed)
fftw.h rfftw.h sfftw.h srfftw.h to C:\include
1.5 zlib
Assume you are
installing 1.2.2
- get the source from
http://sourceforge.net/projects/libpng/
-
run Visual Studio
-
open project zlib122/projects/visualc6/zlib.dsp
-
compile a release version.
-
files to install to C:\lib: zlib1d.dll, zlib1d.lib
-
files to install to C:\include: zlib.h
1.6 png
Assume you are
installing 1.2.6
-
get the source code from http://sourceforge.net/projects/libpng/
-
run Visual Studio
-
open project lpng126/projects/visualc6/libpng.dsp
-
config it to a release version
-
add to include file dir: C:\include
-
add to linker dir: C:\lib
-
compile
-
files to install to C:\lib: libpng13d.dll libpng13d.lib
-
files to install to C:\include: pngconf.h png.h
1.7 szlib
-
Go to ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/
-
cd szip/bin/windows/szip-msvc++/szipbin/XP_.NET/
-
download everything under 'dll' to C:\lib: e.g. szlibdll.dll szlibdll.lib
-
download everything under 'include' to C:\include: e.g.
SZconfig.h mcgill.h rice.h
ricehdf.h szip_adpt.h szlib.h
1.8 HDF5
Assume HDF5
1.6.3
-
Get the source from ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/src/
-
copy everything under hdf5-1.6.3/windows/all/hdf5/proj/hdf5dll to hdf5-1.6.3/windows/all
-
copy *.h *.c under hdf5-1.6.3/windows/all/hdf5/src to hdf5-1.6.3/src
-
run Visual Studio
-
open project hdf5-1.6.3/windows/all/hdf5dll.dsp
-
config project properties:
-
Release version only
-
linker lib for zlib and szlib
-
linker path C:\lib
-
include path: C:\include
-
files to install to C:\lib: hdf5dll.dll hdf5dll.lib
-
files to install to C:\include: find all header files from a binary
release
1.9 GSL
It is better to get a binary version.
Contact Grant Tang (gtang@bcm.edu) on where to get it.
1.10 Boost Python
It is better to get a binary version.
Contact Grant Tang (gtang@bcm.edu) on where to get it.
1.11 numpy numarray
Assume you are installing numpy-1.0.1.win32-py2.4.exe
- go to web site http://www.pfdubois.com/numpy
- download numpy-1.0.1.win32-py2.4.exe
- run numpy-1.0.1.win32-py2.4.exe
1.12 Visual Studio .NET 2003
Install it from the Visual Studio .NET
2003 CD. It is very straight-forward.
2. Use CMake to configure EMAN2
- run CMake program
- at "Where is the source code", select C:\EMAN2\src\eman2
- at "Where to build the binaries", select
C:\EMAN2\src\build
- at "Build For", select "Visual Studio 7 .NET 2003
- at "Show Advanced Values": check this box
- click "Configure" button
- If you are asked to create "C:\EMAN2\src\build", click
"Yes".
- If you see any errors in the configure process, fix them
in the main panel.
That is usually where to find a library or
header file.
- on the main panel, change "CMAKE_CONFIGURATION_TYPES" TO
"Release".
- Click "Configure" button
- click "OK" button
3. Use Visual Studio .NET
2003
to compile
- load
the
project file generated by cmake
File -> Open -> Project: E:\EMAN2\src\eman2\EMAN.sln
- View ->
Solution Explorer
- In "Solution
Explorer" window, right click "ALL_BUILD", then select "Rebuild".
- In "Solution
Explorer" window, right click "INSTALL", then select "Rebuild".
- Your EMAN2
binary version is installed under C:\EMAN2\bin, C:\EmAN2\lib,
C:\EMAN2\includ
Last Modified on 09/30/2006 by Grant Tang (gtang@bcm.edu)