/[escript]/trunk/doc/install/srclinux.tex
ViewVC logotype

Diff of /trunk/doc/install/srclinux.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2567 by jfenwick, Mon Jul 20 06:20:06 2009 UTC revision 2568 by jfenwick, Fri Jul 31 05:37:41 2009 UTC
# Line 23  Make sure you have the following install Line 23  Make sure you have the following install
23   \item \filename{g++} and associated tools.   \item \filename{g++} and associated tools.
24   \item \filename{make}   \item \filename{make}
25   % I suspect that these are only needed by VTK and if we aren't using it anymore they could be removed   % I suspect that these are only needed by VTK and if we aren't using it anymore they could be removed
26   \item \filename{libXext.so}\footnote{In Debian this is in the libXext-dev package.}  %  \item \filename{libXext.so}\footnote{In Debian this is in the libXext-dev package.}
27   \item \filename{libxt.so}\footnote{In Debian this is in the libxt-dev package.}  %  \item \filename{libxt.so}\footnote{In Debian this is in the libxt-dev package.}
28  \end{itemize}  \end{itemize}
29    
30  You will also need a copy of the \esfinley source code.  You will also need a copy of the \esfinley source code.
# Line 43  These instructions will produce the foll Line 43  These instructions will produce the foll
43  \end{itemize}  \end{itemize}
44    
45  Before you start copy the \esfinley source into the \filename{escript.d} directory.  Before you start copy the \esfinley source into the \filename{escript.d} directory.
46  The following instructions refer to software versions in the \filename{escript-support-3-src} and \filename{escript-support-visi-3-src} bundles.  The following instructions refer to software versions in the \filename{escript-support-3-src} bundle.
47  If you download your own versions of those packages substitute their version numbers and names as appropriate.  If you download your own versions of those packages substitute their version numbers and names as appropriate.
48  There are a number of uses of the \filename{make} command in the following instructions.  There are a number of uses of the \filename{make} command in the following instructions.
49  If your computer has multiple cores/processors you can speed up the compilation process by adding -j 2 after the make command.  If your computer has multiple cores/processors you can speed up the compilation process by adding -j 2 after the make command.
# Line 75  Copy documentation files into \filename{ Line 75  Copy documentation files into \filename{
75    
76  \begin{shellCode}  \begin{shellCode}
77  cd build  cd build
78  tar -jxf ../pkg_src/Python-2.6.1.tar.bz2  tar -jxf ../pkg_src/Python-2.6.2.tar.bz2
79  tar -jxf ../pkg_src/boost_1_39_0.tar.bz2  tar -jxf ../pkg_src/boost_1_39_0.tar.bz2
80  tar -zxf ../pkg_src/scons-1.2.0.tar.gz  tar -zxf ../pkg_src/scons-1.2.0.tar.gz
81  tar -zxf ../pkg_src/numpy-1.3.0.tar.gz  tar -zxf ../pkg_src/numpy-1.3.0.tar.gz
# Line 88  tar -zxf ../pkg_src/matplotlib-0.98.5.3. Line 88  tar -zxf ../pkg_src/matplotlib-0.98.5.3.
88  \item Build Python:  \item Build Python:
89  \begin{shellCode}  \begin{shellCode}
90  cd Python*  cd Python*
91  ./configure --prefix=$PKG_ROOT/python-2.6.1 --enable-shared 2>&1 \  ./configure --prefix=$PKG_ROOT/python-2.6.2 --enable-shared 2>&1 \
92    | tee tt.configure.out    | tee tt.configure.out
93    make
94  make install 2>&1 | tee tt.make.out  make install 2>&1 | tee tt.make.out
95    
96  cd ..  cd ..
# Line 99  export PYTHONHOME=$PKG_ROOT/python Line 100  export PYTHONHOME=$PKG_ROOT/python
100  export LD_LIBRARY_PATH=$PKG_ROOT/python/lib:$LD_LIBRARY_PATH  export LD_LIBRARY_PATH=$PKG_ROOT/python/lib:$LD_LIBRARY_PATH
101    
102  pushd ../pkg  pushd ../pkg
103  ln -s python-2.6.1/ python  ln -s python-2.6.2/ python
104  popd  popd
105  \end{shellCode}  \end{shellCode}
106    
# Line 193  cd .. Line 194  cd ..
194    
195  \end{itemize}  \end{itemize}
196    
197  \subsection{VTK support}  % \subsection{VTK support}
198  VTK is only required for pyvisi. To build it you need CMake and Mesa.  % VTK is only required for pyvisi. To build it you need CMake and Mesa.
199  The packages can be downloaded independently or in the \filename{escript-support-visi-3-src}.  % The packages can be downloaded independently or in the \filename{escript-support-visi-3-src}.
200  If you will not be using pyvisi, then skip to \Sec{sec:compileescriptlinux}  % If you will not be using pyvisi, then skip to \Sec{sec:compileescriptlinux}
201    %
202  Copy the compressed sources for the packages into \filename{stand/pkg_src}.  % Copy the compressed sources for the packages into \filename{stand/pkg_src}.
203  If you are using the support bundles, decompress them in the stand directory.  % If you are using the support bundles, decompress them in the stand directory.
204  \begin{shellCode}  % \begin{shellCode}
205  tar -xjf escript-support-visi-3-src.tar.bz2  % tar -xjf escript-support-visi-3-src.tar.bz2
206  \end{shellCode}  % \end{shellCode}
207    %
208  \begin{shellCode}  % \begin{shellCode}
209  cd build  % cd build
210  tar -jxf ../pkg_src/MesaLib-7.2.tar.bz2  % tar -jxf ../pkg_src/MesaLib-7.2.tar.bz2
211  tar -zxf ../pkg_src/vtk-5.2.1.tar.gz  % tar -zxf ../pkg_src/vtk-5.2.1.tar.gz
212  tar -zxf ../pkg_src/vtkdata-5.2.1.tar.gz  % tar -zxf ../pkg_src/vtkdata-5.2.1.tar.gz
213  tar -zxf ../pkg_src/cmake-2.6.3.tar.gz  % tar -zxf ../pkg_src/cmake-2.6.3.tar.gz
214  \end{shellCode}  % \end{shellCode}
215    %
216  \begin{itemize}  % \begin{itemize}
217    %
218  \item Build CMake:  % \item Build CMake:
219  \begin{shellCode}  % \begin{shellCode}
220  cd cmake-2.6.3  % cd cmake-2.6.3
221  ./configure --prefix=$PKG_ROOT/cmake-2.6.3 2>&1 | tee tt.configure  % ./configure --prefix=$PKG_ROOT/cmake-2.6.3 2>&1 | tee tt.configure
222  make  % make
223  make install  % make install
224    %
225  export PATH=$PKG_ROOT/cmake/bin:$PATH  % export PATH=$PKG_ROOT/cmake/bin:$PATH
226  cd ..  % cd ..
227  pushd ../pkg  % pushd ../pkg
228  ln -s cmake-2.6.3 cmake  % ln -s cmake-2.6.3 cmake
229  popd  % popd
230  \end{shellCode}  % \end{shellCode}
231    %
232  \item Build Mesa:  % \item Build Mesa:
233  \begin{shellCode}  % \begin{shellCode}
234  cd Mesa-7.2  % cd Mesa-7.2
235  ./configure --prefix=$PKG_ROOT/mesa-7.2 --enable-gl-osmesa --with-driver=xlib  % ./configure --prefix=$PKG_ROOT/mesa-7.2 --enable-gl-osmesa --with-driver=xlib
236    %
237  make  % make
238  make install  % make install
239    %
240  export LD_LIBRARY_PATH=$PKG_ROOT/mesa/lib:$LD_LIBRARY_PATH  % export LD_LIBRARY_PATH=$PKG_ROOT/mesa/lib:$LD_LIBRARY_PATH
241  cd ..  % cd ..
242  pushd ../pkg  % pushd ../pkg
243  ln -s mesa-7.2 mesa  % ln -s mesa-7.2 mesa
244  popd  % popd
245  \end{shellCode}  % \end{shellCode}
246  These instructions do not compile MesaDemos or GLUT.  % These instructions do not compile MesaDemos or GLUT.
247  If you need to check if Mesa compiled correctly, then the demos are a good test.  % If you need to check if Mesa compiled correctly, then the demos are a good test.
248    %
249  \item Finally, build VTK:  % \item Finally, build VTK:
250  \begin{shellCode}  % \begin{shellCode}
251  cd VTK  % cd VTK
252  cmake .  % cmake .
253  \end{shellCode}  % \end{shellCode}
254    %
255  Now edit the \filename{CMakeCache.txt} file and make the following changes.  % Now edit the \filename{CMakeCache.txt} file and make the following changes.
256  Where .... appears please replace it with the absolute path to the pkg directory.  % Where .... appears please replace it with the absolute path to the pkg directory.
257  For example, replace \filename{CMAKE_INSTALL_PREFIX:PATH=..../vtk-5.2.1} with  % For example, replace \filename{CMAKE_INSTALL_PREFIX:PATH=..../vtk-5.2.1} with
258  \filename{CMAKE_INSTALL_PREFIX:PATH=/home/bob/stand/pkg/vtk-5.2.1}  % \filename{CMAKE_INSTALL_PREFIX:PATH=/home/bob/stand/pkg/vtk-5.2.1}
259  (Search for the text before the =).  % (Search for the text before the =).
260  \begin{shellCode}  % \begin{shellCode}
261  BUILD_EXAMPLES:BOOL=OFF  % BUILD_EXAMPLES:BOOL=OFF
262  BUILD_SHARED_LIBS:BOOL=ON  % BUILD_SHARED_LIBS:BOOL=ON
263  CMAKE_INSTALL_PREFIX:PATH=..../vtk-5.2.1  % CMAKE_INSTALL_PREFIX:PATH=..../vtk-5.2.1
264  CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE  % CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
265  VTK_OPENGL_HAS_OSMESA:BOOL=TRUE  % VTK_OPENGL_HAS_OSMESA:BOOL=TRUE
266  VTK_USE_64BIT_IDS:BOOL=ON  % VTK_USE_64BIT_IDS:BOOL=ON
267  VTK_WRAP_PYTHON:BOOL=ON  % VTK_WRAP_PYTHON:BOOL=ON
268  VTK_USE_MANGLED_MESA:BOOL=OFF  % VTK_USE_MANGLED_MESA:BOOL=OFF
269  \end{shellCode}  % \end{shellCode}
270    %
271  Now rerun cmake (it won't work but it adds some variables you need).  % Now rerun cmake (it won't work but it adds some variables you need).
272    %
273  \begin{shellCode}  % \begin{shellCode}
274  cmake .  % cmake .
275  \end{shellCode}  % \end{shellCode}
276    %
277  Edit \filename{CMakeCache.txt} and change the following variables:  % Edit \filename{CMakeCache.txt} and change the following variables:
278    %
279  \begin{shellCode}  % \begin{shellCode}
280  VTK_USE_OFFSCREEN:BOOL=ON  % VTK_USE_OFFSCREEN:BOOL=ON
281  VTK_USE_TK:BOOL=OFF  % VTK_USE_TK:BOOL=OFF
282  OSMESA_INCLUDE_DIR:PATH=..../mesa/include  % OSMESA_INCLUDE_DIR:PATH=..../mesa/include
283  OSMESA_LIBRARY:FILEPATH=..../mesa/lib/libOSMesa.so  % OSMESA_LIBRARY:FILEPATH=..../mesa/lib/libOSMesa.so
284  PYTHON_INCLUDE_PATH:PATH=..../python/include/python2.6  % PYTHON_INCLUDE_PATH:PATH=..../python/include/python2.6
285  PYTHON_LIBRARY:FILEPATH=..../python/lib/libpython2.6.so  % PYTHON_LIBRARY:FILEPATH=..../python/lib/libpython2.6.so
286  OPENGL_INCLUDE_DIR:PATH=..../mesa/include  % OPENGL_INCLUDE_DIR:PATH=..../mesa/include
287  OPENGL_gl_LIBRARY:FILEPATH=..../mesa/lib/libGL.so  % OPENGL_gl_LIBRARY:FILEPATH=..../mesa/lib/libGL.so
288  \end{shellCode}  % \end{shellCode}
289    %
290  The following steps will take a while so grab a coffee while it compiles.  % The following steps will take a while so grab a coffee while it compiles.
291  \begin{shellCode}  % \begin{shellCode}
292  cmake .  % cmake .
293  make  % make
294  chmod +w Utilities/vtktiff/tif_fax3sm.c  % chmod +w Utilities/vtktiff/tif_fax3sm.c
295  make install  % make install
296    %
297  cd ../../pkg  % cd ../../pkg
298  ln -s vtk-5.2.1 vtk  % ln -s vtk-5.2.1 vtk
299  cd ..  % cd ..
300  \end{shellCode}  % \end{shellCode}
301    %
302  \end{itemize}  % \end{itemize}
303    
304  \subsection{Compiling escript}\label{sec:compileescriptlinux}  \subsection{Compiling escript}\label{sec:compileescriptlinux}
305    
306  Change to the directory containing your escript source (\filename{escript.d}), then:  Change to the directory containing your escript source (\filename{stand/escript.d}), then:
307    
308  \begin{shellCode}  \begin{shellCode}
309  cd escript.d/scons  cd escript.d/scons
310  cp linux_options_example.py YourMachineName_options.py  cp linux_standalone_options_example.py YourMachineName_options.py
311    
312  echo $PKG_ROOT  echo $PKG_ROOT
313  \end{shellCode}  \end{shellCode}

Legend:
Removed from v.2567  
changed lines
  Added in v.2568

  ViewVC Help
Powered by ViewVC 1.1.26