Jianhong Wang
2011-Jan-23 15:20 UTC
[R] Error for compiling Rquantlib package 0.3.5 under Window 7 64bits
Hi, I am trying to build a binary of Rquantlib package 0.3.5 under Window 7 64bits. I am using mingw gcc version 4.5.1 (tdm64-1) which is a experimental version of 64 bits ming gcc. (http://tdm-gcc.tdragon.net/). I have successfully compiled boost 1.45 and Quantlib 1.0.1 with this gcc. And then when I tried to compile Rquantlib 0.3.5, it reports some error. The first error is like below. Please see the attachment for part of the errors compiler generated. C:\Lib\QuantLib/ql/pricingengines/mcsimulation.hpp: In member function 'void QuantLib::McSimulation<MC, RNG, S>::calculate(QuantLib::Real, QuantLib::Size, QuantLib::Size) const': C:\Lib\QuantLib/ql/pricingengines/mcsimulation.hpp:163:9: error: no match for 'operator!=' in 'requiredSamples != QuantLib::Null<long long unsigned int>()' I am kind of following the steps like below (only change the dir according to my machine's setting) http://www.r-bloggers.com/build-rquantlib-on-32-bit-windows/ 1. We're done with the msys command line, so you can make the following directories however you would like. c:/R/cpp/QuantLibBuild/boost c:/R/cpp/QuantLibBuild/ql c:/R/cpp/QuantLibBuild/lib 2. Copy c:/R/cpp/boost_1_42_0/boost to c:/R/cpp/QuantLibBuild/boost 3. Copy c:/R/cpp/include/ql to c:/R/cpp/QuantLibBuild/ql 4. Copy c:/R/cpp/lib/libQuantLib.a to c:/R/cpp/QuantLibBuild/lib/libQuantLib.a 5. Now you should be able to build RQuantLib via set QUANTLIB_ROOT=c:/R/cpp/QuantLibBuild R CMD INSTALL RQuantLib_0.3.5.tar.gz I am wondering whether anyone has similar experience or can help me solve the issue? Thanks! Jianhong Wang -------------- next part -------------- c:\Lib>set QUANTLIB_ROOT="C:\Lib\QuantLib" c:\Lib>R CMD INSTALL RQuantLib_0.3.5.tar.gz * installing to library 'C:/PROGRA~1/R/R-212~1.1/library' * installing *source* package 'RQuantLib' ... ** libs : this package has a non-empty 'configure.win' file, so building only the main architecture cygwin warning: MS-DOS style path detected: C:/PROGRA~1/R/R-212~1.1/etc/x64/Makeconf Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-212~1.1/etc/x64/Makeconf CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames x86_64-w64-mingw32-g++ -I"C:/PROGRA~1/R/R-212~1.1/include" -I"C:/PROGRA~1/R/R-212~1.1/library/Rcpp/include" -I"C:\Li b\QuantLib" -I. -O2 -Wall -c asian.cpp -o asian.o In file included from C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp:28:0, from C:\Lib\QuantLib/ql/experimental/exoticoptions/all.hpp:6, from C:\Lib\QuantLib/ql/experimental/all.hpp:12, from C:\Lib\QuantLib/ql/quantlib.hpp:42, from ./rquantlib.h:27, from asian.cpp:26: C:\Lib\QuantLib/ql/pricingengines/mcsimulation.hpp: In member function 'void QuantLib::McSimulation<MC, RNG, S>::calcula te(QuantLib::Real, QuantLib::Size, QuantLib::Size) const': C:\Lib\QuantLib/ql/pricingengines/mcsimulation.hpp:163:9: error: no match for 'operator!=' in 'requiredSamples != QuantL ib::Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:165:17: note: candidates are: bool QuantLib::operator!=(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:304:17: note: bool QuantLib::operator!=(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:159:17: note: bool QuantLib::operator!=(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:203:17: note: bool QuantLib::operator!=(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:223:17: note: bool QuantLib::operator!=(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:138:17: note: bool QuantLib::operator!=(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:108:17: note: bool QuantLib::operator!=(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:111:17: note: bool QuantLib::operator!=(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:136:17: note: bool QuantLib::operator!=(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:199:17: note: bool QuantLib::operator!=(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:115:17: note: bool QuantLib::operator!=(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:183:17: note: bool QuantLib::operator!=(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:46:17: note: bool QuantLib::operator!=(const QuantLib::L oss&, const QuantLib::Loss&) C:\Lib\QuantLib/ql/pricingengines/mcsimulation.hpp:199:42: error: no match for 'operator!=' in 'maxSamples != QuantLib:: Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:165:17: note: candidates are: bool QuantLib::operator!=(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:304:17: note: bool QuantLib::operator!=(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:159:17: note: bool QuantLib::operator!=(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:203:17: note: bool QuantLib::operator!=(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:223:17: note: bool QuantLib::operator!=(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:138:17: note: bool QuantLib::operator!=(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:108:17: note: bool QuantLib::operator!=(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:111:17: note: bool QuantLib::operator!=(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:136:17: note: bool QuantLib::operator!=(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:199:17: note: bool QuantLib::operator!=(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:115:17: note: bool QuantLib::operator!=(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:183:17: note: bool QuantLib::operator!=(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:46:17: note: bool QuantLib::operator!=(const QuantLib::L oss&, const QuantLib::Loss&) In file included from C:\Lib\QuantLib/ql/experimental/exoticoptions/all.hpp:6:0, from C:\Lib\QuantLib/ql/experimental/all.hpp:12, from C:\Lib\QuantLib/ql/quantlib.hpp:42, from ./rquantlib.h:27, from asian.cpp:26: C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp: In constructor 'QuantLib::MCEverestEngine<RNG, S>::MC EverestEngine(const boost::shared_ptr<QuantLib::StochasticProcessArray>&, QuantLib::Size, QuantLib::Size, bool, bool, Qu antLib::Size, QuantLib::Real, QuantLib::Size, QuantLib::BigNatural)': C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp:156:9: error: no match for 'operator!=' in 'timeSteps != QuantLib::Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:165:17: note: candidates are: bool QuantLib::operator!=(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:304:17: note: bool QuantLib::operator!=(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:159:17: note: bool QuantLib::operator!=(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:203:17: note: bool QuantLib::operator!=(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:223:17: note: bool QuantLib::operator!=(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:138:17: note: bool QuantLib::operator!=(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:108:17: note: bool QuantLib::operator!=(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:111:17: note: bool QuantLib::operator!=(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:136:17: note: bool QuantLib::operator!=(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:199:17: note: bool QuantLib::operator!=(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:115:17: note: bool QuantLib::operator!=(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:183:17: note: bool QuantLib::operator!=(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:46:17: note: bool QuantLib::operator!=(const QuantLib::L oss&, const QuantLib::Loss&) C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp:156:9: error: no match for 'operator!=' in 'timeStepsP erYear != QuantLib::Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:165:17: note: candidates are: bool QuantLib::operator!=(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:304:17: note: bool QuantLib::operator!=(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:159:17: note: bool QuantLib::operator!=(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:203:17: note: bool QuantLib::operator!=(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:223:17: note: bool QuantLib::operator!=(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:138:17: note: bool QuantLib::operator!=(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:108:17: note: bool QuantLib::operator!=(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:111:17: note: bool QuantLib::operator!=(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:136:17: note: bool QuantLib::operator!=(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:199:17: note: bool QuantLib::operator!=(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:115:17: note: bool QuantLib::operator!=(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:183:17: note: bool QuantLib::operator!=(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:46:17: note: bool QuantLib::operator!=(const QuantLib::L oss&, const QuantLib::Loss&) C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp:159:9: error: no match for 'operator==' in 'timeSteps == QuantLib::Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:161:17: note: candidates are: bool QuantLib::operator==(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:300:17: note: bool QuantLib::operator==(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:155:17: note: bool QuantLib::operator==(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:103:10: note: bool QuantLib::operator==(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:218:17: note: bool QuantLib::operator==(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:133:17: note: bool QuantLib::operator==(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:104:17: note: bool QuantLib::operator==(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:107:17: note: bool QuantLib::operator==(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:132:17: note: bool QuantLib::operator==(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/commoditycurve.hpp:109:17: note: bool QuantLib::operator==(c onst QuantLib::CommodityCurve&, const QuantLib::CommodityCurve&) C:\Lib\QuantLib/ql/experimental/commodities/commodityindex.hpp:106:17: note: bool QuantLib::operator==(c onst QuantLib::CommodityIndex&, const QuantLib::CommodityIndex&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:105:10: note: bool QuantLib::operator==(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:111:17: note: bool QuantLib::operator==(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaulttype.hpp:160:10: note: bool QuantLib::operator==(const Qua ntLib::DefaultType&, const QuantLib::DefaultType&) C:\Lib\QuantLib/ql/experimental/credit/defaultprobabilitykey.hpp:66:10: note: bool QuantLib::operator==( const QuantLib::DefaultProbKey&, const QuantLib::DefaultProbKey&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:181:10: note: bool QuantLib::operator==(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:43:17: note: bool QuantLib::operator==(const QuantLib::L oss&, const QuantLib::Loss&) C:\Lib\QuantLib/ql/experimental/exoticoptions/mceverestengine.hpp:159:9: error: no match for 'operator==' in 'timeStepsP erYear == QuantLib::Null<long long unsigned int>()' C:\Lib\QuantLib/ql/time/period.hpp:161:17: note: candidates are: bool QuantLib::operator==(const QuantLib::Period&, cons t QuantLib::Period&) C:\Lib\QuantLib/ql/time/date.hpp:300:17: note: bool QuantLib::operator==(const QuantLib::Date&, const Qu antLib::Date&) C:\Lib\QuantLib/ql/currency.hpp:155:17: note: bool QuantLib::operator==(const QuantLib::Currency&, const QuantLib::Currency&) C:\Lib\QuantLib/ql/money.hpp:103:10: note: bool QuantLib::operator==(const QuantLib::Money&, const Quant Lib::Money&) C:\Lib\QuantLib/ql/time/calendar.hpp:218:17: note: bool QuantLib::operator==(const QuantLib::Calendar&, const QuantLib::Calendar&) C:\Lib\QuantLib/ql/time/daycounter.hpp:133:17: note: bool QuantLib::operator==(const QuantLib::DayCounte r&, const QuantLib::DayCounter&) C:\Lib\QuantLib/ql/indexes/region.hpp:104:17: note: bool QuantLib::operator==(const QuantLib::Region&, c onst QuantLib::Region&) C:\Lib\QuantLib/ql/experimental/commodities/commoditytype.hpp:107:17: note: bool QuantLib::operator==(co nst QuantLib::CommodityType&, const QuantLib::CommodityType&) C:\Lib\QuantLib/ql/experimental/commodities/unitofmeasure.hpp:132:17: note: bool QuantLib::operator==(co nst QuantLib::UnitOfMeasure&, const QuantLib::UnitOfMeasure&) C:\Lib\QuantLib/ql/experimental/commodities/commoditycurve.hpp:109:17: note: bool QuantLib::operator==(c onst QuantLib::CommodityCurve&, const QuantLib::CommodityCurve&) C:\Lib\QuantLib/ql/experimental/commodities/commodityindex.hpp:106:17: note: bool QuantLib::operator==(c onst QuantLib::CommodityIndex&, const QuantLib::CommodityIndex&) C:\Lib\QuantLib/ql/experimental/commodities/quantity.hpp:105:10: note: bool QuantLib::operator==(const Q uantLib::Quantity&, const QuantLib::Quantity&) C:\Lib\QuantLib/ql/experimental/commodities/paymentterm.hpp:111:17: note: bool QuantLib::operator==(cons t QuantLib::PaymentTerm&, const QuantLib::PaymentTerm&) C:\Lib\QuantLib/ql/experimental/credit/defaulttype.hpp:160:10: note: bool QuantLib::operator==(const Qua ntLib::DefaultType&, const QuantLib::DefaultType&) C:\Lib\QuantLib/ql/experimental/credit/defaultprobabilitykey.hpp:66:10: note: bool QuantLib::operator==( const QuantLib::DefaultProbKey&, const QuantLib::DefaultProbKey&) C:\Lib\QuantLib/ql/experimental/credit/defaultevent.hpp:181:10: note: bool QuantLib::operator==(const Qu antLib::DefaultEvent&, const QuantLib::DefaultEvent&) C:\Lib\QuantLib/ql/experimental/credit/loss.hpp:43:17: note: bool QuantLib::operator==(const QuantLib::L ........................... ........................... ........................... C:\Lib\QuantLib/boost/function/function_base.hpp:434:13: instantiated from 'static void boost::detail::function::funct or_manager<Functor>::manage(const boost::detail::function::function_buffer&, boost::detail::function::function_buffer&, boost::detail::function::functor_manager_operation_type) [with Functor = QuantLib::details::LinearFct]' C:\Lib\QuantLib/boost/function/function_template.hpp:913:60: instantiated from 'void boost::function1<R, T1>::assign_t o(Functor) [with Functor = QuantLib::details::LinearFct, R = double, T0 = std::vector<double>]' C:\Lib\QuantLib/boost/function/function_template.hpp:722:7: instantiated from 'boost::function1<R, T1>::function1(Func tor, typename boost::enable_if_c<boost::type_traits::ice_not<boost::is_integral<Functor>::value>::value, int>::type) [wi th Functor = QuantLib::details::LinearFct, R = double, T0 = std::vector<double>, typename boost::enable_if_c<boost::type _traits::ice_not<boost::is_integral<Functor>::value>::value, int>::type = int]' C:\Lib\QuantLib/ql/math/linearleastsquaresregression.hpp:160:46: instantiated from here C:\Lib\QuantLib/boost/function/function_base.hpp:321:15: warning: dereferencing type-punned pointer will break strict-al iasing rules C:\Lib\QuantLib/boost/function/function_base.hpp:325:13: warning: dereferencing type-punned pointer will break strict-al iasing rules make: *** [asian.o] Error 1 ERROR: compilation failed for package 'RQuantLib' * removing 'C:/PROGRA~1/R/R-212~1.1/library/RQuantLib' c:\Lib>