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

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

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

revision 2327 by artak, Thu Mar 19 06:01:26 2009 UTC revision 2328 by artak, Fri Mar 20 03:40:56 2009 UTC
# Line 25  Here are the instruction on how to insta Line 25  Here are the instruction on how to insta
25  \item Insert the Mac OS X v10.5 (Leopard) DVD.  \item Insert the Mac OS X v10.5 (Leopard) DVD.
26  \item Double-click on XcodeTools.mpkg, located inside Optional Installs/Xcode Tools.  \item Double-click on XcodeTools.mpkg, located inside Optional Installs/Xcode Tools.
27  \item Follow the instructions in the Installer.  \item Follow the instructions in the Installer.
28  \item Authenticate as the administrative user. The rst user you create when setting up Mac OS X has administrator privileges by default.  \item Authenticate as the administrative user. The first user you create when setting up Mac OS X has administrator privileges by default.
29  \end{enumerate}  \end{enumerate}
30    
31  You will also need a copy of the \esfinley source code.  You will also need a copy of the \esfinley source code.
# Line 78  Build python. Line 78  Build python.
78  \begin{shellCode}  \begin{shellCode}
79  cd Python*  cd Python*
80    
81  ./configure --prefix=\$PKG_ROOT/python-2.6.1 \  ./configure --prefix=$PKG_ROOT/python-2.6.1 \
82    --exec-prefix=\$PKG_ROOT/python-2.6.1 --enable-shared \    --exec-prefix=$PKG_ROOT/python-2.6.1 --enable-shared \
83    --enable-framework=\$PKG_ROOT/python-2.6.1 2>&1 | tee tt.configure.out    --enable-framework=$PKG_ROOT/python-2.6.1 2>&1 | tee tt.configure.out
84        
85  make -j2  make -j2
86    
# Line 97  cp ../../packages/python-2.6.1/include/p Line 97  cp ../../packages/python-2.6.1/include/p
97    
98  cd ..  cd ..
99    
100  export PATH=\$PKG_ROOT/python/bin:\$PATH  export PATH=$PKG_ROOT/python/bin:$PATH
101  export PYTHONHOME=\$PKG_ROOT/python  export PYTHONHOME=$PKG_ROOT/python
102  export LD_LIBRARY_PATH=\$PKG_ROOT/python/lib:\$LD_LIBRARY_PATH  export LD_LIBRARY_PATH=$PKG_ROOT/python/lib:$LD_LIBRARY_PATH
103    
104  pushd ../packages  pushd ../packages
105  ln -s python-2.6.1/ python  ln -s python-2.6.1/ python
# Line 114  Now build numarray. Line 114  Now build numarray.
114  cd numarray-1.5.2  cd numarray-1.5.2
115    
116  python setup.py install \  python setup.py install \
117   --gencode --install-lib=\$PKG_ROOT/numarray-1.5.2/lib \   --gencode --install-lib=$PKG_ROOT/numarray-1.5.2/lib \
118   --install-headers=\$PKG_ROOT=\$PKG_ROOT/numarray-1.5.2/include/numarray \   --install-headers=$PKG_ROOT=$PKG_ROOT/numarray-1.5.2/include/numarray \
119     2>&1 | tee tt.install.out     2>&1 | tee tt.install.out
120    
121    
122  export PYTHONPATH=\$PKG_ROOT/numarray/lib:\$PYTHONPATH  export PYTHONPATH=$PKG_ROOT/numarray/lib:$PYTHONPATH
123  cd ..  cd ..
124  pushd ../packages  pushd ../packages
125  ln -s numarray-1.5.2 numarray  ln -s numarray-1.5.2 numarray
# Line 129  popd Line 129  popd
129  Now we build scons.  Now we build scons.
130  \begin{shellCode}  \begin{shellCode}
131  cd scons-1.2.0  cd scons-1.2.0
132  python setup.py install --prefix=\$PKG_ROOT/scons-1.2.0  python setup.py install --prefix=$PKG_ROOT/scons-1.2.0
133    
134  export PATH=\$PKG_ROOT/scons/bin:\$PATH  export PATH=$PKG_ROOT/scons/bin:$PATH
135  cd ..  cd ..
136  pushd ../packages  pushd ../packages
137  ln -s scons-1.2.0 scons  ln -s scons-1.2.0 scons
# Line 142  popd Line 142  popd
142  \begin{shellCode}  \begin{shellCode}
143  cd boost_1_38_0  cd boost_1_38_0
144    
145  ./configure --prefix=\$PKG_ROOT/boost_1_38_0 --with-python-root=\$PKG_ROOT/python \  ./configure --prefix=$PKG_ROOT/boost_1_38_0 --with-python-root=$PKG_ROOT/python \
146    --with-python-version=2.6 --with-libraries=python    --with-python-version=2.6 --with-libraries=python
147    
148  make -j2  make -j2
149  make install  make install
150  ln -s \$PKG_ROOT/boost_1_38_0 \$PKG_ROOT/boost  ln -s $PKG_ROOT/boost_1_38_0 $PKG_ROOT/boost
151  export LD_LIBRARY_PATH=\$PKG_ROOT/boost/lib:\$LD_LIBRARY_PATH  export LD_LIBRARY_PATH=$PKG_ROOT/boost/lib:$LD_LIBRARY_PATH
152  cd ..  cd ..
153  pushd ../packages  pushd ../packages
154  ln -s boost_1_38_0 boost  ln -s boost_1_38_0 boost
# Line 160  popd Line 160  popd
160  cd netcdf-4.0  cd netcdf-4.0
161  CFLAGS="-O2 fPIC -Df2cFortran" CXXFLAGS="-O2 fPIC -Df2cFortran" \  CFLAGS="-O2 fPIC -Df2cFortran" CXXFLAGS="-O2 fPIC -Df2cFortran" \
162  FFLAGS="-O2 fPIC -Df2cFortran" FCFLAGS="-O2 fPIC -Df2cFortran" \  FFLAGS="-O2 fPIC -Df2cFortran" FCFLAGS="-O2 fPIC -Df2cFortran" \
163  ./configure --prefix=\$PKG_ROOT/netcdf-4.0  ./configure --prefix=$PKG_ROOT/netcdf-4.0
164    
165  make -j2  make -j2
166  make install  make install
167    
168  export LD_LIBRARY_PATH=\$PKG_ROOT/netcdf/lib:\$LD_LIBRARY_PATH  export LD_LIBRARY_PATH=$PKG_ROOT/netcdf/lib:$LD_LIBRARY_PATH
169  cd ..  cd ..
170  pushd ../packages  pushd ../packages
171  ln -s netcdf-4.0 netcdf  ln -s netcdf-4.0 netcdf
# Line 175  popd Line 175  popd
175  CMake and Mesa are required for VTK.  CMake and Mesa are required for VTK.
176  \begin{shellCode}  \begin{shellCode}
177  cd cmake-2.6.3  cd cmake-2.6.3
178  ./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
179  make -j 4  make -j 4
180  make install  make install
181    
182  export PATH=\$PKG_ROOT/cmake/bin:\$PATH  export PATH=$PKG_ROOT/cmake/bin:$PATH
183  cd ..  cd ..
184  pushd ../packages  pushd ../packages
185  ln -s cmake-2.6.3 cmake  ln -s cmake-2.6.3 cmake
# Line 190  These instructions do not compile MesaDe Line 190  These instructions do not compile MesaDe
190  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.
191  \begin{shellCode}  \begin{shellCode}
192  cd Mesa-7.2  cd Mesa-7.2
193  ./configure --prefix=\$PKG_ROOT/mesa-7.2 --enable-gl-osmesa  ./configure --prefix=$PKG_ROOT/mesa-7.2 --enable-gl-osmesa
194    
195  make -j 4  make -j 4
196  make install  make install
197    
198  export LD_LIBRARY_PATH=\$PKG_ROOT/mesa:\$LD_LIBRARY_PATH  export LD_LIBRARY_PATH=$PKG_ROOT/mesa:$LD_LIBRARY_PATH
199  cd ..  cd ..
200  pushd ../packages  pushd ../packages
201  ln -s mesa-7.2 mesa  ln -s mesa-7.2 mesa
# Line 286  boost_libs     = ['boost_python-gcc43-mt'] Line 286  boost_libs     = ['boost_python-gcc43-mt']
286  usevtk      = 'yes'  usevtk      = 'yes'
287  #-------------------------------------------------------------------  #-------------------------------------------------------------------
288    
289  ln -s \$PKG_ROOT/vtk-5.2.1 \$PKG_ROOT/vtk  ln -s $PKG_ROOT/vtk-5.2.1 $PKG_ROOT/vtk
290    
291  Modify /scripts/finley_wrapper_template  Modify /scripts/finley_wrapper_template
292    
293  STANDALONE=1  STANDALONE=1
294    
295  #Check to make sure the paths in the if [ \$STANDALONE == 1 ]  #Check to make sure the paths in the if [ $STANDALONE == 1 ]
296  # Section are correct  # Section are correct
297    
298  #-----------------------------------------------------------------  #-----------------------------------------------------------------
# Line 301  scons bin/escript Line 301  scons bin/escript
301    
302  #start a new terminal  #start a new terminal
303  cd stand  cd stand
304  export PATH=`pwd`/packages/scons/bin:\$PATH  export PATH=`pwd`/packages/scons/bin:$PATH
305  cd escript.d  cd escript.d
306  eval `bin/escript -e`  eval `bin/escript -e`
307  scons  scons
# Line 340  system, or build them from source. Line 340  system, or build them from source.
340  \item \filename{ppmtompeg} and \filename{jpegtopnm} from the \filename{netpbm} suite. - To build from source  \item \filename{ppmtompeg} and \filename{jpegtopnm} from the \filename{netpbm} suite. - To build from source
341  you would also need \filename{libjpeg} and its headers as well as \filename{libpng}\footnote{libpng requires zlib to build} and its headers.  you would also need \filename{libjpeg} and its headers as well as \filename{libpng}\footnote{libpng requires zlib to build} and its headers.
342  \item A tool to visualise VTK files. For example Mayavi or Visit.  \item A tool to visualise VTK files. For example Mayavi or Visit.
 \end{itemize}  
