Login  Register

Re: problems making QuantLib v 1.1 in cygwin (on Windows 7)

Posted by YuHong-4 on Sep 08, 2011; 3:03pm
URL: http://quantlib.414.s1.nabble.com/problems-making-QuantLib-v-1-1-in-cygwin-on-Windows-7-tp6263p6276.html


The theoretical side of QuantLib is still difficult for me, and I lost
previous files in that old broken laptop, so am slowly re-creating things on
the new workstation.

If yours is a desktop, maybe add a hard-disk or two, and install a Linux on
the new hard-disk(s)?

Another question is,
It would be interesting to know the resulted application performance
comparisons from difference compilers with the same group of code files on
windows.  I myself haven't much experience of that.

Regards,

Hong Yu


-----Original Message-----
From: Ted Byers
Sent: Thursday, September 08, 2011 7:51 AM
To: 'YuHong' ; [hidden email]
Cc: [hidden email]
Subject: RE: [Quantlib-users] problems making QuantLib v 1.1 in cygwin (on
Windows 7)

Hi YuHong,

Why not?  ;-)

Actually, I have several compilers (two versions of MSVC++, along with gcc
on cygwin).  I like to pass my code through different compilers to ensure my
code is as portable and robust as possible.  Different compilers have
different strengths and weaknesses WRT ANSI compliance, to I pick up
potential issues with one that the others may have missed.  This makes for
better quality code.  While I am new to working on risk assessment using
QuantLib, I have been developing code for decades, mostly in C++, to assess
risk in other fields (such as environmental risk associated with
agriculture, mining, pulp and paper, and the nuclear industries).

There is another reason also.  I try to keep up my skills programming in a
unix-like environment, and I don't have a unix box.  Cygwin is the nest best
thing (as I don't have the space to get and set up another computer to run a
real distribution of Unix (such as some Linux or BSD distribution).

Cheers

Ted

> -----Original Message-----
> From: YuHong [mailto:[hidden email]]
> Sent: September-08-11 11:24 PM
> To: [hidden email]; Ted Byers
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] problems making QuantLib v 1.1 in cygwin (on
> Windows 7)
>
>
> Hello,
>
> I am curious to know why to compile QuantLib in cygwin on Windows?
> Thanks.
>
> Regards,
>
> Hong Yu
>
>
>
> -----Original Message-----
> From: Luigi Ballabio
> Sent: Thursday, September 08, 2011 5:20 AM
> To: Ted Byers
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] problems making QuantLib v 1.1 in cygwin (on
> Windows 7)
>
>
> Ted,
> did 'configure' actually find the library?  I remember an error in the
code
> check that could give a false positive.  Try looking for 'boost'
> inside config.log and you should find a more verbose output from the
tests.

