Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > ab972abb34adf97ebe2e94ab6b5a0050 > files > 66

HippoDraw-1.21.1-14.fc15.i686.rpm

<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>HippoDraw Documenation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="lib/hippoApp.ico">
</head><body>
<!-- Generated by Doxygen 1.7.3 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Installation </h1>  </div>
</div>
<div class="contents">
<div class="textblock"><p><b>HippoDraw</b> is a cross platform library and application.</p>
<p>The components of the distribution are</p>
<ul>
<li>A core library, <em>libhippo</em>, not dependent on a graphics toolkit.</li>
</ul>
<ul>
<li>A graphics library, <em>libhippoqt</em>, built upon the Qt graphics toolkit.</li>
</ul>
<ul>
<li>A standalone application, <em>hippodraw</em>, that uses the above libraries.</li>
</ul>
<ul>
<li>A Python extension module, <em>hippomodule</em>, which allows use of the <b>HippoDraw</b> libraries with the Python programming language.</li>
</ul>
<ul>
<li>(optionally) A Python extension module, <em>sihippo</em>, which allows use of the <b>HippoDraw</b> libraries with PyQt Python extension module.</li>
</ul>
<p>These instructions will help you install <b>HippoDraw</b> on all supported platforms.</p>
<ul>
<li><a class="el" href="install_notes.html#install_windows">Microsoft Windows</a> </li>
<li><a class="el" href="install_notes.html#install_macosx">Mac OS X</a> </li>
<li><a class="el" href="install_notes.html#install_unix">Unix like System, Linux, Solaris, etc.</a></li>
</ul>
<h2><a class="anchor" id="install_windows"></a>
Microsoft Windows</h2>
<p>For Microsoft Windows, pre-built binaries are available in the form of a Microsoft installer file (<em></em>.msi ) located <a href="ftp://ftp.slac.stanford.edu/users/pfkeb/hippodraw">here</a>. It includes support for ROOT and FITS files. It also includes C++ version of Minuit To use it, one needs Microsoft's .NET Framework 1.1. Download and install the <a href="http://msdn2.microsoft.com/en-us/netframework/aa569265.aspx">Microsoft .NET Framework 1.1 Redistributable </a> from Microsoft web site if you don't already have it installed.</p>
<p>To install <b>HippoDraw</b>, just double click on the .msi file and follow the instructions. The installer file includes everything you need except Python. To use <b>HippoDraw</b> with Python, pre-built binaries for Python are available from the Python <a href="http://www.python.org/download">download </a> page. You'll need to add <b>HippoDraw</b> to your Python path. Right click on MyComputer icon and go to</p>
<p>MyComputer-&gt;Properties-&gt;Advanced-&gt;Environmental Variables.</p>
<p>Create a new variable, <em>PYTHONPATH</em>, if you don't already have one, and add HippoDraw to it, for example, <em>C:\Program</em> Files\HippoDraw</p>
<p>Building <b>HippoDraw</b> with Qt 3 from source under Windows requires a Trolltech Qt commercial license, Microsoft VC++ 8.0 project files and instructions on how to use them are located in the <em>vs.net2005</em> directory. Building <b>HippoDraw</b> with Qt 4 under Windows has not been tested with this release.</p>
<h2><a class="anchor" id="install_macosx"></a>
Mac OS X</h2>
<p>On a Mac OS x system, <b>HippoDraw</b> can be built from source code like other Unix like systems. However, there are a few steps and precautions one should take and they are noted in the install_mac_root page.</p>
<h2><a class="anchor" id="install_unix"></a>
Unix like System, Linux, Solaris, etc.</h2>
<p>These are instructions for building the <b>HippoDraw</b> application and Python extension module from source on UNIX-like system. This includes UNIX systems such as Sun's Solaris, Linux systems, and Mac OS X with X windows.</p>
<p>In most cases, just doing the standard configure, make, and make install dance should work. The configure script will find the required software if they are installed in their default locations (usually <em>/usr/local</em>). If it doesn't, read the <a class="el" href="install_notes.html#install_build">Configuring HippoDraw</a> section below for configuring with <b>HippoDraw</b> with some external packages located on usual places (especially for Mac OS X).</p>
<p>The major sections on the remainder of this page are</p>
<ul>
<li><a class="el" href="install_notes.html#install_requirements">Required and Optional Software.</a> </li>
<li><a class="el" href="install_notes.html#install_build">Configuring HippoDraw</a> </li>
<li><a class="el" href="install_notes.html#install_config_fail">If Configure Fails.</a> </li>
<li><a class="el" href="install_notes.html#install_make">Building HippoDraw</a> </li>
<li><a class="el" href="install_notes.html#install_build_fail">If the Build fails</a> </li>
<li><a class="el" href="install_notes.html#install_install">Installing.</a> </li>
<li><a class="el" href="install_notes.html#install_run">Running HippoDraw</a> </li>
<li><a class="el" href="install_notes.html#install_external">Hints on Installing External Packages.</a> </li>
<li><a class="el" href="install_notes.html#install_problems">Known Problems.</a></li>
</ul>
<h2><a class="anchor" id="install_requirements"></a>
Required and Optional Software.</h2>
<p>Building the complete HippoDraw package from source requires a C++ compiler, the Qt library, the Boost.Python library, and Python. On a modern Linux distributions all are part of the distribution. On older distributions, only Boost.Python might be missing.</p>
<h3><a class="anchor" id="install_cpp"></a>
C++ compiler</h3>
<p><b>HippoDraw</b> requires a fairly standards compliant C++ compiler and library. However, some C preprocessor macros have been defined to enable workaround code for older compilers. These macros all have `_DEFECT' in their name. The configure script (see below) will define these macros as needed. There are also a few <em>#ifdef</em> in the source code for specific operating systems such as Windows and Mac OS X.</p>
<p>The current release was tested with gcc 3.2.3 on Red Hat Enterprise 3,4.6 pm Red Jat Emter[rose 4 gcc 4.2.1 on Fedora Core 7, gcc 4.0.1 on Mac OS X, and Windows XP with Visual Studio 8 (aka .NET 2005). Older versions of these compilers have been know to be sufficient in the past. That is, gcc 2.95.3 should still work. There are <em>#ifdef</em> in the source mainly for Visual Studio 6 but more may be needed.</p>
<h3><a class="anchor" id="install_qt"></a>
Trolltech's Qt</h3>
<p>The current release of <b>HippoDraw</b> requires Qt 3.1.0 or later built with thread support. However, the core library can be built without the graphical interface, see <a class="el" href="install_notes.html#install_config_qt">Qt 3 path and library</a>. Also, versions of Qt in the 3.3 series, (3.3.3, and 3.3.4) had <a class="el" href="install_notes.html#install_qt_print">Trouble printing</a></p>
<p>Modern Linux distributions have a compatible version of the Qt 3 libraries installed. However, the header files might be missing unless the "developer" package of Qt was also installed. On some distributions, this is part of the KDE developer package.</p>
<p>The current release of Qt is 3.3.7. and Qt 4.1.4. <em>HippoDraw</em> has been tested with both version on Linux, Mac OS X, and Windows</p>
<p>If an adequate version of Qt is not already installed on your system, it must be built and installed from source. See <a class="el" href="install_notes.html#install_extern_qt">Installing Trolltech's Qt</a> section below.</p>
<p>This release was developed with Qt 3.3.7 on Linux, Mac OS X, and Windows, but also tested with Qt 3.1.2 on Red Hat Enterprise 3 system and Qt 4.1.2, on Fedora Core 6.</p>
<h3><a class="anchor" id="install_python"></a>
Python</h3>
<p><b>HippoDraw</b> requires Python 2.3 or later for full functionality of its Python extension module. The reason for this requirement is to allow the user to write classes in Python that are derived from <b>HippoDraw</b> C++ base class. If earlier version of Python is found, these features will be disabled in the build. Only two classes are involved, the ObserverWrap and FunctionWrap.</p>
<p>Python can be obtained from <a href="http://www.python.org.">http://www.python.org.</a> This release was tested with Python 2.2, 2.3, and 2.4.</p>
<h3><a class="anchor" id="install_boost"></a>
Boost.Python</h3>
<p><b>HippoDraw</b> uses <a href="http://www.boost.org/libs/python/doc/index.html">Boost.Python </a> to build its Python extension module. Boost.Python is one of the libraries of the <a href="http://www.boost.org">Boost.org </a> project.</p>
<p>Boost.Python version 1.32.0 or later is required for full functionality of <b>HippoDraw's</b> Python extension modules.</p>
<p>Only one class, FunctionWrap, requires this recent version of Boost, all others could use Boost-1.29.0 or later. See <a class="el" href="install_notes.html#install_config_boost">Boost path and library.</a> for configuring <b>HippoDraw</b> for older versions of Boost. This release was developed with Boost-1_33_1.</p>
<p>See the <a class="el" href="install_notes.html#install_extern_boost">Installing Boost</a> section for tips on installing Boost.</p>
<h3><a class="anchor" id="install_minuit"></a>
Minuit (optional)</h3>
<p>The C++ version of Minuit can be used by <b>HippoDraw</b>. This version is a grounds up re-write with involement of Fred James, the author of the original Fortran version.</p>
<p>Do not get confused by the older libMinuit.so shared library that comes with the ROOT distribution, it is not the same thing. That library is an f2c'd version of the original Fortran.</p>
<h3><a class="anchor" id="install_fits"></a>
FITS (optional)</h3>
<p><b>HippoDraw's</b> built-in support for reading a <a href="http://heasarc.gsfc.nasa.gov/docs/heasarc/fits.html">FITS </a> file is implemented by using the <a href="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html">CFITSIO </a> library. FITS binary and ASCII tables are supported as well as images.</p>
<h3><a class="anchor" id="install_wcslib"></a>
World CoordinateSystem library (WCSLIB) (optional)</h3>
<p><a href="http://www.atnf.csiro.au/people/mcalabre/WCS/">WCSLIB</a> is a C implementation of the coordinate transformations defined in the FITS WCS papers. When configured to use this library, <b>HippoDraw</b> provides and additional 10 transforms to its built-in transforms.</p>
<h3><a class="anchor" id="install_numarray"></a>
Python numerical arrays (optional)</h3>
<p><a href="http://www.stsci.edu/resources/software_hardware/numarray">Numarray </a>, <a href="http://numpy.scipy.org/">NumPy</a>, and <a href="http://numeric.scipy.org">Numeric</a> provide numerical array manipulation and computational capabilities similar to those found in IDL, Matlab, or Octave. When using numerical arrays, it is possible to write many efficient numerical data processing applications directly in Python. Thus it is highly recommended to use <b>HippoDraw</b> with one of the numerical array modules.</p>
<p><b>HippoDraw</b> can return a numerical array to Python from any of the type of DataSource objects that are supported. One can also import data to a <b>HippoDraw</b> DataSource from a numerical array. This requires that at least one of numerical array Python modules has been installed and <b>HippoDraw</b> configured to build with to use it.</p>
<h3><a class="anchor" id="install_pyfits"></a>
PyFITS (optional)</h3>
<p><a href="http://www.stsci.edu/resources/software_hardware/pyfits">PyFITS </a> provides an interface to FITS formated files for the Python. <b>HippoDraw</b> also supports reading FITS files from Python but the support is not as complete as PyFits. It requires installation of numarray. PyFits implementation is provided as part of the <b>HippoDraw</b> installation. It is needed if you want to read FITS files with a Python script. It is not needed for <b>HippoDraw's</b> built-in FITS support.</p>
<h3><a class="anchor" id="install_root"></a>
ROOT (optional)</h3>
<p>One common use of <a href="http://root.cern.ch">ROOT </a> files, is store a table of data as TBranch objects each with a single TLeaf. Files of this type can be imported by <b>HippoDraw</b> as a RootNTuple. HippoDraw has been tested with versions 3.10/02, 4.02/00, and 5.14/00 on both Linux and Windows.</p>
<h3><a class="anchor" id="install_sip"></a>
SIP (optional)</h3>
<p>You only need to build the SIP version of <b>HippoDraw's</b> Python module if you want to use <b>HippoDraw</b> with <a href="http://www.riverbankcomputing.co.uk/pyqt/index.php">PyQt.</a> You need to set the PyQt version number in the sip/Makefile. See the INSTALL file in the sip subdirectory for instructions.</p>
<h3><a class="anchor" id="install_opengl"></a>
OpenGL (optional)</h3>
<p>Guy Barrand &lt;<a href="mailto:barrand@lal.in2p3.fr">barrand@lal.in2p3.fr</a>&gt; has contributed code to use OpenGL for graphics with <b>HippoDraw</b>. See documentation in the OpenGL subdirectory. Although this work is not complete, one can configure <b>HippoDraw</b> to build a test program with it. The options is `--enable-openglbuild'.</p>
<h2><a class="anchor" id="install_build"></a>
Configuring HippoDraw</h2>
<p><b>HippoDraw</b> needs to be configured before building. This is done by running the configure script in the build directory. If all the required software was installed in their default places (usually <em>/usr/local</em>) then no configuration options should be needed.</p>
<h3><a class="anchor" id="install_autogen"></a>
Autogen</h3>
<p>If you obtained the source code from the CVS repository, you need to first create the configure script. Due to security restrictions at the SLAC, CVS access is only allowed to users with valid UNIX accounts at SLAC. If you obtained the source code from a gzipped tar file, the configure script has already been built and you can skip this step.</p>
<p>In source directory, just type ...</p>
<div class="fragment"><pre class="fragment">
&gt; ./autogen
</pre></div><p>This will create the Makefile.in in each subdirectory and the configure script that will be used in the next step. It will also create symbolic links in the <em>config</em> directory for scripts required by <em>autoconf</em>, <em>automake</em>, and <em>libtool</em>.</p>
<h3><a class="anchor" id="install_configure"></a>
Configuring</h3>
<p>The configure script allows one to specify where the various required and option software libraries are located. If they are installed in their default locations, then configure will find them automatically. Thus, if one runs configure like this...</p>
<div class="fragment"><pre class="fragment">
&gt; ../hippodraw/configure
</pre></div><p>one should be configured with with the required external packages and any optional packages that were found to be installed. If this doesn't work, then read on in this section for configuring with external packages installed in non-standard places and see section <a class="el" href="install_notes.html#install_config_fail">If Configure Fails.</a> for possible causes of the failure. The latter section also contains some special problems with Mac OS X.</p>
<p>It is recommended that you build in a separate directory from the source code. For example, if the name of the directory where the hippodraw source code is located is hippodraw/, then from the directory above it you might do</p>
<div class="fragment"><pre class="fragment">
&gt; mkdir hippodraw-BUILD 
&gt; cd hippodraw-BUILD
&gt; ../hippodraw/configure --with-Qt-dir=/usr/local/qt
</pre></div><p>This will force using Qt in <em>/usr/local</em>. The configure script will test the Qt installation and fail if faulty or incorrect path.</p>
<p>The configure script setups the build for the version of Python in your path. If this is not the version you want to build with, set your PATH environmental variable before running configure.</p>
<p>On Mac OS X, there are some special steps to be taken before running configure. See install_libtool_mac and install_config_mac below.</p>
<p>The configure script has many other options, which you can see by typing...</p>
<div class="fragment"><pre class="fragment">
&gt; ./configure --help
</pre></div><p>Most options are the same as other packages that use the GNU auto-tools suite. Some specific to <b>HippoDraw</b> are</p>
<h4><a class="anchor" id="install_config_qt"></a>
Qt 3 path and library</h4>
<p><em>--with-Qt-dir=</em> sets the path to the root of the Qt tree. The default if not given, is to try <em>/usr/local/qt</em> and if that fails, <em>/usr/lib/qt-3</em>.1. To build b HippoDraw without Qt interface, use <em>--without-Qt-dir</em></p>
<p><em>--with-Qt-lib=</em> sets the name of the Qt shared library. The default is qt-mt corresponding to libqt-mt.so which has multi-threading enabled which is required to use <em>HippoDraw</em> with Python.</p>
<p>Normally, under the directory where Qt has been installed, one finds Qt's bin, include, and lib directories. If this is not the case, then you need to use the remaining Qt related options to set the appropriate paths.</p>
<p>To use Qt 4 use the corresponding <em>--with-qt4</em> options. For example</p>
<div class="fragment"><pre class="fragment">
./hippodraw/configure --with-qt4-dir=/usr/local/Trolltech/Qt-4.1.4
</pre></div><p>If you are using Qt 4 and you plan to use the ListTuple class in Python, and you have a multi-processor machine, then one should configure like this</p>
<div class="fragment"><pre class="fragment">
./hippodraw/configure CPPFLAGS=-DHAVE_SMP --with-qt4-dir=/usr/local/Trolltech/Qt-4.1.2
</pre></div><p>Failure to do so may lead to mysterious crashes due to thread conflicts.</p>
<p>With this release, using Qt 4 has not been fully tested yet, but there are no known bugs that do not exist when built with Qt 3.</p>
<h4><a class="anchor" id="install_help"></a>
Installing built-in help</h4>
<p><em>--enable-help</em> enables building <b>HippoDraw</b> with the built-in help It is enabled by default. Building the help requires use of the <a href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen </a>tool. To disable building with the help, use <em>--disable-help</em> </p>
<h4><a class="anchor" id="install_config_boost"></a>
Boost path and library.</h4>
<p><em>--with-boost-version=</em> sets the version or boost installation. Must be 1_32 or later. The default is 1_33_1</p>
<p><em>--with-boost-root=</em> sets the path to the root of the boost installation. The default is <em>/usr/local</em>. This option only works if under this directory there is a subdirectory <em>include/Boost-1_33_1/</em> subdirectory and a lib subdirectory.</p>
<p><em>--with-boost-include=</em> sets the path to directory that contains a subdirectory <em>boost/</em> which contains the header files. The default is <em>/usr/local/include/boost-1_33_1/</em>.</p>
<p><em>--with-boost-lib=</em> sets the path to the boost libraries. The default is <em><em>/usr/local/lib/</em>.</em> </p>
<p><em>--with-boost-libname=</em> sets the name of the Boost.Python library. The default, if not given, is <em>boost_python-gcc-1_33_1</em>. A normal Boost install creates a dozen or so variations of each library. Because the compiler name is part of the library you may need to use this option when not compiling with gcc.</p>
<h4><a class="anchor" id="install_config_minuit"></a>
Minuit path and library.</h4>
<p>On 12 December 2005, the C++ version of Minuit made a transition from its initial interface to one compatible with ROOT coding standards. Either one can be used by <b>HippoDraw</b>. However, no further development or bug fixes will be done on the original, but your can still find its sources starting from here...</p>
<p><a href="http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/index.html">http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/index.html</a></p>
<p>For this version the library name is liblcgMinuit.so and the last released version is 1.7.9.</p>
<p>The latest version is called Minuit2 and is found here...</p>
<p><a href="http://seal.web.cern.ch/seal/MathLibs/Minuit2/html/index.html">http://seal.web.cern.ch/seal/MathLibs/Minuit2/html/index.html</a></p>
<p>The library name is libMinuit2Base.so and has no external dependencies other than the C++ standard library.</p>
<p>In addition, if you have ROOT installed, you may find libMinuit2.so as part of the installation. This library contains libMinuit2Base plus some other ROOT specific classes thus has dependencies on other ROOT libraries.</p>
<p><b>HippoDraw</b> can be configured to work with the original interface, the Minuit2 interface as a standalone, or the Minuit2 interface installed as part of your ROOT installation.</p>
<p>This release was tested Minuit-1.7.9 and Minuit2-5.12. Versions earlier than Minuit-1.4.0 incompatible.</p>
<p>In the following, one can use either <em>--with-minuit-xxx</em> or <em>--with-minuit2-xxx</em>. The former use the version of C++ Minuit with the original API and the latter uses the new (ROOT compatbile) API of Minuit2.</p>
<p><em>--with-minuit-include=</em> sets the path to the Minuit header files. The default, if not given, is <em>/usr/local/include/Minuit</em> which is the default install of the Minuit package. For Minuit2, the defaults are first <em>/usr/local/include/Minuit2</em> then<em>/usr/include/Minuit2</em>.</p>
<p><em>--with-minuit-lib=</em> sets the path to the directory where the libMinuit.so shared library is installed. The default, if not given, is <em>/usr/local/lib</em> which is the default install of the Minuit package. For Minuit2, the defaults are first <em>/usr/local/lib</em> then <em>/usr/lib</em>.</p>
<p><em>--with-minuit-libname=</em> sets the name the Minuit shared library. The default is <em>lcg_Minuit</em> corresponding to the installed liblcg_Minuit.so file. If the version of Minuit you have installed is 1.5.1 or earlier, then this option should be used to set the library name to <em>Minuit</em>.</p>
<p>If both versions of Minuit are found by default, then the Minuit2 implementation will be used. If neither version is found, and if ROOT installation is found, and if Minuit2 is found as part of it, then that version will be used.</p>
<p>If Minuit is not found in the default locations, then <b>HippoDraw</b> will be built without Minuit support.</p>
<h4><a class="anchor" id="install_config_cfitsio"></a>
CFITSIO path and library.</h4>
<p><em>--with-cfitsio-include=</em> sets the path to the CFITSIO header files. The default, if not given, is first <em>/usr/local/include</em> then <em>/usr/include/cfitsio</em> (as done with Fedora Core rpm).</p>
<p><em>--with-cfitsio-lib=</em> sets the path to the directory where the libcfitsio.so shared library is installed. The default, if not given, is first <em>/usr/local/lib</em> then <em>/usr/lib</em>.</p>
<p>CFITSIO might be installed as part of the FTOOLS package, in which case one should use its installation path.</p>
<p>If CFITSIO is not found in the default location, or if the path of one of the above options is set to `no' or incorrect, then <b>HippoDraw</b> will be built without CFITSIO support.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="install_notes.html#install_extern_cfitsio">CFITSIO installation</a></dd></dl>
<h3><a class="anchor" id="install_config_wcslib"></a>
WCSLIB path and library</h3>
<p><em>--with-wcslib=include=</em> sets the path to the WCSLIB include directory. The default, if not given is <em>/usr/local/include/wcslib</em>.</p>
<p><em>--with-wcslib-lib=</em> sets the path to the directory that contains the <em>libwcs.a</em> The default, if not given, is /usr/local/lib.</p>
<h4><a class="anchor" id="install_config_root"></a>
Build with ROOT support.</h4>
<p><em>--with-root-include=</em> sets the path to the ROOT header files. The default if not given, is <em>/usr/local/include/root</em>.</p>
<p><em>--with-root-lib=</em> sets the path to the ROOT library files. The default if not given, is <em>/usr/local/lib/root</em>.</p>
<p>If you want to build without ROOT support and ROOT is installed in the above default paths, then use <em>--without-root-include</em> or <em>--without-root-lib</em>.</p>
<p>If ROOT is not found in its default location, or if the path is set to `no' or incorrect, then <b>HippoDraw</b> will be built without ROOT support.</p>
<h4><a class="anchor" id="install_config_numarray"></a>
Build with numarray support.</h4>
<dl class="note"><dt><b>Note:</b></dt><dd>This release was tested with numarray-1.5.1 of numarray. Some versions after 1.3.3 namely, 1.4.x and 1.5.0, had a problem with at least one of the scripts in the examples directory. Problems was fixed with version 1.5.1</dd></dl>
<p><em>--enable-numarraybuild</em> enables (the default) building <b>HippoDraw</b> with support of importing and exporting numerical arrays with numarray. It is assumed the numarray Python module is installed in its default location e.g., <em>/usr/local/lib/python2</em>.4/site-packages. <em>configure</em> looks for numarray and if not found looks for numeric. If neither is found, support for Python numerical arrays is disabled.</p>
<p>There is one warning coming from the build ...</p>
<div class="fragment"><pre class="fragment">
g++ -DHAVE_CONFIG_H -I. -I../../hippodraw/numarray -I..
-I../../hippodraw -I../../hippodraw/python 
-I/usr/local/include/boost-1_33_1 -ftemplate-depth-60 
-I/usr/local/include/python2.4 -g -O2 -Wall 
-c ../../hippodraw/numarray/NumArrayTuple.cxx -MT 
NumArrayTuple.lo -MD -MP -MF .deps/NumArrayTuple.TPlo  -fPIC -DPIC
/usr/local/include/python2.4/numarray/libnumeric.h:47: warning: 
'libnumeric_API' defined but not used
</pre></div><p>which can be ignored.</p>
<h4><a class="anchor" id="install_config_numaeric"></a>
Build with Numeric support.</h4>
<p><em>--enable-numericbuild</em> enables building <b>HippoDraw</b> with support of importing and exporting numerical arrays with Numeric. It is assumed the Numeric Python module is installed in its default location e.g., <em>/usr/local/lib/python2</em>.4/site-packages. If both numarray and Numeric packages are installed, you need to use this option to force support for Numeric, otherwise numarray will be used. The above warning message from the compiler is also seen when using Numeric.</p>
<h4><a class="anchor" id="install_config_numpy"></a>
Build with NumPy support.</h4>
<p><em>--enable-numpybuild</em> enables building <b>HippoDraw</b> with support of importing and exporting numerical arrays with NumPy. It is assumed the NumPy Python module is installed in its default location e.g., <em>/usr/local/lib/python2</em>.4/site-packages. If both numarray and NumPy packages are installed, you need to use this option to force support for NumPy otherwise numarray will be used. The above warning message from the compiler is also seen when using Numeric.</p>
<h4><a class="anchor" id="install_config_sip"></a>
Build the SIP Python extension module.</h4>
<p><em>--enable-sipbuild</em> enables building the SIP based Python extension module. See the INSTALL file in the sip subdirectory for further details.</p>
<h2><a class="anchor" id="install_config_fail"></a>
If Configure Fails.</h2>
<p>The configure script can fail in a number of ways. Most of the time the error message you get is pretty clear. Here is a description of some common failures.</p>
<h3><a class="anchor" id="install_config_python"></a>
AM_PYTHON_PATH not found.</h3>
<p>You should only see this message if building from CVS checkout. If autogen fails because of missing `AM_PYTHON_PATH M4 macro, then automake 1.6 or later is not installed. When you install a newer version of automake, it is a good idea to do autoconf and libtool as well as these tools seem to have dependencies on each other.</p>
<h3><a class="anchor" id="install_config_file"></a>
Files not found.</h3>
<p>The configure script will fail if it fails to find header files or library files in the paths you specified with a configure option, or the default locations. Check that there isn't a typo in the options you gave. If the required files are really missing then they might be located elsewhere in your file system. If they are really missing, then you will need to install them.</p>
<h3><a class="anchor" id="install_config_gcc"></a>
C++ compiler doesn't work.</h3>
<p>If the configure script fails with the following error message</p>
<div class="fragment"><pre class="fragment">
    checking whether the C++ compiler works... 
    configure: error: cannot run C++ compiled programs.
</pre></div><p>then configure is not finding the libstdc++.so version corresponding to the version of gcc it is using. This can happen, for example, if gcc in <em>/usr/local/bin</em> is being used and your system doesn't use <em>/usr/local/lib</em> in its shared library paths. The fix is to run configure like this ...</p>
<div class="fragment"><pre class="fragment">
&gt; ../hippodraw/configure LD_LIBRARY_PATH=/usr/local/lib
</pre></div><p> or set your environment variable LD_LIBRARY_PATH accordingly. So for example, if in your environment gcc is found in <em>/usr/local/bin</em>, then you need to set LD_LIBRARY_PATH to <em>/usr/local/lib</em>.</p>
<h3><a class="anchor" id="install_config_afs"></a>
Build in AFS file system.</h3>
<p>If your build directory is in an AFS file system, then you must add the following option to configure</p>
<p>--disable-libtool-lock</p>
<p>Failure to do so will lead to the following error message to appear every two seconds</p>
<div class="fragment"><pre class="fragment">
      Waiting for BinnerBase.o.lock to be removed
</pre></div><p>With libtool locking disabled, one should not attempt to do parallel builds, <em>i.e</em>. using the `-j' option with the make command.</p>
<h2><a class="anchor" id="install_make"></a>
Building HippoDraw</h2>
<p>After configuring, building is just ...</p>
<div class="fragment"><pre class="fragment">
&gt; make
</pre></div><p>If compiling on a multiple processor machine (or dual core one), one can use the do a parallel build with</p>
<div class="fragment"><pre class="fragment">
&gt; make -j2
</pre></div><p>This will cut the time needed to build by almost a factor of two.</p>
<p>This command first compiles core library, than the Qt specific parts and standalone executable, and finally the Python extension module. It will take about 6 minutes on 2 GhZ Pentium Mobile laptop.</p>
<p>During the build, you may see warnings like this ... </p>
<div class="fragment"><pre class="fragment">
/usr/lib/qt-3.3/include/private/qucom_p.h:69: warning: \
'struct QUBuffer' has virtual functions but non-virtual destructor
/usr/lib/qt-3.3/include/private/qucom_p.h:77: warning: \
'struct QUType' has virtual functions but non-virtual destructor
</pre></div><p>when compiling some classes in the Qt or ROOT libraries. These appear if compiling with gcc 4.0 or later and can be safely ignored.</p>
<p>To generate the documentation for the C++ library, requires installation of <a href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a> and <a href="http://www.research.att.com/sw/tools/graphviz">Graphviz</a>. You can change the Doxygen configuration file, `doc/Doxyfile.in', so Graphviz is not needed, but you will lose ability to generate some graphs.</p>
<p>If these tools are installed type ...</p>
<div class="fragment"><pre class="fragment">
&gt; make docs
</pre></div><p>to generated the HTML documentation in your build directory. The main page will be <em>doc/html/index.html</em>.</p>
<p>If you want to generated PDF documentation, type</p>
<div class="fragment"><pre class="fragment">
&gt;  make pdfdoc
</pre></div><p>This takes much longer than just generating the HTML. It leads to a 38MB PDF file which contains almost 5000 pages (5 boxes of paper if printed double sided).</p>
<h2><a class="anchor" id="install_build_fail"></a>
If the Build fails</h2>
<h3><a class="anchor" id="install_build_fail_linkerhippo"></a>
With library not found</h3>
<p>If linking in the qt subdirectory fails with the message</p>
<div class="fragment"><pre class="fragment">
/usr/bin/ld: cannot find -l-lqassistantclient
collect2: ld returned 1 exit status
make[4]: *** [libhippoqt.la] Error 1
make[4]: Leaving directory `/build/HippoDraw-1.16.0/qt'
</pre></div><p>then when running configure, you need to add</p>
<div class="fragment"><pre class="fragment">
--with-Qt-lib=qt-mt
</pre></div><p>For some reason, the autoconf macro for Qt, finds it sucessfully, yet doesn't set the QT_LIBS macro correctly in the make files.</p>
<h3><a class="anchor" id="install_build_fail_linkerqt"></a>
With undefined reference to Qt</h3>
<p>If the build of <b>HippoDraw</b> fails with a linker error like this...</p>
<div class="fragment"><pre class="fragment">
../../qt/.libs/libhippoqt.so: undefined reference\
to `QWaitCondition::~QWaitCondition [in-charge]()'
../../qt/.libs/libhippoqt.so: undefined reference\
to `QApplication::lock()'
../../qt/.libs/libhippoqt.so: undefined reference\
to `QWaitCondition::wakeAll()'
../../qt/.libs/libhippoqt.so: undefined reference\
to `QApplication::unlock(bool)'
../../qt/.libs/libhippoqt.so: undefined reference\
to `QWaitCondition::QWaitCondition[in-charge]()'
../../qt/.libs/libhippoqt.so: undefined reference\
to `QWaitCondition::wait(unsigned long)'
</pre></div><p>Then it is most likely that the configure script found the non-threaded version of Qt. <b>HippoDraw</b> should be built with the thread version, so that it can be used with Python. The Qt library name that has threaded support is <em> libqt-mt.so</em>.</p>
<h3><a class="anchor" id="install_build_fail_qt335"></a>
With header not found</h3>
<p>If the build fails because the file axiswidget.h is not found when building with Qt 3.3.6, then you've hit a know bug in this release of Qt. It is documented here...</p>
<p><a href="http://www.trolltech.com/developer/tasktracker.html?method=entry&id=85440">http://www.trolltech.com/developer/tasktracker.html?method=entry&amp;id=85440</a></p>
<p>The fix is to open the qtui/Inspector.ui file and remove the includehints XML node.</p>
<h2><a class="anchor" id="install_install"></a>
Installing.</h2>
<p>Before attempting to install, make sure you have write privileges to the directories where <b>HippoDraw</b> will be installed. Typically, this is <em>/usr/local</em>, so you may have to su to root before typing the install command.</p>
<p>To install <b>HippoDraw</b> just type ...</p>
<div class="fragment"><pre class="fragment">
&gt; su
Password:
# make install
</pre></div><p>By default, installation is in <em>/usr/local/bin</em>. <em>usr/local/include/HippoDraw</em> and <em>usr/local/lib</em>. Also, the Python module will be installed in <em>/usr/local/lib/python&lt;n.m&gt;/site-packages</em> where `&lt;n.m&gt;' is the Python version (without any further. bug fix releases number). You can change the path to the install area with the <em>--prefix=</em> option to the <em>configure</em> command.</p>
<p>To install the class library documentation, type </p>
<div class="fragment"><pre class="fragment">
# make install-docs
</pre></div><p> They are not installed by default.</p>
<h2><a class="anchor" id="install_run"></a>
Running HippoDraw</h2>
<p>If you installed <b>HippoDraw</b> in the default path, <em>/usr/local</em>, then to run it as a stand-a-lone application, just type <em>hippodraw</em>. To use it as a python extension module, just import <em>hippo</em>.</p>
<p>If you did not install <b>HippoDraw</b> in the default area, then you need to add the path to the <b>HippoDraw</b> executable to your PATH environment variable or type the full path to the executable. To use <b>HippoDraw</b> as a Python extension module in this case, you need to add the path to the module to your PYTHONPATH environment variable. For example, if you installed <b>HippoDraw</b> in <em>/usr/local/test</em>, then csh users would do ...</p>
<div class="fragment"><pre class="fragment">
&gt; setenv PATH /usr/local/test/bin:$PATH
&gt; setenv PYTHONPATH /usr/local/test/lib/python2.4/site-packages:$PYTHONPATH
</pre></div><h2><a class="anchor" id="install_external"></a>
Hints on Installing External Packages.</h2>
<p>Most required or optional software packages used by <b>HippoDraw</b> install with the standard configure, make, make install dance. They usually install binaries, header files, and libraries in <em>/usr/local/bin</em>, <em>/usr/local/include</em>, and <em>/usr/local/lib</em> respectively where the <b>HippoDraw</b> configure script will find them by default. If you do not have write access to <em>/usr/local</em> and can not convince your system administrator to install them there for you, then you'll have to install them elsewhere. I recommend that you when you configure these external packages, you type...</p>
<div class="fragment"><pre class="fragment">
&gt; configure --prefix=$HOME
</pre></div><p>then they will be installed in your home directory under <em>bin/</em>, <em>include/</em>, and <em>lib/</em>. This will it easier to install and use them and other packages that depend on them. Just set your PATH environment variable in include $HOME/bin and your LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OS X) to include $HOME/lib.</p>
<p>Some external packages cause some trouble if you don't read the instructions carefully. This sections give some tips that have been learn over time by the developers of <b>HippoDraw</b>.</p>
<h3><a class="anchor" id="install_extern_qt"></a>
Installing Trolltech's Qt</h3>
<p>Installing Qt from source is straight forward as the standard <em> configure, make, make install </em> dance almost works. Don't panic, two options in Qt's configure step make it easy to build for use by <b>HippoDraw</b>. Both are needed for Qt 3.x and are the defaults for Qt 4.x.</p>
<p>The first option is to configure Qt with multi-threading support. The configure option is <em>-thread</em>. This is needed in order to be able to run HippoDraw as a Python extension module.</p>
<p>The second option is to set the run-time library path for the Qt library. This is needed so that you do not have to set the <em>LD_LIBRARY_PATH</em> environment variable when the <b>HippoDraw's</b> build invokes Qt's <em>uic</em> and <em>moc</em> executables. The Qt configure option is <em>-R</em>. If you are using a compiler whose corresponding library is not in <em>/usr/lib</em>, then you should also add its path to the <em>-R</em> option.</p>
<p>Trolltech recommends unpacking the sources in <em>/usr/local</em> and doing a build in place. If you do that, then all the example files will be built in your <em>/usr/local</em> which you may not want. I do a build in a work area, and then an install to <em>/usr/local</em>.</p>
<p>A recent build of Qt 3 was done as follows:</p>
<div class="fragment"><pre class="fragment">
&gt; tar zxvf qt-x11-free-3.3.4.tar.gz
&gt; cd /home/pfkeb/qt-x11-free-3.3.4/
&gt; setenv QTDIR /home/pfkeb/qt-x11-free-3.3.4
&gt; setenv PATH $QTDIR/bin:$PATH
&gt; setenv MANPATH $QTDIR/doc/man
&gt; setenv LD_LIBRARY_PATH $QTDIR/lib:/usr/local/lib
&gt; ./configure -prefix /usr/local/qt-x11-free-3.3.4 
  -R/usr/local/qt-x11-free-3.3.4/lib -R/usr/local/lib -thread -qt-gif
&gt; make
&gt; su
Password:
# make install
</pre></div><p>You must also build Qt with the same compiler as you will use to build <b>HippoDraw</b>.</p>
<p>Building with Qt 4 is easier, just follow the instructions that come with the distribution.</p>
<h3><a class="anchor" id="install_extern_boost"></a>
Installing Boost</h3>
<p>Boost uses <em>bjam</em> to do a build instead of make. The <em>bjam</em> file can be obtained as pre-built executable by following the links on the Boost <a href="http://www.boost.org/more/getting_started.html#step2">Getting started</a> pages You only need one file which one can copy to <em>/usr/local/bin</em> or elsewhere in your PATH.</p>
<p>Boost versions 1_31_0 and later are easier to build than earliler versions by following the its web pages. At least for version 1_33_1 it is even easier than documented on their Web pages. The following just works....</p>
<div class="fragment"><pre class="fragment">
&gt; configure
&gt; make
&gt; make install
</pre></div><p>The above sequence of commands will build and install all the Boost librries. You can save 200MB of disk space and considerable amount of time by building only the Boost.Python libraries. This is done by adding <em> --with-libraries=python </em> to the confiugre command.</p>
<p>Apparently, the configure script creates a Makefile as a wrapper to the <em>bjam</em> command. So you still need the <em>bjam</em> executable, but don't need to know the <em>bjam</em> command syntax.</p>
<p>If you are going to try to follow Boost's instructions for building, then its seems that setting the environment variable `PYTHON_VERSION' and `PYTHON_ROOT' is missing from these pages, but documented within the Boost.Python web pages, otherwise it builds as instructed. This is true for both Windows and Unix like systems. With Boost version 1_31 there are warning messages about redefining _POSIX_C_SOURCE which apparently can be ignored. These warning don't appear with version 1_33 or later.</p>
<p>The following was done for installing Boost with bjam directly</p>
<div class="fragment"><pre class="fragment">
&gt; tar zxvf boost_1_33_1.tar.gz
&gt; cd boost_1_33_1
&gt; su
Password:
# export PYTHON_VERSION=2.4
# export PYTHON_ROOT=/usr/local
# bjam "-sTOOLS=gcc" install
</pre></div><p>For Mac OS X, see install_extern_boost_mac.</p>
<p>This puts dozens of shared and static library files in <em>/usr/local/lib</em>. One probably doesn't need them all. If short on disk space, one might try the <em>--without-&lt;library&gt;</em> option to the bjam command. Or one might use the `stage' option and only copy the header directory <em>boost</em> and the required library files to <em>/usr/local</em> manually.</p>
<h3><a class="anchor" id="install_extern_boost_python_version"></a>
Possible Unicode Problem</h3>
<p>If you get the following error after building <b>HippoDraw</b> ...</p>
<div class="fragment"><pre class="fragment">

