Still problems compiling QuantLibAddIn under Linux

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Still problems compiling QuantLibAddIn under Linux

Penschke, Walter
Hi Eric, hi Luigi,

Sorry, to bother you again.
I am still struggling with the compilation of QuantLibAddIn under Linux.

Luigi, you mentioned that you added some "patches" to the current
development branch (Linux). So I today retrieved the modules QuantLib,
ObjectHandler and QuantLibAddin via anon-cvs and tried to compile and
link the modules again (in the above order).

As before there were no problems with QuantLib and ObjectHandler. When
trying to compile the QuantLibAddin module in the same way as described
previously (please see below), however, I encountered the following
errors:

--- SCHNIPP ---
[wpe@metallica QuantLibAddin]$ make
Making all in Autogen
make[1]: Entering directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/Autogen'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/Autogen'
Making all in qla
make[1]: Entering directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
make  all-am
make[2]: Entering directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
make[2]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
make[1]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
Making all in Addins/C
make[1]: Entering directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/Addins/C'
if /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I../../qla  -I../.. -I/home/wpe/projects/quantlib_cvs_devel/ObjectHandler
-I/home/wpe/projects/quantlib_cvs_devel/QuantLib/include/  -g -O2 -Wall -MT
options.lo -MD -MP -MF ".deps/options.Tpo" -c -o options.lo options.cpp; \
then mv -f ".deps/options.Tpo" ".deps/options.Plo"; else rm -f
".deps/options.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../qla -I../..
-I/home/wpe/projects/quantlib_cvs_devel/ObjectHandler
-I/home/wpe/projects/quantlib_cvs_devel/QuantLib/include/ -g -O2 -Wall -MT
options.lo -MD -MP -MF .deps/options.Tpo -c options.cpp  -fPIC -DPIC -o
.libs/options.o
options.cpp: In function `int QL_OPTION_ASIAN_D(char*, char*, char*, double,
   long int, long int, long int*, char*, char*, double, char*, long int,
long
   int, char*, long int, VariesList*)':
options.cpp:87: error: no matching function for call to `Conversion<long
int>::
   convertVector(long int*&, long int&)'
../../Addins/C/varies.hpp:28: error: candidates are: static
   std::vector<array_type, std::allocator<_CharT> >
   Conversion<T>::convertVector(const T*&, const long int&) [with T = long
int]
../../Addins/C/varies.hpp:35: error:                 static
   std::vector<std::string, std::allocator<std::string> >
   Conversion<T>::convertVector(char**&, const long int&) [with T = long
int]
options.cpp: In function `int QL_OPTION_CLIQUET(char*, char*, long int, long
   int*, char*, double, long int, char*, long int, VariesList*)':
options.cpp:212: error: no matching function for call to `Conversion<long
int>
   ::convertVector(long int*&, long int&)'
../../Addins/C/varies.hpp:28: error: candidates are: static
   std::vector<array_type, std::allocator<_CharT> >
   Conversion<T>::convertVector(const T*&, const long int&) [with T = long
int]
../../Addins/C/varies.hpp:35: error:                 static
   std::vector<std::string, std::allocator<std::string> >
   Conversion<T>::convertVector(char**&, const long int&) [with T = long
int]
options.cpp: In function `int QL_OPTION_DIVIDENDVANILLA(char*, char*, long
int,
   long int*, long int, double*, char*, char*, double, char*, long int, long
   int, char*, long int, VariesList*)':
options.cpp:251: error: no matching function for call to `Conversion<long
int>
   ::convertVector(long int*&, long int&)'
