• Python 2.5.1 (built against tcltk 8.4)
  • cfitsio v3060A (patch)
  • xerces 2.7.0-gl1 (patch)
  • NumPy 1.2.0
  • PyFITS 1.3
  • 4Suite-XML 1.0.2
  • IPython
  • OmniOrb
  • ROOT v5.20.00-gl1

Python 2.5.1 (built against tcltk 8.4)

Windows operating system 

  1. Download the appropriate python2.5.1 msi file for your windows architecture http://www.python.org/download/releases/2.5.1/
  2. Using command.exe, enter the following command
    • if installing on a network drive (assuming that you are logged in on glast-win06)
      • msiexec /a <python-msi-path>/python-2.5.1.msi ALLUSERS=1 TARGETDIR=<installation director
        • Example, to install python in "V:\Glast_Software\Toaster\GLAST_EXT\Windows-i386-32bit\python\2.5.1-gl1\vcc71" enter
          •  msiexec /a V:\Glast_Software\Toaster\GLAST_EXT\VC8\python\python-2.5.1.msi ALLUSERS=1 TARGETDIR="V:\Glast_Software\Toaster\GLAST_EXT\Windows-i386-32bit\python\2.5.1-gl1\vcc71"

Linux operating system

  1. Download Python 2.5.1 from http://www.python.org/download/releases/2.5.1/
  2. Unzip and change to the directory of the unpacked archive, E.g.,
    • tar -zxvf  Python-2.5.1.tgz
    • cd Python-2.5.1
  3. Run, "./configure --prefix=<installation directory>," E.g.,
    • ./configure --prefix=/afs/slac/g/glast/ground/GLAST_EXT/redhat4-i686-32bit/python/2.5.1-gl1/gcc34/
  4. Edit the file, "Setup," in the "Modules" directory, "Modules/Setup"
    1. Enable zlib (Uncomment the line corresponding to "zlib")
    1. To build Python against tcltck 8.4, there are three lines to edit in the file (I would suggest searching for "_tkinter" in the Modules/Setup file, then follow the documentation)
      • Enable tkinter, by Uncommenting the line "_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT "
      • Uncomment and edit to reflect where your Tcl/Tk libraries are
        • (for linux) "-L/afs/slac.stanford.edu/g/glast/applications/heasoft/PROD/tcltk/i686-pc-linux-gnu-libc2.3.2/lib"
      • Uncomment and edit to reflect where your Tcl/Tk headers are
        • (for linux) "-I/afs/slac.stanford.edu/g/glast/applications/heasoft/PROD/tcltk/i686-pc-linux-gnu-libc2.3.2/include"
      • Uncomment and edit to reflect your Tcl/Tk versions are
  1. Run
    • *make
    • make install

*While running "make", if you run into any compiler problems finding tcl8.4 or tk8.4 libraries, try setting the environment variable, LD_RUN_PATH to point to the location of the tcltk libraries:

  1. make clean
  2. setenv LD_RUN_PATH <Location of tcltk libraries>
  3. make
  4. make install
  5. unsetenv LD_RUN_PATH

Mac operating system

  1. Download Python 2.5.1 from http://www.python.org/download/releases/2.5.1/
  2. Unzip and change to the directory of the unpacked archive, E.g.,
    • tar -zxvf  Python-2.5.1.tgz
    • cd Python-2.5.1
  3. Run, "./configure --prefix=<installation directory>," E.g.,
    • ./configure --prefix=/afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl1/gcc40/
  4. Edit the file, "Setup," in the "Modules" directory, "Modules/Setup"
    1. Enable zlib (Uncomment the line corresponding to "zlib")
    2. To build Python against tcltck 8.4, there are three lines to edit in the file (I would suggest searching for "_tkinter" in the Modules/Setup file, then follow the documentation)
      • Enable tkinter, by Uncommenting the line "_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT "
      • Uncomment and edit to reflect where your Tcl/Tk libraries are (/usr/lib)
        • -L/usr/lib
      • Uncomment and edit to reflect where your Tcl/Tk headers are (/usr/include)
        • -I/usr/include
      • Uncomment and edit to reflect your Tcl/Tk versions are
      • Run
        1. make
        2. make install