>
> Later,
> Luigi
>
>
> On Mon, 2011-08-29 at 16:44 -0400, Ted Byers wrote:
> > I have boost 1.47.0 built and installed.
> >
> >
> >
> > Here is the last few lines of output from make:
> >
> >
> >
> > /bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2
> > -lboost_unit_test_framework-mt  -o quantlib-test-suite.exe
> > quantlibtestsuite.o americanoption.o array.o asianoptions.o
> > assetswap.o autocovariances.o barrieroption.o basketoption.o
> > batesmodel.o bermudanswaption.o blackdeltacalculator.o bonds.o
> > brownianbridge.o calendars.o capfloor.o capflooredcoupon.o cashflows.o
> > cdo.o cdsoption.o chooseroption.o cliquetoption.o cms.o
> > commodityunitofmeasure.o compoundoption.o convertiblebonds.o
> > covariance.o creditdefaultswap.o curvestates.o dates.o daycounters.o
> > defaultprobabilitycurves.o digitalcoupon.o digitaloption.o
> > distributions.o dividendoption.o europeanoption.o everestoption.o
> > exchangerate.o extendedtrees.o factorial.o fastfouriertransform.o
> > fdheston.o fdmlinearop.o forwardoption.o gaussianquadratures.o
> > gjrgarchmodel.o hestonmodel.o himalayaoption.o
> > hybridhestonhullwhiteprocess.o inflation.o inflationcapfloor.o
> > inflationcapflooredcoupon.o inflationvolatility.o instruments.o
> > integrals.o interestrates.o interpolations.o jumpdiffusion.o
> > libormarketmodel.o libormarketmodelprocess.o
> > linearleastsquaresregression.o lookbackoptions.o
> > lowdiscrepancysequences.o margrabeoption.o marketmodel.o
> > marketmodel_cms.o marketmodel_smm.o
> > marketmodel_smmcapletalphacalibration.o
> > marketmodel_smmcapletcalibration.o
> > marketmodel_smmcaplethomocalibration.o matrices.o
> > mclongstaffschwartzengine.o mersennetwister.o money.o nthtodefault.o
> > operators.o optimizers.o optionletstripper.o overnightindexedswap.o
> > pagodaoption.o pathgenerator.o period.o piecewiseyieldcurve.o
> > quantooption.o quotes.o rangeaccrual.o riskstats.o rngtraits.o
> > rounding.o sampledcurve.o shortratemodels.o solvers.o stats.o
> > surface.o swap.o swapforwardmappings.o swaption.o
> > swaptionvolatilitycube.o swaptionvolatilitymatrix.o termstructures.o
> > timeseries.o transformedgrid.o tqreigendecomposition.o tracing.o
> > utilities.o variancegamma.o varianceoption.o varianceswaps.o
> > volatilitymodels.o libUnitMain.la ../ql/libQuantLib.lalibtool: link: g
> > ++ -g -O2 -o .libs/quantlib-test-suite.exe quantlibtestsuite.o
> > americanoption.o array.o asianoptions.o assetswap.o autocovariances.o
> > barrieroption.o basketoption.o batesmodel.o bermudanswaption.o
> > blackdeltacalculator.o bonds.o brownianbridge.o calendars.o capfloor.o
> > capflooredcoupon.o cashflows.o cdo.o cdsoption.o chooseroption.o
> > cliquetoption.o cms.o commodityunitofmeasure.o compoundoption.o
> > convertiblebonds.o covariance.o creditdefaultswap.o curvestates.o
> > dates.o daycounters.o defaultprobabilitycurves.o digitalcoupon.o
> > digitaloption.o distributions.o dividendoption.o europeanoption.o
> > everestoption.o exchangerate.o extendedtrees.o factorial.o
> > fastfouriertransform.o fdheston.o fdmlinearop.o forwardoption.o
> > gaussianquadratures.o gjrgarchmodel.o hestonmodel.o himalayaoption.o
> > hybridhestonhullwhiteprocess.o inflation.o inflationcapfloor.o
> > inflationcapflooredcoupon.o inflationvolatility.o instruments.o
> > integrals.o interestrates.o interpolations.o jumpdiffusion.o
> > libormarketmodel.o libormarketmodelprocess.o
> > linearleastsquaresregression.o lookbackoptions.o
> > lowdiscrepancysequences.o margrabeoption.o marketmodel.o
> > marketmodel_cms.o marketmodel_smm.o
> > marketmodel_smmcapletalphacalibration.o
> > marketmodel_smmcapletcalibration.o
> > marketmodel_smmcaplethomocalibration.o matrices.o
> > mclongstaffschwartzengine.o mersennetwister.o money.o nthtodefault.o
> > operators.o optimizers.o optionletstripper.o overnightindexedswap.o
> > pagodaoption.o pathgenerator.o period.o piecewiseyieldcurve.o
> > quantooption.o quotes.o rangeaccrual.o riskstats.o rngtraits.o
> > rounding.o sampledcurve.o shortratemodels.o solvers.o stats.o
> > surface.o swap.o swapforwardmappings.o swaption.o
> > swaptionvolatilitycube.o swaptionvolatilitymatrix.o termstructures.o
> > timeseries.o transformedgrid.o tqreigendecomposition.o tracing.o
> > utilities.o variancegamma.o varianceoption.o varianceswaps.o
> > volatilitymodels.o -lboost_unit_test_framework-mt
> > ./.libs/libUnitMain.a ../ql/.libs/libQuantLib.a
> > /usr/lib/gcc/i686-pc-cygwin/4.3.4/libstdc++.dll.a
> > -L/usr/lib/gcc/i686-pc-cygwin/4.3.4
> > ./.libs/libUnitMain.a(libUnitMain_la-main.o):
> >
> > In function `main':
> >
> > /home/Ted/QuantLib-1.1/test-suite/main.cpp:11: undefined reference to
> > `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
> >
> > ./.libs/libUnitMain.a(libUnitMain_la-main.o): In function
> > `_Z13init_functionv':
> >
> > /home/Ted/QuantLib-1.1/test-suite/main.cpp:7: undefined reference to
> > `boost::unit_test::framework::master_test_suite()'
> >
> > collect2: ld returned 1 exit status
> >
> > make[1]: *** [quantlib-test-suite.exe] Error 1
> >
> > make[1]: Leaving directory `/home/Ted/QuantLib-1.1/test-suite'
> >
> > make: *** [all-recursive] Error 1
> >
> >
> >
> > However, that last command works if I edit it to have '
> > lboost_unit_test_framework-mt ' come after './.libs/libUnitMain.a ',
> > as in :
> >
> > g++ -g -O2 -o .libs/quantlib-test-suite.exe quantlibtestsuite.o
> > americanoption.o array.o asianoptions.o assetswap.o autocovariances.o
> > barrieroption.o basketoption.o batesmodel.o bermudanswaption.o
> > blackdeltacalculator.o bonds.o brownianbridge.o calendars.o capfloor.o
> > capflooredcoupon.o cashflows.o cdo.o cdsoption.o chooseroption.o
> > cliquetoption.o cms.o commodityunitofmeasure.o compoundoption.o
> > convertiblebonds.o covariance.o creditdefaultswap.o curvestates.o
> > dates.o daycounters.o defaultprobabilitycurves.o digitalcoupon.o
> > digitaloption.o distributions.o dividendoption.o europeanoption.o
> > everestoption.o exchangerate.o extendedtrees.o factorial.o
> > fastfouriertransform.o fdheston.o fdmlinearop.o forwardoption.o
> > gaussianquadratures.o gjrgarchmodel.o hestonmodel.o himalayaoption.o
> > hybridhestonhullwhiteprocess.o inflation.o inflationcapfloor.o
> > inflationcapflooredcoupon.o inflationvolatility.o instruments.o
> > integrals.o interestrates.o interpolations.o jumpdiffusion.o
> > libormarketmodel.o libormarketmodelprocess.o
> > linearleastsquaresregression.o lookbackoptions.o
> > lowdiscrepancysequences.o margrabeoption.o marketmodel.o
> > marketmodel_cms.o marketmodel_smm.o
> > marketmodel_smmcapletalphacalibration.o
> > marketmodel_smmcapletcalibration.o
> > marketmodel_smmcaplethomocalibration.o matrices.o
> > mclongstaffschwartzengine.o mersennetwister.o money.o nthtodefault.o
> > operators.o optimizers.o optionletstripper.o overnightindexedswap.o
> > pagodaoption.o pathgenerator.o period.o piecewiseyieldcurve.o
> > quantooption.o quotes.o rangeaccrual.o riskstats.o rngtraits.o
> > rounding.o sampledcurve.o shortratemodels.o solvers.o stats.o
> > surface.o swap.o swapforwardmappings.o swaption.o
> > swaptionvolatilitycube.o swaptionvolatilitymatrix.o termstructures.o
> > timeseries.o transformedgrid.o tqreigendecomposition.o tracing.o
> > utilities.o variancegamma.o varianceoption.o varianceswaps.o
> > volatilitymodels.o ./.libs/libUnitMain.a
> > -lboost_unit_test_framework-mt ../ql/.libs/libQuantLib.a
> > /usr/lib/gcc/i686-pc-cygwin/4.3.4/libstdc++.dll.a
> > -L/usr/lib/gcc/i686-pc-cygwin/4.3.4
> >
> >
> >
> > This last command, executed in test-suite, works fine, and here is the
> > output of running quantlib-test-suite.exe in ,libs that it produces:
> >
> >
> >
> > Ted@Ted-acer-i7w7 ~/QuantLib-1.1/test-suite/.libs
> >
> > $ ./quantlib-test-suite.exe
> >
> > Running 467 test cases...
> >
> > unknown location(0): fatal error in
> >
> "QuantLib::detail::quantlib_test_case(&MarketModelSmmCapletAlphaCalibr
> ationTest::testFunction)":
> > std::exception: last caplet vol (0.1340376439125532) must be equal to
> > last swaption vol (0.1340517152226495); discrepancy is
> > 1.407131009625862e-05
> >
> > utilities.hpp(78): last checkpoint
> >
> > unknown location(0): fatal error in
> >
> "QuantLib::detail::quantlib_test_case(&MarketModelSmmCapletCalibrationT
> est::testFunction)":
> > std::exception: last caplet vol (0.1340376439125532) must be equal to
> > last swaption vol (0.1340517152226495); discrepancy is
> > 1.407131009625862e-05
> >
> > utilities.hpp(78): last checkpoint
> >
> > unknown location(0): fatal error in
> >
> "QuantLib::detail::quantlib_test_case(&MarketModelSmmCapletHomoCalibr
> ationTest::testFunction)":
> > std::exception: last caplet vol (0.1340376439125532) must be equal to
> > last swaption vol (0.1340517152226495); discrepancy is
> > 1.407131009625862e-05
> >
> > utilities.hpp(78): last checkpoint
> >
> > optionletstripper.cpp(303): fatal error in
> >
> "QuantLib::detail::quantlib_test_case(&OptionletStripperTest::testFlatTerm
> VolatilityStripping1)":
> >
> > option tenor:       3Y
> >
> > strike:             4.000000 %
> >
> > stripped vol price: 0.766155 %
> >
> > constant vol price: 0.769284 %
> >
> > error:              0.003129 %
> >
> > tolerance:          0.002500 %
> >
> > optionletstripper.cpp(362): fatal error in
> >
> "QuantLib::detail::quantlib_test_case(&OptionletStripperTest::testTermVola
> tilityStripping1)":
> >
> > option tenor:       4Y
> >
> > strike:             4.000000 %
> >
> > stripped vol price: 1.011738 %
> >
> > constant vol price: 1.015189 %
> >
> > error:              0.003451 %
> >
> > tolerance:          0.002500 %
> >
> >
> >
> > Tests completed in 17 m 37 s
> >
> >
> >
> >
> >
> > *** 5 failures detected in test suite "Master Test Suite"
> >
> >
> >
> > There are, thus, two questions.
> >
> >
> >
> > 1) How do I fix the makefiles QuantLib's files produces so that the
> > two problem libraries are included in the right order in the above
> > command?
> >
> > 2) Is this output from 'quantlib-test-suite.exe' indicative of serious
> > problems, sufficient to warrant caution in installing QuantLib?  If
> > so, how do I fix things?  5 failures out of 467 tests doesn't seem too
> > bad.  And differences like '1.407131009625862e-05' in a number like
> > '0.1340517152226495' doesn't seem too bad.  But then, I am drawing on
> > experience in modelling environmental systems were one can count
> > onself lucky if you can get 3 significant figures in one's
> > measurements.
> >
> >
> >
> > My aim is to study what QuantLib can do for me, and how?  What is the
> > best way to proceed.  Like most open source products I have used, the
> > documentation is OK, but short on details when things go awry.
> >
> >
> >
> > Thanks
> >
> >
> >
> > Ted
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > -------- Special Offer -- Download ArcSight Logger for FREE!
> > Finally, a world-class log management solution at an even better
> > price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> > download Logger. Secure your free ArcSight Logger TODAY!
> > http://p.sf.net/sfu/arcsisghtdev2dev
> > _______________________________________________ QuantLib-
> users mailing
> > list [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
> --
>
> Don't let school get in the way of your education.
> -- Mark Twain
>
>
>
>
----------------------------------------------------------------------------
--

> Doing More with Less: The Next Generation Virtual Desktop What are the
> key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops?   How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more
> affordable virtual desktop
> model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users