Compiling quantlib on Solaris X86 using Workshop

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

Compiling quantlib on Solaris X86 using Workshop

Paul.Raedle

Hello!

We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C 5.11 SunOS_i386 2010/08/13) for 64bit.
We used the latest boost  (1.53.0).
Our configure was not special:
./configure --with-boost-include=../boost_1_53_0 --with-boost-lib=../boost_1_53_0/libs

However we used:
CXXFLAGS=-library=stlport4 -m64

We managed to compile the lib, but had to do some changes:
a) includes
We had to include "math.h and stdlib.h" to cpicoupon.cpp

We had to include math.h to:
riskyassetswapoption.cpp
blackdeltacalculator.cpp
cpicapfloorengines.cpp
zigguratrng.cpp
analyticvariancegammaengine.cpp
fftvanillaengine.cpp
fftvariancegammaengine.cpp
cpiswap.cpp
cpibond.cpp
analyticgjrgarchengine.cpp
seasonality.hpp

b) Unresolved external
We had a problem with the linker for
const long *const PrimitivePolynomials[N_MAX_DEGREE];

 coming from "primitivepolynonimals.h" / "primitivepolynominals.c"

Somehow the linker didn't linke the function to the sobolrsg.cpp
Couldn't find out why, but the nm-command showed the symbol twice: once defined and once undefined.

After changing the file to .hpp and .cpp all worked fine.

We addidionaly compiled the Swig for java, because we'll call from java to calc theo option prices.
For java we additionaly had to include -Kpic for the linker.

I wanted to let you know of the these problems.
Maybe there is a better way or maybe the ql can be adepted? I think the changes don't harm for other compilers?