../../Addins/C/varies.hpp:28: error: candidates are: static
   std::vector<array_type, std::allocator<_CharT> >
   Conversion<T>::convertVector(const T*&, const long int&) [with T = long
int]
../../Addins/C/varies.hpp:35: error:                 static
   std::vector<std::string, std::allocator<std::string> >
   Conversion<T>::convertVector(char**&, const long int&) [with T = long
int]
options.cpp:253: error: no matching function for call to
`Conversion<double>::
   convertVector(double*&, long int&)'
../../Addins/C/varies.hpp:28: error: candidates are: static
   std::vector<array_type, std::allocator<_CharT> >
   Conversion<T>::convertVector(const T*&, const long int&) [with T =
double]
../../Addins/C/varies.hpp:35: error:                 static
   std::vector<std::string, std::allocator<std::string> >
   Conversion<T>::convertVector(char**&, const long int&) [with T = double]
make[1]: *** [options.lo] Error 1
make[1]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/Addins/C'
make: *** [all-recursive] Error 1
[wpe@metallica QuantLibAddin]$
--- SCHNAPP ---

Your help is (as always) highly appreciated,


wpe




-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of
[hidden email]
Sent: Saturday, February 19, 2005 5:33 AM
To: [hidden email]
Subject: Quantlib-dev digest, Vol 1 #285 - 5 msgs


Send Quantlib-dev mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/quantlib-dev
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Quantlib-dev digest..."


Today's Topics:

   1. [ quantlib-Bugs-1143732 ] VC6 Compliation Error (SourceForge.net)
   2. ObjectHandler and QuantLibAddin (Penschke, Walter)
   3. Re: ObjectHandler and QuantLibAddin (eric ehlers)
   4. ObjectHandler and QuantLibAddin II (Penschke, Walter)
   5. Re: ObjectHandler and QuantLibAddin (Luigi Ballabio)


Message: 2
From: "Penschke, Walter" <[hidden email]>
To: "'[hidden email]'"
<[hidden email]>
Date: Fri, 18 Feb 2005 14:55:31 +0100
Subject: [Quantlib-dev] ObjectHandler and QuantLibAddin

Hi Eric,

sorry that I could not respong to you earlier.

Before I get come to your response to my initial email I'd like to address
that I have problems getting
QuantLibAddIn compiled from the actual development backup tar-ball. With QL
and ObjectHandler
everything went fine. Here is what I did (Linux as OS):

- Downloaded the development tar ball and extracted it locally.

- Set CVSROOT to the just extracted local CVS repository and checked out the

modules QuantLib, ObjectHandler and QuantLibAddin.

- Compiled QuantLib and ObjectHandler successfully like that:
$ ./autogen.sh
$ ./configure --prefix=`pwd`
$ make
$ make install

- Tried to compile QuantLibAddin like that:
$ ./autogen.sh
$ ./configure --prefix=`pwd` CPPFLAGS="-I<PATH_TO_OBJECTHANDLER>
-I<PATH_TO_QUANTLIB>/include" LDFLAGS="-L<PATH_TO_OBJECTHANDLER>/lib
-L<PATH_TO_QUANTLIB>/lib"
$ make

This make command seems to compile and link the directory
QuantLibAddin/qla/objects successfully
but runs into problems with the directory QuantLibAddin/qla/functions. Here
is the end of the generated output:

--- SCHNIPP ---
g++ -DHAVE_CONFIG_H -I. -I. -I../../qla -I../..
-I/home/wpe/projects/quantlib_cvs_devel/ObjectHandler/
-I/home/wpe/projects/quantlib_cvs_devel/QuantLib/include -g -O2 -Wall -MT
vanillaoption.lo -MD -MP -MF .deps/vanillaoption.Tpo -c vanillaoption.cpp -o
vanillaoption.o >/dev/null 2>&1
/bin/sh ../../libtool --mode=link g++  -g -O2 -Wall
-L/home/wpe/projects/quantlib_cvs_devel/ObjectHandler/lib
-L/home/wpe/projects/quantlib_cvs_devel/QuantLib/lib -o libObjects.la
asianoption.lo barrieroption.lo basketoption.lo cliquetoption.lo
dividendvanillaoption.lo forwardvanillaoption.lo optionutils.lo
stochasticprocess.lo vanillaoption.lo
ar cru .libs/libObjects.a .libs/asianoption.o .libs/barrieroption.o
.libs/basketoption.o .libs/cliquetoption.o .libs/dividendvanillaoption.o
.libs/forwardvanillaoption.o .libs/optionutils.o .libs/stochasticprocess.o
.libs/vanillaoption.o
ranlib .libs/libObjects.a
creating libObjects.la
(cd .libs && rm -f libObjects.la && ln -s ../libObjects.la libObjects.la)
make[3]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla/objects'
Making all in functions
make[3]: Entering directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla/functions'
make[3]: *** No rule to make target `options.cpp', needed by `options.lo'.
Stop.
make[3]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla/functions'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/opt/projects/quantlib_cvs_devel/QuantLibAddin/qla'
make: *** [all-recursive] Error 1
[wpe@metallica QuantLibAddin]$
--- SCHNAPP ---

Having a look in the corresponding QuantLibAddin/qla/functions/Makefile it
seems that it expects a source file options.cpp. However in the
corresponding directory there is no such file.

Any help would be highly appreciated. Thanks in advance.


wpe


--__--__--

Message: 3
Date: Fri, 18 Feb 2005 14:32:25 +0000
From: eric ehlers <[hidden email]>
Reply-To: eric ehlers <[hidden email]>
To: [hidden email]
Subject: Re: [Quantlib-dev] ObjectHandler and QuantLibAddin

Hi Walter

> Having a look in the corresponding QuantLibAddin/qla/functions/Makefile it
> seems that it expects a source file options.cpp. However in the
> corresponding directory there is no such file.

Much of the QuantLibAddin source code is autogenerated, you need to cd
to the Autogen directory and run autogen.py.  Sorry for not mentioning
that anywhere!, I'll add it to the readme file.

Some other notes on recompiling ...
- compiling the Calc Linux addin requires some extra steps which I
haven't gotten around to documenting.  If you need that please let me
know.  The Calc addin on Windows should compile as documented.
- On Windows I use MSDEV6 and those project workspace files are always
up to date.  I try to propogate changes to the other IDEs with
grep/sed but they may be broken.

Very much looking forward to your feedback.

Regards
Eric




--__--__--

Message: 5
Date: Fri, 18 Feb 2005 16:09:07 +0000
From: Luigi Ballabio <[hidden email]>
Subject: Re: [Quantlib-dev] ObjectHandler and QuantLibAddin
To: eric ehlers <[hidden email]>
Cc: [hidden email]


On 02/18/05 15:32:25, eric ehlers wrote:
> Much of the QuantLibAddin source code is autogenerated, you need to cd
> to the Autogen directory and run autogen.py.  Sorry for not mentioning
> that anywhere!, I'll add it to the readme file.

I just committed a couple of small patches---under Linux, 'make' will now
=20
invoke autogen.py before building the addins.

> Some other notes on recompiling ...
> - compiling the Calc Linux addin requires some extra steps which I
> haven't gotten around to documenting.  If you need that please let me
> know.

Or if you don't have Calc installed, use
./configure --disable-calc
to inhibit Calc-specific compilations.

Later,
        Luigi

----------------------------------------

Every solution breeds new problems.
-- unknown





--__--__--

_______________________________________________
Quantlib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev


End of Quantlib-dev Digest


Reply | Threaded
Open this post in threaded view
|

Re: Still problems compiling QuantLibAddIn under Linux

eric ehlers
Hi Walter

> Sorry, to bother you again.
> I am still struggling with the compilation of QuantLibAddIn under Linux.

No bother - the problem is due to an error on my part so apologies to
you for the hassle.  It's fixed now so if you refresh QuantLibAddin
from CVS and try again it should be OK.

Many Thanks
Eric