cfitsio v3060A (patch)

Windows operating system

  1. Unpack the CFITSIO source files into a V:/Glast_Software/Toaster/GLAST_EXT/VC8/cfitsio/v3060A/cfitsio-v3.060A/ (or the location where you want to install)
  2. Execute C:\Program Files\Microsoft Visual C++ Toolkit 2003\vcvars32.bat
  3. Go to start->Programs->Microsoft Visual Studio .NET 2003 ->Visual Studio .NET Tools
  4. Right-click "Visual Studio .NET 2003 Command Prompt"
  5. Edit the "Start in:" text box
    1. Enter the location of the unpacked cfitsio-v3.060A tar ball
      1.  
      2. "V:/Glast_Software/Toaster/GLAST_EXT/VC8/cfitsio/v3060A/cfitsio-v3.060A/
  1.  
  2. Go to start->Programs->Microsoft Visual Studio .NET 2003 ->Visual Studio .NET Tools -> "Visual Studio .NET 2003 Command Prompt"
  3. Enter the following commands:
    1. nmake winDumpExts.mak
    2. nmake makefile.vcc

This creates the cfitsio.def, cfitsio.dll, and cfitsio.lib files.  The fitsio.h and longnam.h files are also needed to compile any programs that use CFITSIO.  To test that the library works correctly, enter:

cl /MD testprog.c cfitsio.lib
testprog.exe

The testprog program prints out a long list of diagnostic messages that should end with "Status = 0; OK - no error"

Installed in V:\Glast_Software\Toaster\GLAST_EXT\VC8\cfitsio\v3060A

Linux OS

  1. Get the source from /nfs/farm/g/glast/u05/extlib/cfitsio/cfitsio-v3.060A-src.tar.gz
  2. Unzip in temporary directory
  3. cd into that directory
  4. Run the following (for a shared library, instead of running "make," run, "make shared")
     ./configure --prefix=<installation directory>
    make
    make install
    

Mac operating system

*Note:  Make sure you do the build from bldmac01 or bldmac02 (Intel processors). (smile)

After you unzip the file, if the OS is Mac-9 or earlier, refer to the file README.MacOs (located in the directory with unpacked contents of cfitsio, "cfitsio-v3.060A").

Follow the same directions for the Linux OS for Mac OS X or greater. The <installation directory> is /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/tiger-i386-32bit/cfitsio/v3060A/gcc40.


xerces 2.7.0-gl1 (patch)

Mac OS (tiger-i386-32bit)

*Note:  Make sure you do the build from bldmac01 or bldmac02 (Intel processors). (smile)

  1. The source can be found here /nfs/farm/g/glast/u05/extlib/xerces/xerces-c-src_2_7_0-gl1-mac.tar.gz
  2. Copy the source to a temporary directory
  3. Run the following
    tar -zxvf xerces-c-src_2_7_0-gl1-mac.tar.gz
    setenv XERCESCROOT <path-to-xerces-c-src_2_7_0-gl1-mac>/xerces-c-src_2_7_0-gl1-mac
    cd xerces-c-src_2_7_0-gl1-mac
    cd src/xercesc
    ./runConfigure -p macosx -n native -t native -P <install-path>
    
    

Why the patch?

The version of xerces that was being used assumes a PPC mac only so it builds as big endian (breaking xml parsing on intel macs). The newer (3.x) versions of xerces check at runtime but it is easy to check at build time in the version we use.

The problematic file was:  xerces/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp (thumbs down)

No need to fix this file because xerces-c-src_2_7_0-gl1-mac.tar.gz already contains the patch.

Obtaining the original MacOSDefs.hpp (without the patch)

If for any reason you need the original file, then it's located in <path-to-xerces-c-src_2_7_0-gl1-mac>/xerces-c-src_2_7_0-gl1-mac/MacOSDefs.hpp-original

Building xerces-2.7.0 against the original MacOSDefs.hpp