(By the way: we didn't have any problems on Windows)

And thanx for the great work. We're using the lib only in a sample up to now, but that might change in the future...

Best regards,
Paul Rädle




-------------------------------------------------------------------------
Deutsche Börse AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Dr. Joachim Faber
Executive Board/Vorstand:
Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
Andreas Preuss (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gregor Pottmeyer,
Hauke Stars, Jeffrey Tessler.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister: HRB 32232
Local court/Amtsgericht Frankfurt am Main.

-----------------------------------------
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling quantlib on Solaris X86 using Workshop

Luigi Ballabio
Hello Paul,
    thanks for the report.  As for (a), would <cmath> and <cstdlib>
work as well instead of math.h and stdlib.h? May you try it if you
didn't already?

(b) is strange. It looks like your compiler requires
primitivepolynomials.c to be compiled as C++ instead of plain C, but I
have no idea why...

Luigi


On Fri, May 24, 2013 at 3:18 PM,  <[hidden email]> wrote:

>
> Hello!
>
> We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C
> 5.11 SunOS_i386 2010/08/13) for 64bit.
> We used the latest boost  (1.53.0).
> Our configure was not special:
> ./configure --with-boost-include=../boost_1_53_0
> --with-boost-lib=../boost_1_53_0/libs
>
> However we used:
> CXXFLAGS=-library=stlport4 -m64
>
> We managed to compile the lib, but had to do some changes:
> a) includes
> We had to include "math.h and stdlib.h" to cpicoupon.cpp
>
> We had to include math.h to:
> riskyassetswapoption.cpp
> blackdeltacalculator.cpp
> cpicapfloorengines.cpp
> zigguratrng.cpp
> analyticvariancegammaengine.cpp
> fftvanillaengine.cpp
> fftvariancegammaengine.cpp
> cpiswap.cpp
> cpibond.cpp
> analyticgjrgarchengine.cpp
> seasonality.hpp
>
> b) Unresolved external
> We had a problem with the linker for
> const long *const PrimitivePolynomials[N_MAX_DEGREE];
>
>  coming from "primitivepolynonimals.h" / "primitivepolynominals.c"
>
> Somehow the linker didn't linke the function to the sobolrsg.cpp
> Couldn't find out why, but the nm-command showed the symbol twice: once
> defined and once undefined.
>
> After changing the file to .hpp and .cpp all worked fine.
>
> We addidionaly compiled the Swig for java, because we'll call from java to
> calc theo option prices.
> For java we additionaly had to include -Kpic for the linker.
>
> I wanted to let you know of the these problems.
> Maybe there is a better way or maybe the ql can be adepted? I think the
> changes don't harm for other compilers?
>
> (By the way: we didn't have any problems on Windows)
>
> And thanx for the great work. We're using the lib only in a sample up to
> now, but that might change in the future...
>
> Best regards,
> Paul Rädle
>
>
>
>
> -------------------------------------------------------------------------
> Deutsche Börse AG
> Chairman of the Supervisory Board/
> Vorsitzender des Aufsichtsrats:
> Dr. Joachim Faber
> Executive Board/Vorstand:
> Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
> Andreas Preuss (Deputy Chief Executive Officer/
> stellv. Vorsitzender), Gregor Pottmeyer,
> Hauke Stars, Jeffrey Tessler.
> Aktiengesellschaft with registered seat in/mit Sitz in
> Frankfurt am Main.
> Commercial register/Handelsregister: HRB 32232
> Local court/Amtsgericht Frankfurt am Main.
>
> -----------------------------------------
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
> Legally required information for business correspondence/
> Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
> http://deutsche-boerse.com/letterhead
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling quantlib on Solaris X86 using Workshop

Michael Sharpe
Hi all,
 
The PrimitivePolynomial array is declared as "extern" only when the code is compiled as C++, which seems like it would cause problems in files compiled as straight C.
 
I think this was fixed a couple months ago making sure that Visual Studio 2012 compiles better with level 4 warnings enabled so it should be part of the next release. The change I made was to move the extern keyword out of the #ifdef __cplusplus block before the variable declaration to the line directly above the #ifdef.
 
Unfortunately, I don't have access to the problem configuration so I can't be sure, but it should be simple to check to see if that solves the problem.
 
Mike


On Mon, Jun 3, 2013 at 7:50 AM, Luigi Ballabio <[hidden email]> wrote:
Hello Paul,
    thanks for the report.  As for (a), would <cmath> and <cstdlib>
work as well instead of math.h and stdlib.h? May you try it if you
didn't already?

(b) is strange. It looks like your compiler requires
primitivepolynomials.c to be compiled as C++ instead of plain C, but I
have no idea why...

Luigi


On Fri, May 24, 2013 at 3:18 PM,  <[hidden email]> wrote:
>
> Hello!
>
> We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C
> 5.11 SunOS_i386 2010/08/13) for 64bit.
> We used the latest boost  (1.53.0).
> Our configure was not special:
> ./configure --with-boost-include=../boost_1_53_0
> --with-boost-lib=../boost_1_53_0/libs
>
> However we used:
> CXXFLAGS=-library=stlport4 -m64
>
> We managed to compile the lib, but had to do some changes:
> a) includes
> We had to include "math.h and stdlib.h" to cpicoupon.cpp
>
> We had to include math.h to:
> riskyassetswapoption.cpp
> blackdeltacalculator.cpp
> cpicapfloorengines.cpp
> zigguratrng.cpp
> analyticvariancegammaengine.cpp
> fftvanillaengine.cpp
> fftvariancegammaengine.cpp
> cpiswap.cpp
> cpibond.cpp
> analyticgjrgarchengine.cpp
> seasonality.hpp
>
> b) Unresolved external
> We had a problem with the linker for
> const long *const PrimitivePolynomials[N_MAX_DEGREE];
>
>  coming from "primitivepolynonimals.h" / "primitivepolynominals.c"
>
> Somehow the linker didn't linke the function to the sobolrsg.cpp
> Couldn't find out why, but the nm-command showed the symbol twice: once
> defined and once undefined.
>
> After changing the file to .hpp and .cpp all worked fine.
>
> We addidionaly compiled the Swig for java, because we'll call from java to
> calc theo option prices.
> For java we additionaly had to include -Kpic for the linker.
>
> I wanted to let you know of the these problems.
> Maybe there is a better way or maybe the ql can be adepted? I think the
> changes don't harm for other compilers?
>
> (By the way: we didn't have any problems on Windows)
>
> And thanx for the great work. We're using the lib only in a sample up to
> now, but that might change in the future...
>
> Best regards,
> Paul Rädle
>
>
>
>
> -------------------------------------------------------------------------
> Deutsche Börse AG
> Chairman of the Supervisory Board/
> Vorsitzender des Aufsichtsrats:
> Dr. Joachim Faber
> Executive Board/Vorstand:
> Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
> Andreas Preuss (Deputy Chief Executive Officer/
> stellv. Vorsitzender), Gregor Pottmeyer,
> Hauke Stars, Jeffrey Tessler.
> Aktiengesellschaft with registered seat in/mit Sitz in
> Frankfurt am Main.
> Commercial register/Handelsregister: HRB 32232
> Local court/Amtsgericht Frankfurt am Main.
>
> -----------------------------------------
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
> Legally required information for business correspondence/
> Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
> http://deutsche-boerse.com/letterhead
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling quantlib on Solaris X86 using Workshop

Luigi Ballabio
In reply to this post by Paul.Raedle
Hi Paul,
    after a couple of recent changes, <cmath> should be included by
all files. Do you still need to include math.h if you check out and
compile the latest version of the library on GitHub? And does Mark's
fix (which is also included) prevent the linking error?

Thanks,
    Luigi



On Fri, May 24, 2013 at 3:18 PM,  <[hidden email]> wrote:

>
> Hello!
>
> We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C
> 5.11 SunOS_i386 2010/08/13) for 64bit.
> We used the latest boost  (1.53.0).
> Our configure was not special:
> ./configure --with-boost-include=../boost_1_53_0
> --with-boost-lib=../boost_1_53_0/libs
>
> However we used:
> CXXFLAGS=-library=stlport4 -m64
>
> We managed to compile the lib, but had to do some changes:
> a) includes
> We had to include "math.h and stdlib.h" to cpicoupon.cpp
>
> We had to include math.h to:
> riskyassetswapoption.cpp
> blackdeltacalculator.cpp
> cpicapfloorengines.cpp
> zigguratrng.cpp
> analyticvariancegammaengine.cpp
> fftvanillaengine.cpp
> fftvariancegammaengine.cpp
> cpiswap.cpp
> cpibond.cpp
> analyticgjrgarchengine.cpp
> seasonality.hpp
>
> b) Unresolved external
> We had a problem with the linker for
> const long *const PrimitivePolynomials[N_MAX_DEGREE];
>
>  coming from "primitivepolynonimals.h" / "primitivepolynominals.c"
>
> Somehow the linker didn't linke the function to the sobolrsg.cpp
> Couldn't find out why, but the nm-command showed the symbol twice: once
> defined and once undefined.
>
> After changing the file to .hpp and .cpp all worked fine.
>
> We addidionaly compiled the Swig for java, because we'll call from java to
> calc theo option prices.
> For java we additionaly had to include -Kpic for the linker.
>
> I wanted to let you know of the these problems.
> Maybe there is a better way or maybe the ql can be adepted? I think the
> changes don't harm for other compilers?
>
> (By the way: we didn't have any problems on Windows)
>
> And thanx for the great work. We're using the lib only in a sample up to
> now, but that might change in the future...
>
> Best regards,
> Paul Rädle
>
>
>
>
> -------------------------------------------------------------------------
> Deutsche Börse AG
> Chairman of the Supervisory Board/
> Vorsitzender des Aufsichtsrats:
> Dr. Joachim Faber
> Executive Board/Vorstand:
> Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
> Andreas Preuss (Deputy Chief Executive Officer/
> stellv. Vorsitzender), Gregor Pottmeyer,
> Hauke Stars, Jeffrey Tessler.
> Aktiengesellschaft with registered seat in/mit Sitz in
> Frankfurt am Main.
> Commercial register/Handelsregister: HRB 32232
> Local court/Amtsgericht Frankfurt am Main.
>
> -----------------------------------------
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
> Legally required information for business correspondence/
> Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
> http://deutsche-boerse.com/letterhead
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling quantlib on Solaris X86 using Workshop

Paul.Raedle

Hm.
I just did the following:
* Get the .zip from github for the master repository.
* Configured & tried to compile that

After a while I get:
<snip>
/bin/bash ../../libtool --tag=CXX    --mode=compile CC -DHAVE_CONFIG_H -I. -I../../ql   -I../.. -I../.. -I/home/raedpau/quantlib/boost_1_53_0  -library=stlport4 -m64 -c -o cpicoupon.lo cpicoupon.cpp
libtool: compile:  CC -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. -I/home/raedpau/quantlib/boost_1_53_0 -library=stlport4 -m64 -c cpicoupon.cpp  -KPIC -DPIC -o .libs/cpicoupon.o
"../../ql/cashflows/cpicoupon.hpp", line 141: Error: The function "fabs" must have a prototype.
"cpicoupon.cpp", line 55: Error: The function "fabs" must have a prototype.
"cpicoupon.cpp", line 108: Error: The function "exit" must have a prototype.
"cpicoupon.cpp", line 109: Warning: "QuantLib::CPICashFlow::baseDate() const" is expected to return a value.
3 Error(s) and 1 Warning(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `cpicoupon.lo'
Current working directory /home/raedpau/quantlib/quantlib-master/quantlib-master/QuantLib/ql/cashflows
*** Error code 1
<snip>

This looks like the prob I had before?


Best regards,
Paul Rädle


Luigi Ballabio <[hidden email]>

13/06/2013 12:09

To
[hidden email]
cc
"[hidden email]" <[hidden email]>, [hidden email]
Subject
Re: [Quantlib-dev] Compiling quantlib on Solaris X86 using Workshop





Hi Paul,
   after a couple of recent changes, <cmath> should be included by
all files. Do you still need to include math.h if you check out and
compile the latest version of the library on GitHub? And does Mark's
fix (which is also included) prevent the linking error?

Thanks,
   Luigi



On Fri, May 24, 2013 at 3:18 PM,  <[hidden email]> wrote:
>
> Hello!
>
> We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C
> 5.11 SunOS_i386 2010/08/13) for 64bit.
> We used the latest boost  (1.53.0).
> Our configure was not special:
> ./configure --with-boost-include=../boost_1_53_0
> --with-boost-lib=../boost_1_53_0/libs
>
> However we used:
> CXXFLAGS=-library=stlport4 -m64
>
> We managed to compile the lib, but had to do some changes:
> a) includes
> We had to include "math.h and stdlib.h" to cpicoupon.cpp
>
> We had to include math.h to:
> riskyassetswapoption.cpp
> blackdeltacalculator.cpp
> cpicapfloorengines.cpp
> zigguratrng.cpp
> analyticvariancegammaengine.cpp
> fftvanillaengine.cpp
> fftvariancegammaengine.cpp
> cpiswap.cpp
> cpibond.cpp
> analyticgjrgarchengine.cpp
> seasonality.hpp
>
> b) Unresolved external
> We had a problem with the linker for
> const long *const PrimitivePolynomials[N_MAX_DEGREE];
>
>  coming from "primitivepolynonimals.h" / "primitivepolynominals.c"
>
> Somehow the linker didn't linke the function to the sobolrsg.cpp
> Couldn't find out why, but the nm-command showed the symbol twice: once
> defined and once undefined.
>
> After changing the file to .hpp and .cpp all worked fine.
>
> We addidionaly compiled the Swig for java, because we'll call from java to
> calc theo option prices.
> For java we additionaly had to include -Kpic for the linker.
>
> I wanted to let you know of the these problems.
> Maybe there is a better way or maybe the ql can be adepted? I think the
> changes don't harm for other compilers?
>
> (By the way: we didn't have any problems on Windows)
>
> And thanx for the great work. We're using the lib only in a sample up to
> now, but that might change in the future...
>
> Best regards,
> Paul Rädle
>
>
>
>
> -------------------------------------------------------------------------
> Deutsche Börse AG
> Chairman of the Supervisory Board/
> Vorsitzender des Aufsichtsrats:
> Dr. Joachim Faber
> Executive Board/Vorstand:
> Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
> Andreas Preuss (Deputy Chief Executive Officer/
> stellv. Vorsitzender), Gregor Pottmeyer,
> Hauke Stars, Jeffrey Tessler.
> Aktiengesellschaft with registered seat in/mit Sitz in
> Frankfurt am Main.
> Commercial register/Handelsregister: HRB 32232
> Local court/Amtsgericht Frankfurt am Main.
>
> -----------------------------------------
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
> Legally required information for business correspondence/
> Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
>
http://deutsche-boerse.com/letterhead
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt!
http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>




-------------------------------------------------------------------------
Deutsche Börse AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Dr. Joachim Faber
Executive Board/Vorstand:
Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
Andreas Preuss (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gregor Pottmeyer,
Hauke Stars, Jeffrey Tessler.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister: HRB 32232
Local court/Amtsgericht Frankfurt am Main.

-----------------------------------------
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling quantlib on Solaris X86 using Workshop

Luigi Ballabio
Yes.  But instead of including the headers, please try editing the file as follows:

- at line 55, use std::fabs instead of fabs;
- at line 108, replace exit(-1) with QL_FAIL("no base date available");

and see if it works.  If is does, please send me the other places where the compilation fail.

Thanks,
    Luigi





On Thu, Jun 13, 2013 at 6:02 PM, <[hidden email]> wrote:

Hm.
I just did the following:
* Get the .zip from github for the master repository.
* Configured & tried to compile that

After a while I get:
<snip>
/bin/bash ../../libtool --tag=CXX    --mode=compile CC -DHAVE_CONFIG_H -I. -I../../ql   -I../.. -I../.. -I/home/raedpau/quantlib/boost_1_53_0  -library=stlport4 -m64 -c -o cpicoupon.lo cpicoupon.cpp
libtool: compile:  CC -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. -I/home/raedpau/quantlib/boost_1_53_0 -library=stlport4 -m64 -c cpicoupon.cpp  -KPIC -DPIC -o .libs/cpicoupon.o
"../../ql/cashflows/cpicoupon.hpp", line 141: Error: The function "fabs" must have a prototype.
"cpicoupon.cpp", line 55: Error: The function "fabs" must have a prototype.
"cpicoupon.cpp", line 108: Error: The function "exit" must have a prototype.
"cpicoupon.cpp", line 109: Warning: "QuantLib::CPICashFlow::baseDate() const" is expected to return a value.
3 Error(s) and 1 Warning(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `cpicoupon.lo'
Current working directory /home/raedpau/quantlib/quantlib-master/quantlib-master/QuantLib/ql/cashflows
*** Error code 1
<snip>

This looks like the prob I had before?


Best regards,
Paul Rädle


Luigi Ballabio <[hidden email]>

13/06/2013 12:09

To
[hidden email]
cc
"[hidden email]" <[hidden email]>, [hidden email]
Subject
Re: [Quantlib-dev] Compiling quantlib on Solaris X86 using Workshop





Hi Paul,
   after a couple of recent changes, <cmath> should be included by
all files. Do you still need to include math.h if you check out and
compile the latest version of the library on GitHub? And does Mark's
fix (which is also included) prevent the linking error?

Thanks,
   Luigi



On Fri, May 24, 2013 at 3:18 PM,  <[hidden email]> wrote:
>
> Hello!
>
> We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C
> 5.11 SunOS_i386 2010/08/13) for 64bit.
> We used the latest boost  (1.53.0).
> Our configure was not special:
> ./configure --with-boost-include=../boost_1_53_0
> --with-boost-lib=../boost_1_53_0/libs
>
> However we used:
> CXXFLAGS=-library=stlport4 -m64
>
> We managed to compile the lib, but had to do some changes:
> a) includes
> We had to include "math.h and stdlib.h" to cpicoupon.cpp
>
> We had to include math.h to:
> riskyassetswapoption.cpp
> blackdeltacalculator.cpp
> cpicapfloorengines.cpp
> zigguratrng.cpp
> analyticvariancegammaengine.cpp
> fftvanillaengine.cpp
> fftvariancegammaengine.cpp
> cpiswap.cpp
> cpibond.cpp
> analyticgjrgarchengine.cpp
> seasonality.hpp
>
> b) Unresolved external
> We had a problem with the linker for
> const long *const PrimitivePolynomials[N_MAX_DEGREE];
>
>  coming from "primitivepolynonimals.h" / "primitivepolynominals.c"
>
> Somehow the linker didn't linke the function to the sobolrsg.cpp
> Couldn't find out why, but the nm-command showed the symbol twice: once
> defined and once undefined.
>
> After changing the file to .hpp and .cpp all worked fine.
>
> We addidionaly compiled the Swig for java, because we'll call from java to
> calc theo option prices.
> For java we additionaly had to include -Kpic for the linker.
>
> I wanted to let you know of the these problems.
> Maybe there is a better way or maybe the ql can be adepted? I think the
> changes don't harm for other compilers?
>
> (By the way: we didn't have any problems on Windows)
>
> And thanx for the great work. We're using the lib only in a sample up to
> now, but that might change in the future...
>
> Best regards,
> Paul Rädle
>
>
>
>
> -------------------------------------------------------------------------
> Deutsche Börse AG
> Chairman of the Supervisory Board/
> Vorsitzender des Aufsichtsrats:
> Dr. Joachim Faber
> Executive Board/Vorstand:
> Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
> Andreas Preuss (Deputy Chief Executive Officer/
> stellv. Vorsitzender), Gregor Pottmeyer,
> Hauke Stars, Jeffrey Tessler.
> Aktiengesellschaft with registered seat in/mit Sitz in
> Frankfurt am Main.
> Commercial register/Handelsregister: HRB 32232
> Local court/Amtsgericht Frankfurt am Main.
>
> -----------------------------------------
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
> ist nicht gestattet.
>
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.
>
> Legally required information for business correspondence/
> Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
>
http://deutsche-boerse.com/letterhead
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt!
http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>




-------------------------------------------------------------------------
Deutsche Börse AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Dr. Joachim Faber
Executive Board/Vorstand:
Dr. Reto Francioni (Chief Executive Officer/Vorsitzender),
Andreas Preuss (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gregor Pottmeyer,
Hauke Stars, Jeffrey Tessler.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister: HRB 32232
Local court/Amtsgericht Frankfurt am Main.

-----------------------------------------
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev