Installation: Difference between revisions

From iMath
Jump to navigation Jump to search
(First version)
 
(Started documenting Windows compilation)
Line 38: Line 38:
     * Install imath.oxt into openoffice using the extension manager (options-extension manager).
     * Install imath.oxt into openoffice using the extension manager (options-extension manager).
     * Install the html documentation from the doc subdirectory in your favourite location.
     * Install the html documentation from the doc subdirectory in your favourite location.
=== Compiling natively for Windows ===
This is what I tried after failing with the cross-compilation:
    * Download and install the Openoffice SDK
    * The following is explained in detail in "SDK installation directory"\sdk\docs\install.html
    * Install Microsoft Visual C++ (the free express version will do, then you also need to install the
      Microsoft Visual Studio 2008 Redistributable Package
    * Install make and zip (for example, in WINDOWS\system32, or somewhere else in your path)
To test the SDK installation, open a command prompt and cd to the ...\sdk\examples\cpp\DocumentLoader directory.
Run ...\sdk\setsdkenv_windows.bat to configure your environment. This should create a custom batch file
somewhere in your home directory. I had to edit this custom batch file and add a correct URE path:
set OO_SDK_URE_HOME=C:\Programme\OpenOffice.org 3\URE
Now try to build the example by typing make, if this is not successful fix the problems before continuing
  * Install mingw from www.mingw.org (the minimal version will do since we will be using the Microsoft compiler)
  * Install msys and msysdtk from www.mingw.org
  * Click on the MSYS icon to start a Bourne shell
  * Add .../Microsoft Visual Studio 9.0/Common7/IDE and .../Microsoft Visual Studio 9.0/VC/BIN to PATH
    (PATH="$PATH":"..."). You can find these paths in vsvars32.bat somewhere in the Visual Studio installation directory.


=== Binary packages ===
=== Binary packages ===

Revision as of 02:58, 15 May 2010

Installation

How to obtain iMath

iMath is hosted at SourceForge. You can download the curent release from [1]. A complete overview of all files is available in the files section [2].

Requirements

To compile and use iMath, the GiNaC, CLN, GMP and EQC libraries are required, as well as the standard C++ development libraries, flex and bison. Information about these libraries can be found at the GiNaC library homepage, CLN library homepage and EQC library homepage. Compilation has been tested with EQC 1.4.1 using g++-4.4. Older versions will most probably not work.

Compilation and installation

In order to compile and install iMath on your system, type the following in the base directory of the iMath distribution:

   % ./configure
   % make
   % make install

Since iMath uses autoconf you should have no trouble compiling it. Should you run into problems please report them to the the author.

Cross-compiling for Windows

I have given up on this, maybe someone else wants to try? The following is what I tried, but I could never get configure to build DLLs.

iMath could maybe be cross-compiled for windows by installing the mingw32 package. The following steps are necessary to build iMath for windows under Debian GNU Linux:

   * Compile and install the CLN library (run configure with --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --without-gmp, then make and make install). Maybe it needs to be patched (see http://thep.physik.uni-mainz.de/pipermail/cln-list/2005-April/000116.html).
   * Compile and install the gmp library. (run configure with --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc, then make and make install). On my system, this requires a patch to configure: Replace the statement BITS_PER_MP_LIMB=`expr 8 \* $ac_cv_sizeof_mp_limb_t` with BITS_PER_MP_LIMB=32 (or whatever value is correct for your system. To find this out, insert an echo $ac_cv_sizeof_mp_limb_t and multiply by 8 manually).
   * Compile and install the ginac library (run configure with --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-cln-prefix=/usr/i586-mingw32msvc, then make and make install).. You can ignore the error about libreadline not being found, since we will not be needing ginsh.
   * Compile and install the eqc library.
   * If make reports an error while compiling input_lexer.cc, edit the file config.h created by configure, and at the end, put #define YYTEXT_POINTER 1. If you don't want to rebuild all the files compiled up to then, run make -t, remove all files with size 0, and re-run make.
   * Probably, linking of ginsh.exe and viewgar.exe in GiNaC will also fail, but since they are not necessary, just run make -t in the subdirectories ginsh and tools.
   * Set the environment variable CPPFLAGS to -DMINGW.
   * Run 'make distclean' if necessary.
   * Run configure with --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-ginac-prefix=/usr/i586-mingw32msvc. This might requiree a patch to /usr/i586-mingw32msvc/bin/ginac-config: Replace the line saying echo $libdirs -lginac -L/usr/lib -lcln -lgmp with echo ${exec_prefix}/lib/libginac.a ${exec_prefix}/lib/libcln.a ${exec_prefix}/lib/libgmp.a
   * You might want to strip the imath.dll library: i586-mingw32msvc-strip imath.dll. This will greatly reduce the file size.
   * Install imath.oxt into openoffice using the extension manager (options-extension manager).
   * Install the html documentation from the doc subdirectory in your favourite location.

Compiling natively for Windows

This is what I tried after failing with the cross-compilation:

   * Download and install the Openoffice SDK
   * The following is explained in detail in "SDK installation directory"\sdk\docs\install.html
   * Install Microsoft Visual C++ (the free express version will do, then you also need to install the
     Microsoft Visual Studio 2008 Redistributable Package
   * Install make and zip (for example, in WINDOWS\system32, or somewhere else in your path)

To test the SDK installation, open a command prompt and cd to the ...\sdk\examples\cpp\DocumentLoader directory. Run ...\sdk\setsdkenv_windows.bat to configure your environment. This should create a custom batch file somewhere in your home directory. I had to edit this custom batch file and add a correct URE path: set OO_SDK_URE_HOME=C:\Programme\OpenOffice.org 3\URE Now try to build the example by typing make, if this is not successful fix the problems before continuing

 * Install mingw from www.mingw.org (the minimal version will do since we will be using the Microsoft compiler)
 * Install msys and msysdtk from www.mingw.org
 * Click on the MSYS icon to start a Bourne shell
 * Add .../Microsoft Visual Studio 9.0/Common7/IDE and .../Microsoft Visual Studio 9.0/VC/BIN to PATH
   (PATH="$PATH":"..."). You can find these paths in vsvars32.bat somewhere in the Visual Studio installation directory.


Binary packages

If all this is too complicated for you, RPM and Debian packages have been released on SourceFourge. They are accessible on the iMath project page [3]

Bugs

Known bugs

   * ...

Reporting bugs

Please report all bugs to the author. You should include the following information:

   * Version of iMath, how you obtained it (RPM, CVS, binary or source).
   * The input file that produces the errors.
   * The output produced by iMath when running openoffice.org -writer <input file> from the command line
   * Set the debugging option (Extras-Options-Writer-iMath) to a higher value to get more debugging output