If you want to build this xerces-2.7.0-gl1 against the original MacOSDefs.hpp file there are 2 methods to do it

    1. From within xerces-c-src_2_7_0-gl1-mac, copy (the contents) MacOSDefs.hpp-original to xerces/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp
    2. Repeat step 3 from above
  1. Grab, and extract, the original xerces-2.7.0 from /nfs/farm/g/glast/u05/extlib/xerces/xerces-c-src_2_7_0.tar.gz
    1. setenv XERCESCROOT <path-to-xerces-c-src_2_7_0>/xerces-c-src_2_7_0
      cd xerces-c-src_2_7_0
      cd src/xercesc
      ./runConfigure -p macosx -n native -t native -P <install-path>
      

NumPy 1.2.0

Windows operating system 

* Do not attempt to use the Microsoft installer to install numPy.  The problem is that you cannot easily specify which instance of Python that you want to install NumPy against.  The installer will automatically select the install location based on the registry value for the standard Python location on the local windows machine.

  1. Download the source http://numpy.scipy.org/
  2. Unzip the contents of the tar.gz file
  3. move into the directory numpy-1.2.0 (or for whichever version you download)
  4. Run setup.py with the full path to the python executable for which you want to install numpy-1.2.0 against
    • Example
      • V:\Glast_Software\Toaster\GLAST_EXT\Windows-i386-32bit\python\2.5.1-gl1\vc71\bin\python.exe setup.py install

