[QuantLibAddin-cvs] QuantLibAddin/Docs/pages calc.docs, 1.1, 1.1.2.1
Brought to you by:
ericehlers,
nando
|
From: Eric E. <eri...@us...> - 2006-08-04 21:06:43
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/Docs/pages In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1819 Modified Files: Tag: R000313f0-branch calc.docs Log Message: update calc build instructions Index: calc.docs =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/Docs/pages/calc.docs,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** calc.docs 19 May 2006 16:56:16 -0000 1.1 --- calc.docs 4 Aug 2006 21:06:37 -0000 1.1.2.1 *************** *** 1,5 **** /* ! Copyright (C) 2004, 2005 Eric Ehlers This file is part of QuantLib, a free-software/open-source library --- 1,5 ---- /* ! Copyright (C) 2004, 2005, 2006 Eric Ehlers This file is part of QuantLib, a free-software/open-source library *************** *** 27,35 **** Before compiling an Addin for OOo Calc you'll need to install: ! \li <a href="http://java.sun.com/j2se/1.4.2/download.html">Java 2 Platform, Standard Edition ("J2SE")</a> ! \li <a href="http://www.openoffice.org/dev_docs/source/sdk/index.html">OpenOffice.org Software Development Kit ("OOo SDK")</a> Unfortunately the OOo SDK requires the J2SE, even on platforms (such as Fedora) where Java dependency has been removed from OOo, and for Addins (such as %QuantLibAddin) with no dependency on Java. \subsection calc_env Environment Variables --- 27,39 ---- Before compiling an Addin for OOo Calc you'll need to install: ! \li <a href="http://java.sun.com/j2se/1.5.0/download-netbeans.html">J2SE Development Kit</a> ! \li <a href="http://download.openoffice.org/2.0.2/sdk.html">OpenOffice.org Software Development Kit ("OOo SDK")</a> Unfortunately the OOo SDK requires the J2SE, even on platforms (such as Fedora) where Java dependency has been removed from OOo, and for Addins (such as %QuantLibAddin) with no dependency on Java. + When installing the OOo SDK: + \li make sure you get the version of the OOo SDK that corresponds to the version of OOo which you have installed. QuantLibAddin 0.3.13 has been tested against OOo/OOo SDK versions 2.0.1 and 2.0.2. + \li the OOo SDK must be installed to a path which contains no spaces, because of a bug in OOo SDK utility \c idlc which prevents it from processing pathnames containing spaces. + \subsection calc_env Environment Variables *************** *** 39,62 **** <b>variable:</b> OFFICE_PROGRAM_PATH<br> <b>description:</b> location of OOo program directory<br> ! <b>value on Linux:</b> /usr/lib/ooo-1.1/program<br> ! <b>value on Windows:</b> C:\\Program Files\\OpenOffice.org1.1.3\\program<br> <b>variable:</b> OFFICE_SDK_PATH<br> <b>description:</b> location of OOo SDK<br> ! <b>value on Linux:</b> /path/to/OpenOffice.org1.1_SDK<br> ! <b>value on Windows:</b> C:\\path\\to\\OpenOffice.org1.1_SDK<br> <b>variable:</b> PATH<br> <b>description:</b> Must include location of OOo SDK bin directory<br> ! <b>value on Linux:</b> /path/to/OpenOffice.org1.1_SDK/linux/bin<br> ! <b>value on Windows:</b> C:\\path\\to\\OpenOffice.org1.1_SDK\\windows\\bin<br> </tt> On Linux, you might want to add the appropriate commands to the initialization file for your login shell, e.g: ! \verbatim ! export OFFICE_PROGRAM_PATH="/usr/lib/ooo-1.1/program" ! export OFFICE_SDK_PATH="/path/to/OpenOffice.org1.1_SDK" ! PATH=$PATH:$OFFICE_SDK_PATH/linux/bin ! \endverbatim \subsection calc_build Build --- 43,67 ---- <b>variable:</b> OFFICE_PROGRAM_PATH<br> <b>description:</b> location of OOo program directory<br> ! <b>value on Linux:</b> /usr/lib/openoffice.org2.0/program<br> ! <b>value on Windows:</b> C:\\Program Files\\OpenOffice.org 2.0\\program<br> <b>variable:</b> OFFICE_SDK_PATH<br> <b>description:</b> location of OOo SDK<br> ! <b>value on Linux:</b> /opt/openoffice.org2.0_sdk<br> ! <b>value on Windows:</b> C:\\OpenOffice.org_2.0_SDK<br> <b>variable:</b> PATH<br> <b>description:</b> Must include location of OOo SDK bin directory<br> ! <b>value on Linux:</b> /opt/openoffice.org2.0_sdk/linux/bin<br> ! <b>value on Windows:</b> C:\\OpenOffice.org_2.0_SDK\\windows\\bin<br> </tt> On Linux, you might want to add the appropriate commands to the initialization file for your login shell, e.g: ! ! <tt> ! export OFFICE_PROGRAM_PATH="/usr/lib/openoffice.org2.0/program"<br> ! export OFFICE_SDK_PATH="/opt/openoffice.org2.0_sdk"<br> ! PATH=$PATH:$OFFICE_SDK_PATH/linux/bin<br> ! </tt> \subsection calc_build Build *************** *** 64,71 **** Below are the steps required to compile and install an Addin for OpenOffice.org Calc (Windows and Linux). These steps have been incorporated into the %QuantLibAddin Calc makefiles for all compilers/platforms. ! \li \b idlc - Run OOo utility \b idlc to compile the idl (interface definition language) file QuantLibAddin.idl into urd (UNO reflection data) file QuantLibAddin.urd. The urd file comprises binary descriptions of the types in the Addin. ! \li \b regmerge - Run OOo utility \b regmerge to merge the urd file into rdb (registry database) file QuantLibAddin.rdb. The rdb is used by OOo at runtime to infer the functionality available in the Addin. \li \b cppumaker - Run OOo utility \b cppumaker to generate the source code corresponding to the definitions in the rdb. ! \li \b compile - Compile the Addin, including the source generated above, plus the function implementation source code supplied for the Addin. The Addin is compiled into a shared library, i.e. \b QuantLibAddin.dll (Windows) or <b>libQuantLibAddinCalc-0.3.13.so</b> (Linux). \li \b install - Copy the Addin's shared library and registry database to the OOo program directory. --- 69,76 ---- Below are the steps required to compile and install an Addin for OpenOffice.org Calc (Windows and Linux). These steps have been incorporated into the %QuantLibAddin Calc makefiles for all compilers/platforms. ! \li \b idlc - Run OOo utility \b idlc to compile the idl (interface definition language) file QuantLibAddinCalc.idl into urd (UNO reflection data) file QuantLibAddinCalc.urd. The urd file comprises binary descriptions of the types in the Addin. ! \li \b regmerge - Run OOo utility \b regmerge to merge the urd file into rdb (registry database) file QuantLibAddinCalc.rdb. The rdb is used by OOo at runtime to infer the functionality available in the Addin. \li \b cppumaker - Run OOo utility \b cppumaker to generate the source code corresponding to the definitions in the rdb. ! \li \b compile - Compile the Addin, including the source generated above, plus the function implementation source code supplied for the Addin. The Addin is compiled into a shared library, i.e. \b QuantLibAddinCalc-vc71-mt-gd-0_3_13.dll (Windows) or <b>libQuantLibAddinCalc-0.3.13.so</b> (Linux). \li \b install - Copy the Addin's shared library and registry database to the OOo program directory. *************** *** 78,90 **** <tt> [Bootstrap]<br> ! UNO_SHARED_PACKAGES=${$SYSBINDIR/bootstraprc:BaseInstallation}/share/uno_packages<br> UNO_SHARED_PACKAGES_CACHE=$UNO_SHARED_PACKAGES/cache<br> ! UNO_USER_PACKAGES=${$SYSBINDIR/bootstraprc:UserInstallation}/user/uno_packages<br> UNO_USER_PACKAGES_CACHE=$UNO_USER_PACKAGES/cache<br> ! UNO_TYPES=$SYSBINDIR/types.rdb ?$UNO_SHARED_PACKAGES_CACHE/types.rdb<br> ! ?$UNO_USER_PACKAGES_CACHE/types.rdb <b>$SYSBINDIR/QuantLibAddin.rdb</b><br> ! UNO_SERVICES=?$UNO_USER_PACKAGES_CACHE/services.rdb<br> ! ?$UNO_SHARED_PACKAGES_CACHE/services.rdb<br> ! $SYSBINDIR/services.rdb <b>$SYSBINDIR/QuantLibAddin.rdb</b> </tt> --- 83,100 ---- <tt> [Bootstrap]<br> ! UNO_SHARED_PACKAGES=${$ORIGIN/bootstrap.ini:BaseInstallation}/share/uno_packages<br> UNO_SHARED_PACKAGES_CACHE=$UNO_SHARED_PACKAGES/cache<br> ! UNO_USER_PACKAGES=${$ORIGIN/bootstrap.ini:UserInstallation}/user/uno_packages<br> UNO_USER_PACKAGES_CACHE=$UNO_USER_PACKAGES/cache<br> ! PKG_SharedUnoFile=$UNO_SHARED_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.<br> ! component.PackageRegistryBackend/unorc<br> ! PKG_UserUnoFile=$UNO_USER_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.<br> ! component.PackageRegistryBackend/unorc<br> ! UNO_TYPES=$ORIGIN/types.rdb ${\$PKG_SharedUnoFile:UNO_TYPES} ${\$PKG_UserUnoFile:UNO_TYPES}<br> ! <b>$ORIGIN/QuantLibAddinCalc-vc71-mt-gd-0_3_12.rdb</b><br> ! UNO_SERVICES=${\$PKG_UserUnoFile:UNO_SERVICES} ${\$PKG_SharedUnoFile:UNO_SERVICES}<br> ! $ORIGIN/services.rdb <b>$ORIGIN/QuantLibAddinCalc-vc71-mt-gd-0_3_12.rdb</b><br> ! UNO_JAVA_COMPONENT_PATH=$ORIGIN/classes<br> ! URE_INTERNAL_JAVA_DIR=$ORIGIN/classes<br> </tt> *************** *** 97,103 **** It's recommended that Calc Addins be compiled using the same version of gcc that was used to compile OOo itself. See the notes at the end of this document for additional background to this requirement. ! For standard binary distributions, the current version of OOo, 1.1, is compiled by the vendor with gcc 3.2.2. (The upcoming OOo 2.0 is compiled with gcc 3.4.1.) ! In all likelihood gcc 3.2.2 is not shipped with your distribution and you'll need to install it alongside your existing version of gcc. You're advised to recompile and install gcc 3.2.2 from source as binary installations of gcc 3.2.2 (e.g. rpms) are unlikely to be recognized by your distribution. The gcc 3.2.2 source tarball can be acquired from one of the <a href="http://gcc.gnu.org/mirrors.html">gcc mirror sites.</a> Please see the following document describing the procedure for maintaining multiple versions of gcc concurrently: <a href="http://www.tellurian.com.au/document.php?document=multiplegcc.html&titleprefix=White+Papers">Installing and Using Multiple Versions of GCC</a> --- 107,113 ---- It's recommended that Calc Addins be compiled using the same version of gcc that was used to compile OOo itself. See the notes at the end of this document for additional background to this requirement. ! For standard binary distributions, the current version of OOo, 2.0, is compiled by the vendor with gcc 3.4.1. A complete listing of the OOo compiler versions by environment is maintained <a href="http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers">here</a>. ! In all likelihood gcc 3.4.1 is not shipped with your distribution and you'll need to install it alongside your existing version of gcc. You're advised to recompile and install gcc 3.4.1 from source as binary installations of gcc 3.4.1 (e.g. rpms) are unlikely to be recognized by your distribution. The gcc 3.4.1 source tarball can be acquired from one of the <a href="http://gcc.gnu.org/mirrors.html">gcc mirror sites.</a> Please see the following document describing the procedure for maintaining multiple versions of gcc concurrently: <a href="http://www.tellurian.com.au/document.php?document=multiplegcc.html&titleprefix=White+Papers">Installing and Using Multiple Versions of GCC</a> *************** *** 113,117 **** \subsection calc_linux_build Building QuantLibAddin for OOo Calc on Linux ! All of the binaries to be linked into the QuantLib Calc Addin must be compiled with gcc 3.2.2: \li \b QuantLib --- 123,127 ---- \subsection calc_linux_build Building QuantLibAddin for OOo Calc on Linux ! All of the binaries to be linked into the QuantLib Calc Addin must be compiled with gcc 3.4.1: \li \b QuantLib *************** *** 124,130 **** \verbatim ./configure \ ! CC=/usr/local/gcc/3.2.2/bin/gcc \ ! CXX=/usr/local/gcc/3.2.2/bin/g++ \ ! CPP=/usr/local/gcc/3.2.2/bin/cpp \endverbatim --- 134,140 ---- \verbatim ./configure \ ! CC=/usr/local/gcc/3.4.1/bin/gcc \ ! CXX=/usr/local/gcc/3.4.1/bin/g++ \ ! CPP=/usr/local/gcc/3.4.1/bin/cpp \endverbatim *************** *** 137,141 **** At startup OOo loads the %QuantLibAddin library, which in turn has a runtime dependency on the shared libraries for QuantLib and ObjectHandler. ! The %QuantLibAddin Calc binary is always installed to the OOo program directory /usr/lib/ooo-1.1/program. QuantLib and ObjectHandler are by default installed to /usr/local/lib, though you may choose to override this when configuring these applications. You need to configure your system to tell your program loader the location of all relevant shared libraries. One way to accomplish this is to add the relevant paths to the file /etc/ld.so.conf, which tells the loader where to search for shared libraries. After editing this file please remember to run \c ldconfig (as root, no arguments) to refresh the linker cache. --- 147,151 ---- At startup OOo loads the %QuantLibAddin library, which in turn has a runtime dependency on the shared libraries for QuantLib and ObjectHandler. ! The %QuantLibAddin Calc binary is always installed to the OOo program directory /usr/lib/openoffice.org2.0/program. QuantLib and ObjectHandler are by default installed to /usr/local/lib, though you may choose to override this when configuring these applications. You need to configure your system to tell your program loader the location of all relevant shared libraries. One way to accomplish this is to add the relevant paths to the file /etc/ld.so.conf, which tells the loader where to search for shared libraries. After editing this file please remember to run \c ldconfig (as root, no arguments) to refresh the linker cache. *************** *** 147,154 **** Additional detail relating to OOo Addins on Linux: ! \li <b>OOo 1.1</b> is always compiled with gcc 3.2.2. OOo ships with its own versions of certain C/C++ runtime libraries, these are installed to the OOo program directory and OOo loads these in preference to those installed on your system. If your Calc Addin loads an incompatible runtime environment then OOo is likely to crash or malfunction. \li <b>Additional detail</b> is available at the following link on the OOo website: <a href="http://udk.openoffice.org/common/man/draft/gccincompatibility.html">Coping with GCC Incompatibilities</a> ! \li <b>In theory</b> it should be possible to compile a Calc Addin with any version of gcc which is ABI-compatible with gcc 3.2.2, but in practice any nontrivial Addin compiled with anything other than gcc 3.2.2 seems to crash OOo. */ --- 157,164 ---- Additional detail relating to OOo Addins on Linux: ! \li <b>OOo 2.0</b> is always compiled with gcc 3.4.1. OOo ships with its own versions of certain C/C++ runtime libraries, these are installed to the OOo program directory and OOo loads these in preference to those installed on your system. If your Calc Addin loads an incompatible runtime environment then OOo is likely to crash or malfunction. \li <b>Additional detail</b> is available at the following link on the OOo website: <a href="http://udk.openoffice.org/common/man/draft/gccincompatibility.html">Coping with GCC Incompatibilities</a> ! \li <b>In theory</b> it should be possible to compile a Calc Addin with any version of gcc which is ABI-compatible with gcc 3.4.1, but in practice any nontrivial Addin compiled with anything other than gcc 3.4.1 seems to crash OOo. */ |