[pfkeb@localhost testsuite]$ python -i canvas.py
Traceback (most recent call last):
  File "canvas.py", line 13, in ?
    from hippo import HDApp
ImportError: /usr/local/lib/libboost_python-gcc-1_33.so.1.33.0:
 undefined symbol: PyUnicodeUCS4_FromEncodedObject

</pre></div><p>it is most likely caused by building Boost.Python with version of Python with UCS-4 mode and building Hippodraw with another version of Python without it. handling. For example, the Boost version that comes with Fedora Core 4 will have this problem if you install a new version of Python in /usr/local bin.</p>
<p>The fix is to make sure you are using the same version of Python for building Boost.Python and HippoDraw. My recommendation is to build and install Python in /usr/local. You'll then get the <em>pydoc</em> and <em>idle</em> commands which are missing from the Red Hat distributions. Also, you may want to install external Python modules in <em>/usr/local/lib/python2</em>.4/site-packages that are not available as Fedora rpms. Then you can rebuild Boost and go to a new version, say 1_33 at the same time.</p>
<h3><a class="anchor" id="install_extern_cfitsio"></a>
CFITSIO installation</h3>
<p><b>HippoDraw</b> has been tested with cfitsio 2.510 and 3.006. RPM files for version 3.006 have been available in Fedora Core <em>extras</em> since version 3 and perhaps other Linux distributions.</p>
<p>As of cfitsio 2.510, its <em>configure</em> script does not behave like most configure scripts of other Open Source packages. In particular, the defult prefix path is the directory in which the script is invoked. If you want to install cfitsio in a public area like <em>/usr/local</em>, only the <em>--prefix</em> option works, but not the <em>--includedir</em> or <em>--libdir</em>.</p>
<p>Also, the cfitsio Makefile does not build shared library required by <b>HippoDraw</b> by default. So the installation of cfitsio that will work well with <b>HippoDraw</b> would be...</p>
<div class="fragment"><pre class="fragment">
&gt; configure --prefix=/usr/local
&gt; make
&gt; make shared
&gt; make install
</pre></div><p>An unfortunate side effect of building like this is that two .h files are copied to <em>/usr/local/include</em> whose names give no clue that they belong to the cfitsio package. They are <em> drvrsmen.h</em> and <em> longnam.h</em> and for the former, even its contents give no clue that it belongs to the cfitsio package.</p>
<h2><a class="anchor" id="install_problems"></a>
Known Problems.</h2>
<p>Here are some know problems with certain versions of external software.</p>
<h3><a class="anchor" id="install_qt_print"></a>
Trouble printing</h3>
<p>Under Red Hat Enterprise Linux 3, Qt version 3.3.4 as problems generating correct PostScript. It can neither print the a printer nor create a valid PostScript file. Version 3.3.3 can create valid PostScript files, but can't talk to the printer. Version 3.3.2 and older do not have either problem.</p>
<h3><a class="anchor" id="install_python_warnings"></a>
_POSIX_C_SOURCE warning</h3>
<p>When compiling <b>HippoDraw</b> or Boost.Python, you may see warnings that "_POSIX_C_SOURCE being redefined". They can safely be ignored. The warning do not occur with Boost version 1_33 or later.</p>
<h3><a class="anchor" id="install_compile"></a>
Internal compiler error with Boost.Python</h3>
<p>If you get the following error</p>
<div class="fragment"><pre class="fragment">
/usr/include/boost/python/detail/def_helper.hpp:80:
internal compiler error: 
Segmentation fault
</pre></div><p>then the following might help...</p>
<div class="fragment"><pre class="fragment">
Modified "boost/python/detail/translate_exception.hpp"(line 40)
From:        catch(exception_cref e)
To:          catch(exception_cref&amp; e)
</pre></div><p>This problem was reported by Akito Kusaka. He was using SuSE 9.1, boost.python 1.31.0 from RPM package, gcc 3.3.3 from RPM package. He found the fix in <a href="http://mail.python.org/pipermail/c++-sig/2004-June/007587.html">http://mail.python.org/pipermail/c++-sig/2004-June/007587.html</a></p>
<h3><a class="anchor" id="install_prob_boost"></a>
Boost.Python 1.30.x</h3>
<p>Gcc 3.3.x series with Boost.Python 1_30_x has a problem. The error is first seen in compiling python/QtCut.cxx with the following message.</p>
<div class="fragment"><pre class="fragment">
/usr/include/boost/python/converter/as_to_python_function.hpp:28: sorry,
unimplemented: `method_call_expr' not supported by dump_expr
</pre></div><p>Suggested work around is found on Python C++-sig <a href="http://mail.python.org/pipermail/c++-sig/2003-May/003935.html">mailing list </a>. It allows compilation and linking but two the the test scripts, datareps.py and cuts.py, both fail at runtime.</p>
<h3><a class="anchor" id="install_prob_2head"></a>
Two headed display systems.</h3>
<p>With the Qt 3.1 installed on Red Hat Linux 9, <b>HippoDraw</b> doesn't work on computers with multi-head displays. It works with Qt 3.3.1 and perhaps earlier versions</p>
<h3><a class="anchor" id="install_prob_seg_fault"></a>
Segmentation fault on exit.</h3>
<p>With Qt version 3.1.0, there is a segmentation fault when one exits the application run as a Python extension module. This appears to be a bug in Qt later version of Qt do not have the problem.</p>
<h3><a class="anchor" id="install_prob_int_error"></a>
Internal QThread error on exit.</h3>
<p>With Qt version 3.3.3 and later versions of Qt 3, there is error message</p>
<div class="fragment"><pre class="fragment">
&gt;&gt;&gt; QThread: internal error: zero data for running thread.
</pre></div><p> when one terminates the application.</p>
<h3><a class="anchor" id="install_prob_boost_23"></a>
Boost 1.31.0 required for Python 2.3.</h3>
<p>Python 2.3 has some problems due change in C preprocessor macros (see <a href="http://mail.python.org/pipermail/c++-sig/2003-August/005046.html">http://mail.python.org/pipermail/c++-sig/2003-August/005046.html</a>). Use Boost version 1_31.0 or later if you have Python 2.3 installed. With version 1.29.0, there are some warning message issued by gcc 3.x which can safely be ignored. They do not appear with earlier versions of gcc or with Boost.python version 1.30.0 or later.</p>
<h3><a class="anchor" id="install_prob_python"></a>
Installing Python</h3>
<p>Building and installing Python is the standard dance...</p>
<div class="fragment"><pre class="fragment">
&gt; cd Python-2.4
&gt; ./configure
&gt; make
&gt; su
Password:
# make install
</pre></div><p>When installing Python as root user with its <em>make</em> <em>install</em> it might fail with</p>
<div class="fragment"><pre class="fragment">

/usr/bin/install -c -m 644 ./LICENSE /usr/local/lib/python2.3/LICENSE.txt
PYTHONPATH=/usr/local/lib/python2.3   \
        ./python -Wi -tt /usr/local/lib/python2.3/compileall.py \
        -d /usr/local/lib/python2.3 -f \
        -x 'badsyntax|site-packages' /usr/local/lib/python2.3
./python: error while loading shared libraries: libstdc++.so.6:
 cannot open shared object file: No such file or directory
make: *** [libinstall] Error 127

</pre></div><p>The problem can be caused by the compiler being installed in <em>/usr/local</em> and the root user not having <em>/usr/local/lib</em> in his <em>LD_LIBRARY_PATH</em>. Just do</p>
<div class="fragment"><pre class="fragment">

export LD_LIBRARY_PATH=/usr/local/lib

</pre></div><p>and try again.</p>
<h3><a class="anchor" id="install_prob_pygcc"></a>
Rebuilding Python</h3>
<p>If you built and installed Python, and then install a newer version of gcc with a newer version of libstdc++.so, then <b>HippoDraw's</b> Python extension module might fail. This is because <b>HippoDraw</b> built with the new version of the compiler is linked to a library incompatible with the one Python was built with. The solution to the problem is rebuild and install Python with the same compiler version used to built <b>HippoDraw</b>.</p>
<h3><a class="anchor" id="installing_numarray"></a>
Installing numarray</h3>
<p>The instructions for installing numarray on its Web site are not entirely correct. The script <em> setupall.py </em> does not exist. As root user, use the <em> setup.py </em> script like this ...</p>
<div class="fragment"><pre class="fragment">
&gt; cd numarray-1.15.1
&gt; python setup.py install
&gt;
</pre></div><h3><a class="anchor" id="installing_pyfits"></a>
Installing PyFITS</h3>
<p>The instructions for installing PyFITS on its Web say just to download and copy the file <em> pyfits.py </em>. However, if you do this as root user, it will not have the correct permissions for normal user. To fix this, as root user just type...</p>
<div class="fragment"><pre class="fragment">
&gt; cp pyfits /usr/local/lib/python2.4/site-packages/.
&gt; chmod 755 /usr/local/lib/python2.4/site-packages/pyfits.py
&gt;
</pre></div><p>Change the above to your version of Python as appropriate.</p>
<h3><a class="anchor" id="install_root_gcc"></a>
ROOT crashes at startup.</h3>
<p>If <b>HippoDraw</b> was built with ROOT file support, and ROOT crashes at startup of a HippoDraw Python extension module, then the cause may be that ROOT's linkage to the C++ standard library is incompatible with <b>HippoDraw's</b>. This has been observed, for example, if ROOT is built with gcc 3.2, and HippoDraw is built with gcc 3.4 or later. The fix is to compile ROOT from source with later version of gcc. ROOT doesn't appear to compile with gcc 4.0, but building ROOT from source with gcc 3.4 and HippoDraw with gcc 4.0 seems to work ok.</p>
<h3><a class="anchor" id="install_selinux"></a>
Error loading shared libraries</h3>
<p>If you get the following error message when trying to start the hippodraw applicaiton ...</p>
<div class="fragment"><pre class="fragment">
error while loading shared libraries:
/home/pfkeb/hippodraw-NATIVE/lib/.libs/libhippo.so.0:
 cannot restore segment prot after reloc: Permission denied
</pre></div><p>or the following message when importing the Python extension module</p>
<div class="fragment"><pre class="fragment">
importError: /home/pfkeb/hippodraw-NATIVE/lib/.libs/libhippo.so.0:
cannot restore segment prot after reloc: Permission denied
</pre></div><p>then you are problably running SELinux. Newer Linux distributions have enabled new kernel security extensions from the SELinux project at the NSA. These extensions allow finer-grained control over system security. However, SELinux also changes some default system behaviors, such as shared library loading, that can be problematic to third party programs.</p>
<p>To fix this problem you can change the default security context of HippoDraw with the command...</p>
<div class="fragment"><pre class="fragment">
chcon -t texrel_shlib_t &lt;path-to-hippodraw&gt;/libhippo.so.0.0.o
</pre></div><p>or putting SELinux in Permissive or Disabled mode.</p>
<h3><a class="anchor" id="install_libstdc"></a>
Error finding "libstdc++.la"</h3>
<p>If you get the error message building HippoDraw like this ...</p>
<div class="fragment"><pre class="fragment">
grep: /usr/local/lib/libstdc++.la: No such file or directory
/bin/sed: can't read /usr/local/lib/libstdc++.la:
No such file or directory
libtool: link: `/usr/local/lib/libstdc++.la' is not a valid libtool archive
make[2]: *** [libhippo.la] Error 1
make[2]: Leaving directory `/home/pfkeb/hippodraw-BUILD/lib'
</pre></div><p>then the fault is not in HippoDraw but in one of the external libraries it is linking against. This can happen when the external library uses libtool for building and was built with gcc in /usr/local. If gcc in /usr/local gets removed, say because upgrading the OS brought a newer version, then the external library will need to be rebuilt.</p>
<h2><a class="anchor" id="install_wcslib_error"></a>
Building WCSlib on 64 bit machine</h2>
<p>Installing the optional <a class="el" href="install_notes.html#install_wcslib">World CoordinateSystem library (WCSLIB) (optional)</a> version 4.2 has the following compilation errors on 64 bit machines</p>
<div class="fragment"><pre class="fragment">
gcc -DHAVE_CONFIG_H -g -O2 -c wcsulex.c
In file included from lex.wcsulex.c:8848:
/usr/include/unistd.h:441: error: conflicting types for 'read'
lex.wcsulex.c:8523: error: previous implicit declaration of 'read' was here
make[2]: *** [wcsulex.o] Error 1

gcc -DHAVE_CONFIG_H -g -O2 -c wcsutrn.c
In file included from lex.wcsutrn.c:5103:
/usr/include/unistd.h:441: error: conflicting types for 'read'
lex.wcsutrn.c:4793: error: previous implicit declaration of 'read' was here
make[2]: *** [wcsutrn.o] Error 1
make[2]: Target `lib' not remade because of errors.
make[1]: *** [../C/libwcs-4.2.a] Error 2
</pre></div><p>The problems appears to be that files <em> wcsulex.c</em> and <em>wcsutrn.c</em> were generated by a <em>flex</em> incompatible with the <em> unistd.h</em> file on a 64 bit machine. The fix is to <em>touch</em> the files <em>wcsulex.l</em> and <em>wcsutrn.l</em> to change their file dates. Then when you issue <em>make</em>, the 64 bit flex will be used to reproduce these files and they can compile.</p>
<p>Also there a lots of warning of the kind</p>
<div class="fragment"><pre class="fragment">
wcs.c:1306: warning: cast from pointer to integer of different size
</pre></div><p>All are within a <em>printf</em> expressios. </p>
</div></div>
<hr size="1"><address style="align: right;"><small>
Generated for HippoDraw by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
</a> </small></address>
</body>
</html>