Linux/Mac operating system

  1. Download the source http://numpy.scipy.org/
  2. Extract the contents of the tar.gz file
  3. cd into the directory numpy-1.2.0
  4. Run setup.py with the python instance for which you want to install numpy-1.2.0 against
    • Example
      • */afs/slac/g/glast/ground/GLAST_EXT/*redhat4-i686-32bit/python/2.5.1-gl1/bin/python setup.py install

PyFITS 1.3

Windows operating system 

Do not attempt to use the Microsoft installer to install PyFITS.  The problem is that you cannot easily specify which instance of Python that you want to install PyFITS against, and you cannot specify the install location manually.  The installer will automatically select the install location based on the registry value for the standard Python location on the local windows machine.

  1. Download the source http://www.stsci.edu/resources/software_hardware/pyfits/Download
  2. Unzip the contents of the tar.gz file
  3. move into the directory pyfits-1.3 (or for whichever version you download)
  4. Run setup.py with the full path to the python executable for which you want to install pyfits-1.3 against
    • Example
      • V:\Glast_Software\Toaster\GLAST_EXT\Windows-i386-32bit\python\2.5.1-gl1\vc71\bin\python.exe setup.py install

Linux/Mac operating system

  1. Download the source http://www.stsci.edu/resources/software_hardware/pyfits/Download&nbsp;
  2. Extract the contents of the tar.gz file
  3. cd into the directory pyfits-1.3
  4. Run setup.py with the python instance for which you want to install pyfits-1.3 against
    • Example
      • /afs/slac/g/glast/ground/GLAST_EXT/redhat4-i686-32bit/python/2.5.1-gl1/bin/python setup.py install

4Suite-XML 1.0.2

Windows operating system 

Do not attempt to use the Microsoft installer to install 4Suite-XML.  The problem is that you cannot easily specify which instance of Python that you want to install 4Suite-XML against, and you cannot specify the install location manually.  The installer will automatically select the install location based on the registry value for the standard Python location on the local windows machine.

  1. Download the source http://4suite.org/index.xhtml
  2. Unzip the contents of the tar.gz file
  3. move into the directory 4Suite-XML-1.0.2  (or for whichever version you download)
  4. Run setup.py with the full path to the python executable for which you want to install 4Suite-XML-1.0.2  against
    • Example
      • V:\Glast_Software\Toaster\GLAST_EXT\Windows-i386-32bit\python\2.5.1-gl1\vc71\bin\python.exe setup.py install

Linux/Mac operating system

  1. Download the source http://ipython.scipy.org/moin/Download
  2. Extract the contents of the tar.gz file
  3. cd into the directory 4Suite-XML-1.0.2
  4. Run setup.py with the python instance for which you want to install 4Suite-XML-1.0.2 against, and specify the "config --home" option to point to the installation directory of Python
    • Example
      • /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1-gl1/gcc32/bin/python setup.py config --home=/afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1-gl1/gcc32
  5. Run "setup.py install" with the python instance for which you want to install 4Suite-XML-1.0.2 against
    • #** /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1-gl1/gcc32/bin/python setup.py install

IPython 0.9.1

 Linux/Mac operating system

  1. Download the source http://4suite.org/index.xhtml
  2. Extract the contents of the tar.gz file
  3. cd into the directory, "ipython"
  4. Run setup.py with the python instance for which you want to install IPython
    • Example
      • /afs/slac/g/glast/ground/GLAST_EXT/rh9_gcc32/python/2.5.1-gl1/gcc32/bin/python setup.py install

OmniOrb

 http://confluence.slac.stanford.edu/display/SAS/Building+omniORB+for+GLAST

 Update (by Emmanuel Cephas)

  • Installed OmniOrb 4.1.2 at SLAC for rh9_gcc32 and the rhel4 machines
    • The OmniOrb 4.1.2 directory structure is consistent with the convention for SCons (replace rh9_gcc32 with rhel4_gcc34 or redhat4-i686-32bit for the rhel4 machines)
      • .../GLAST_EXT/rh9_gcc32/OmniOrb/4.1.2/gcc32/lib
      • .../GLAST_EXT/rh9_gcc32/OmniOrb/4.1.2/gcc32/include
      • etc..
  • Regenerated the following HepRepCorba files with omniidl  (SEE http://confluence.slac.stanford.edu/display/SAS/Building+omniORB+for+GLAST) and committed them to CVS:
    • HepRHepEventServer.hh and HepEventServerSK.cc
    • HepEventServer.hh and HepEventServerSK.cc
  •  Testing has commenced.  Heather is testing OmniOrb against a locally modifed OmniOrb CMT requirements file (which points to the 4.1.2 version of OmniOrb with the new directory structure)

ROOT v5.20.00-gl1


Mac (tiger-i386-32bit) operating system

ROOT is available here /afs/slac/g/glast/ground/GLAST_EXT/redhat4-i686-32bit/ROOT/root-v5.20.00-gl1.src.tg

1.  Extract contents of root-v5.20.00-gl1.src.tgz to a temporary directory

2.  set ROOTSYS to the `root' directory

(minus) You must remove /sw/bin from PATH variable to avoid the configure script from detecting, and attempting to use, Fink.

3.  Add $ROOTSYS/bin to PATH and $ROOTSYS/lib to LD_LIBRARY_PATH

setenv PATH ${ROOTSYS}/bin:${PATH}
setenv DYLD_LIBRARY_PATH ${ROOTSYS}/lib:${DYLD_LIBRARY_PATH}

4.  Now type the build commands, with the following parameters:

configure macosx --fail-on-missing --disable-mysql --enable-xrootd --with-python-incdir=/afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl1/gcc40/include/python2.5/ --with-python-libdir=/afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl1/gcc40/lib/python2.5/config/ --enable-reflex --enable-cintex --enable-roofit --disable-odbc --enable-minuit2 --enable-unuran --enable-table --enable-explicitlink --enable-python
make

5.  Ignore the following errors:

Error: string() declared but not defined prec_stl/vector:422:
Error: string() declared but not defined prec_stl/list:187:
./configure: line 1: freetype-config: command not found

(plus) Now you must rebuild "libPyROOT.so" as a bundle and replace the $ROOTSYS/lib/libPyROOT.so with it. 

6.  Go to the directory $ROOTSYS/bindings/pyroot/src

7.  set PYTHONSYS to the 'python' directory that you are building ROOT against

8.  Enter the following commands

* Note:  In the command, notice the "-lpython2.5."  Make sure you specify the "pythonA.B" library name corresponding to the version of which you set PYTHONSYS to.

g++ -flat_namespace -bundle *.o -bundle_loader $PYTHONSYS/bin/python -L$ROOTSYS/lib -ldl -L$ROOTSYS/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lMathCore -lThread -L$ROOTSYS/lib -lReflex -ldl -L$PYTHONSYS/lib/python2.5/config/ -lpython2.5 -L$ROOTSYS/lib -lCore -lCint -o libPyROOT.so
cp libPyROOT.so $ROOTSYS/lib/
  • No labels