343    \end{itemize}
344    
345    
346    \section{Installing from source for \macosx with the help of Macports}
347    \label{sec:srcmacports}
348    
349    As we mentioned in the Section~\ref{sec:srcmac}, before you start installing from source you will need Mac OS X development tools installed on your Mac.
350    
351    If you do not have Macports already, please install Macports from \url{www.macports.org} . You can also install porticus (GUI for Macports).
352    
353    Once you have Macports working Install boost using porticus or from terminal
354    \begin{shellCode}
355    sudo port install boost@1.35.0_2+complete
356    \end{shellCode}
357    Sometimes this fails due to unknown reasons, but to overcome this problem you need to run
358    \begin{shellCode}
359    sudo port clean boost@1.35.0_2+complete
360    
361    sudo port install boost@1.35.0_2+complete
362     \end{shellCode}
363      
364    Download scons source scons-0.98.5.tar.gz from \url{www.scons.org}.
365    \begin{shellCode}
366    tar xfz scons-0.98.5.tar.gz
367    cd scons-0.98.5
368    python setup.py install
369    \end{shellCode}
370    
371    Note: Do not try to install scons using porticus or sudo port install scons, because if automatically installs another python version and you are likely run into problems with different python versions.  
372    
373    Download numarray-1.5.2.tar.gz from \url{http://www.stsci.edu/resources/software_hardware/numarray/numarray.html}.
374    \begin{shellCode}
375    tar xfz numarray-1.5.2.tar.gz
376    cd numarray-1.5.2
377    python setup.py install --gencode  2>&1 | tee tt.install.out
378    \end{shellCode}
379    
380    You can ran a test to check numarray installation by
381    \begin{shellCode}
382    python
383    import numarray.testall as testall
384    testall.test()
385    \end{shellCode}
386    
387    Install netcdf, gsl and fltk using Macports
388    \begin{shellCode}
389    sudo port install netcdf
390    sudo port install gsl
391    sudo port intall fltk
392    \end{shellCode}
393    Note: If this fails, download and install from sources.
394    
395    Downlaod gmsh-2.2.3-source.tar and install from sources.
396    \begin{shellCode}
397    ./configure --with-gsl-prefix=/opt/local/  --with-fltk    --prefix=/usr/local/
398    \end{shellCode}
399    Note: if you install using porticus or sudo port  it automaticall installs in \filename{/opt/local/}, but if you install from sources it installs in /usr/local. So, make sure these paths are right.
400    \begin{shellCode}
401    sudo make j2
402    sudo make install
403    \end{shellCode}
404    
405    Download and install Mesa-7.0.3 (required for VTK) from sources
406    \begin{shellCode}
407    tar xjf MesaDemos-7.0.3.tar.bz2
408    tar xjf MesaGLUT-7.0.3.tar.bz2
409    tar xjf MesaLib-7.0.3.tar.bz2
410    cd Mesa-7.0.3
411    
412    sudo make -j 2
413    make install
414    \end{shellCode}
415    
416    Install vtk-5.0.4 from source. If you install from ports it won't configure to use shared libraries. Once you untar it you will have (assume user is john) /Users/john/Downloads/VTK folder, then run following:
417    
418    \begin{shellCode}
419    sudo mkdir /usr/local/VTKBuild/
420    cd /usr/local/VTKBuild/
421    sudo ccmake /Users/john/Downloads/VTK/
422    # It will create CMakeCache.txt. Make sure  you use the following configurations.
423    
424    #       Advanced options            ON
425    #       BUILD_EXAMPLES              ON
426    #       BUILD_SHARED_LIBS           ON
427    #       VTK_WRAP_PYTHON             ON
428    #       CMAKE_VERBOSE_MAKEFILE          TRUE
429    #       VTK_OPENGL_HAS_OSMESA           ON
430    #       VTK_USE_MANGLED_MESA            OFF
431    #       VTK_USE_OFFSCREEN           OFF
432    
433    sudo make j2
434    sudo make install
435    \end{shellCode}
436    
437    Note: you need to set following ENV variables into your \filename{/Users/john/.profile} for VTK to work:
438    \begin{shellCode}
439    export LD_LIBRARY_PATH = /usr/local/VTKBuild/bin: \
440                 /usr/local/VTKBuild/bin:${LD_LIBRARY_PATH}
441    export PYTHONPATH = /usr/local/VTKBuild/Wrapping/Python:\
442                /usr/local/VTKBuild/bin:${PYTHONPATH}
443        
444    #     For testing you can run:
445    python
446    import vtk
447    \end{shellCode}
448    
449    Left only to install triangle and netpbm (required for ppmtompeg) using Macports
450    \begin{shellCode}
451    sudo port install triangle
452    sudo port install netpbm
453    \end{shellCode}
454    
455    
456    

Legend:
Removed from v.2327  
changed lines
  Added in v.2328

  ViewVC Help
Powered by ViewVC 1.1.26