Hi,
I'm desperately trying to install Quantlib 1.7 on my Mac OSX 10.11.2. I follow all the steps indicated on http://quantlib.org/install/macosx.shtml. 1) I've installed Xcode 7.2, Apple's Command Line Developer Tools and Macports 2) Installed boost with sudo port install boost 3) Downloaded Quantlib 1.7 from source forge and extracted it in /Users/my_account 4) I run ./configure --enable-static --with-boost-include=/opt/local/include/ --with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ CXXFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" LDFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" 5) I run make && sudo make install It runs for about 1.5h and then I get the following error message: mv -f .deps/FittedBondCurve.Tpo .deps/FittedBondCurve.Po /bin/sh ../../libtool --tag=CXX --mode=link g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 -L/opt/local/lib -o FittedBondCurve FittedBondCurve.o ../../ql/libQuantLib.la libtool: link: g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 -o .libs/FittedBondCurve FittedBondCurve.o -Wl,-bind_at_load -L/opt/local/lib ../../ql/.libs/libQuantLib.dylib Making all in FRA g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. -I/opt/local/include -stdlib=libstdc++ -mmacosx-version-min=10.6 -MT FRA.o -MD -MP -MF .deps/FRA.Tpo -c -o FRA.o FRA.cpp In file included from FRA.cpp:25: In file included from ../../ql/quantlib.hpp:43: In file included from ../../ql/experimental/all.hpp:25: In file included from ../../ql/experimental/volatility/all.hpp:21: In file included from ../../ql/experimental/volatility/zabr.hpp:31: In file included from ../../ql/math/statistics/incrementalstatistics.hpp:35: In file included from /opt/local/include/boost/accumulators/statistics/stats.hpp:14: In file included from /opt/local/include/boost/accumulators/statistics_fwd.hpp:12: /opt/local/include/boost/mpl/print.hpp:50:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] const int m_x = 1 / (sizeof(T) - sizeof(T)); ^ 1 warning generated. mv -f .deps/FRA.Tpo .deps/FRA.Po /bin/sh ../../libtool --tag=CXX --mode=link g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 -L/opt/local/lib -o FRA FRA.o ../../ql/libQuantLib.la -lboost_thread libtool: link: g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 -o .libs/FRA FRA.o -Wl,-bind_at_load -L/opt/local/lib ../../ql/.libs/libQuantLib.dylib -lboost_thread ld: library not found for -lboost_thread clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [FRA] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 I've checked this mailing list and stack overflow and couldn't' find a solution. Can you help? Someone else mentioned exactly the same problem on SO: http://stackoverflow.com/questions/34256208/quantlib-library-not-found-for-lboost-thread-on-osx Thanks in advance Xavier |
Hi Xavier,
it looks your linker cannot find the boost_thread library > ld: library not found for -lboost_thread I am not an expert in Mac OS. It is possible that the command you gave above > 2) Installed boost with /sudo port install boost/ did not install all boost components. In Linux Debian you can install separately the many components of boost. In particular, you need to explicitly install libboost_thread. To verify if such library is installed, in Linux you can run ldconfig as root root@MariaPC:~# ldconfig -p | grep libboost_thread libboost_thread.so.1.55.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0 libboost_thread.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_thread.so alternatively you can check the presence of the files in a specified folder: claves@MariaPC:~$ ls -lh /usr/lib/x86_64-linux-gnu/libboost_thread* -rw-r--r-- 1 root root 236K Sep 19 2014 /usr/lib/x86_64-linux-gnu/libboost_thread.a lrwxrwxrwx 1 root root 25 Sep 19 2014 /usr/lib/x86_64-linux-gnu/libboost_thread.so -> libboost_thread.so.1.55.0 -rw-r--r-- 1 root root 108K Sep 19 2014 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0 In this case you can see that libboost_thread is a soft link to the file libboost_thread.so.1.55.0 Regards, Claves On 2 January 2016 at 12:16, xvallee <[hidden email]> wrote: > Hi, > > I'm desperately trying to install Quantlib 1.7 on my Mac OSX 10.11.2. I > follow all the steps indicated on http://quantlib.org/install/macosx.shtml > <http://quantlib.org/install/macosx.shtml> . > > 1) I've installed Xcode 7.2, Apple's Command Line Developer Tools and > Macports > > 2) Installed boost with /sudo port install boost/ > > 3) Downloaded Quantlib 1.7 from source forge and extracted it in > //Users/my_account/ > > 4) I run /./configure --enable-static > --with-boost-include=/opt/local/include/ --with-boost-lib=/opt/local/lib/ > --prefix=/opt/local/ CXXFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" > LDFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6"/ > > 5) I run /make && sudo make install/ > > It runs for about 1.5h and then I get the following error message: > > /mv -f .deps/FittedBondCurve.Tpo .deps/FittedBondCurve.Po > /bin/sh ../../libtool --tag=CXX --mode=link g++ -stdlib=libstdc++ > -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 > -L/opt/local/lib -o FittedBondCurve FittedBondCurve.o > ../../ql/libQuantLib.la > libtool: link: g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 > -stdlib=libstdc++ -mmacosx-version-min=10.6 -o .libs/FittedBondCurve > FittedBondCurve.o -Wl,-bind_at_load -L/opt/local/lib > ../../ql/.libs/libQuantLib.dylib > Making all in FRA > g++ -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. -I/opt/local/include > -stdlib=libstdc++ -mmacosx-version-min=10.6 -MT FRA.o -MD -MP -MF > .deps/FRA.Tpo -c -o FRA.o FRA.cpp > In file included from FRA.cpp:25: > In file included from ../../ql/quantlib.hpp:43: > In file included from ../../ql/experimental/all.hpp:25: > In file included from ../../ql/experimental/volatility/all.hpp:21: > In file included from ../../ql/experimental/volatility/zabr.hpp:31: > In file included from ../../ql/math/statistics/incrementalstatistics.hpp:35: > In file included from > /opt/local/include/boost/accumulators/statistics/stats.hpp:14: > In file included from > /opt/local/include/boost/accumulators/statistics_fwd.hpp:12: > /opt/local/include/boost/mpl/print.hpp:50:19: warning: in-class > initialization of non-static data > member is a C++11 extension [-Wc++11-extensions] > const int m_x = 1 / (sizeof(T) - sizeof(T)); > ^ > 1 warning generated. > mv -f .deps/FRA.Tpo .deps/FRA.Po > /bin/sh ../../libtool --tag=CXX --mode=link g++ -stdlib=libstdc++ > -mmacosx-version-min=10.6 -stdlib=libstdc++ -mmacosx-version-min=10.6 > -L/opt/local/lib -o FRA FRA.o ../../ql/libQuantLib.la -lboost_thread > libtool: link: g++ -stdlib=libstdc++ -mmacosx-version-min=10.6 > -stdlib=libstdc++ -mmacosx-version-min=10.6 -o .libs/FRA FRA.o > -Wl,-bind_at_load -L/opt/local/lib ../../ql/.libs/libQuantLib.dylib > -lboost_thread > ld: library not found for -lboost_thread > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > make[2]: *** [FRA] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all-recursive] Error 1/** > > I've checked this mailing list and stack overflow and couldn't' find a > solution. Can you help? > > Someone else mentioned exactly the same problem on SO: > http://stackoverflow.com/questions/34256208/quantlib-library-not-found-for-lboost-thread-on-osx > <http://stackoverflow.com/questions/34256208/quantlib-library-not-found-for-lboost-thread-on-osx> > > Thanks in advance > > Xavier > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/Installation-issues-on-Mac-OS-X-10-11-2-tp17214.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
That's true, but the thing is that boost_thread shouldn't be needed at all. Unfortunately, a reference to the library slipped in the linker options. You can try opening Examples/FRA/Makefile.in, deleting "-lboost_thread" where it appears, and recompiling. Let us know how it goes. Luigi On 20:08, Sat, Jan 2, 2016 Claves do Amaral <[hidden email]> wrote: Hi Xavier, -- <http://leanpub.com/implementingquantlib> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Thanks Luigi. I'll try that and confirm if it works or not :)
|
Hi,
I did as Luigi recommended and managed to "make && sudo make install" quantlib. I then ran the following command g++ -I/opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp -o bermudanswaption -L/opt/local/lib/ -lQuantLib in Examples/BermudanSwaption and got a new error message (apologies for the length of it): Undefined symbols for architecture x86_64: "QuantLib::MultiStepSwap::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepSwap in BermudanSwaption-8ea63d.o "QuantLib::ExerciseAdapter::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::ExerciseAdapter in BermudanSwaption-8ea63d.o "QuantLib::OneStepForwards::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::OneStepForwards in BermudanSwaption-8ea63d.o "QuantLib::BermudanExercise::BermudanExercise(std::__1::vector<QuantLib::Date, std::__1::allocator<QuantLib::Date> > const&, bool)", referenced from: _main in BermudanSwaption-8ea63d.o "QuantLib::MultiStepNothing::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepNothing in BermudanSwaption-8ea63d.o "QuantLib::MultiStepRatchet::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepRatchet in BermudanSwaption-8ea63d.o "QuantLib::MultiStepForwards::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepForwards in BermudanSwaption-8ea63d.o "QuantLib::MultiStepSwaption::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepSwaption in BermudanSwaption-8ea63d.o "QuantLib::OneStepOptionlets::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::OneStepOptionlets in BermudanSwaption-8ea63d.o "QuantLib::MultiStepOptionlets::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepOptionlets in BermudanSwaption-8ea63d.o "QuantLib::OneStepCoinitialSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::OneStepCoinitialSwaps in BermudanSwaption-8ea63d.o "QuantLib::OneStepCoterminalSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::OneStepCoterminalSwaps in BermudanSwaption-8ea63d.o "QuantLib::MultiStepCoinitialSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepCoinitialSwaps in BermudanSwaption-8ea63d.o "QuantLib::MultiStepInverseFloater::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepInverseFloater in BermudanSwaption-8ea63d.o "QuantLib::MultiStepCoterminalSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepCoterminalSwaps in BermudanSwaption-8ea63d.o "QuantLib::MultiStepCoterminalSwaptions::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepCoterminalSwaptions in BermudanSwaption-8ea63d.o "QuantLib::MultiStepPeriodCapletSwaptions::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from: vtable for QuantLib::MultiStepPeriodCapletSwaptions in BermudanSwaption-8ea63d.o "QuantLib::Error::Error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: QuantLib::DiscretizedOption::reset(unsigned long) in BermudanSwaption-8ea63d.o QuantLib::Instrument::setupArguments(QuantLib::PricingEngine::arguments*) const in BermudanSwaption-8ea63d.o QuantLib::Option::setupArguments(QuantLib::PricingEngine::arguments*) const in BermudanSwaption-8ea63d.o QuantLib::Payoff::accept(QuantLib::AcyclicVisitor&) in BermudanSwaption-8ea63d.o QuantLib::BlackVolTermStructure::accept(QuantLib::AcyclicVisitor&) in BermudanSwaption-8ea63d.o QuantLib::SimpleQuote::value() const in BermudanSwaption-8ea63d.o QuantLib::Handle<QuantLib::Quote>::operator->() const in BermudanSwaption-8ea63d.o ... "QuantLib::detail::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, QuantLib::detail::percent_holder const&)", referenced from: calibrateModel(boost::shared_ptr<QuantLib::ShortRateModel> const&, std::__1::vector<boost::shared_ptr<QuantLib::CalibrationHelper>, std::__1::allocator<boost::shared_ptr<QuantLib::CalibrationHelper> > > const&) in BermudanSwaption-8ea63d.o _main in BermudanSwaption-8ea63d.o "QuantLib::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, QuantLib::Date const&)", referenced from: QuantLib::InterestRateIndex::valueDate(QuantLib::Date const&) const in BermudanSwaption-8ea63d.o ld: symbol(s) not found for architecture x86_64 Any idea of what's wrong? Your help is greatly appreciated! |
Hi,
looping the group. Regards Stephan ---------- Forwarded message ---------- From: stephan buschmann <[hidden email]> Date: Mon, Jan 4, 2016 at 11:53 PM Subject: Re: [Quantlib-users] Installation issues on Mac OS X 10.11.2 To: xvallee <[hidden email]> Hi, once I had similar issues. Unfortunately I used different versions of boost in linking and including. Can this happen on your machine? Now, QL1.7 runs smoothly on my mac (10.11.2). If I run make in the BermudanSwaption directory I get the following commands for compiling and linking: stephans-iMac:BermudanSwaption stephan$ make clang++-mp-3.7 -DHAVE_CONFIG_H -I. -I../../ql -I../.. -I../.. -I/Users/stephan/prog/boost_1_59_0 -w -m64 -O3 -g -Wall -std=c++11 -MT BermudanSwaption.o -MD -MP -MF .deps/BermudanSwaption.Tpo -c -o BermudanSwaption.o BermudanSwaption.cpp mv -f .deps/BermudanSwaption.Tpo .deps/BermudanSwaption.Po /bin/sh ../../libtool --tag=CXX --mode=link clang++-mp-3.7 -w -m64 -O3 -g -Wall -std=c++11 -L/usr/local/lib -o BermudanSwaption BermudanSwaption.o ../../ql/libQuantLib.la libtool: link: clang++-mp-3.7 -w -m64 -O3 -g -Wall -std=c++11 -o .libs/BermudanSwaption BermudanSwaption.o -Wl,-bind_at_load -L/usr/local/lib ../../ql/.libs/libQuantLib.dylib Does this help? Regards Stephan On Sun, Jan 3, 2016 at 4:17 PM, xvallee <[hidden email]> wrote: Hi, ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by xvallee
If you managed to run `make`, then you already compiled the BermudanSwaption example. May you check which commands were executed in Examples/BermudanSwaption during your successful `make` run? Luigi On Sun, Jan 3, 2016 at 5:05 PM xvallee <[hidden email]> wrote: Hi, -- <http://leanpub.com/implementingquantlib> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
I'm not sure I understand the question. First in /Users/My_account, I ran: 1) sudo port install boost 2) tar to extract the file then in /Users/My_account/Quantlib1.7, I ran: 1) ./configure --enable-static --with-boost-include=/opt/local/include/ --with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ CXXFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" LDFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" 2) sudo make && make install then in Examples/BermudanSwaption, I ran: g++ -I/opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp -o bermudanswaption -L/opt/local/lib/ -lQuantLib and got the error message. |
In reply to this post by xvallee
Actually, how can I be sure that the 'make' was successful? I didn't get any strange error and assumed it was ok. Sorry for the headache! I haven't compiled in quite some time!
|
Hi, just go into the folder Examples/BermudanSwaption folder and run make clean, to remove compiled stuff and then make to build the example from scratch. At the end you will find the executable BermudanSwaption returning something like
G2 (analytic formulae) calibration 1x5: model 10.04549 %, market 11.48000 % (-1.43451 %) ....... ..... regards Stephan On Tue, Jan 5, 2016 at 5:08 PM, xvallee <[hidden email]> wrote: Actually, how can I be sure that the 'make' was successful? I didn't get any ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
As Stephan said. And while "make" runs, it will also output the command that it uses to compile BermudanSwaption. You can check what options it uses and try using the same ones when you compile your programs. Luigi On Tue, Jan 5, 2016 at 8:18 PM stephan buschmann <[hidden email]> wrote:
-- <http://leanpub.com/implementingquantlib> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Thanks. I'll check tonight. On Tue, Jan 5, 2016 at 8:56 PM, Luigi Ballabio [via QuantLib] <[hidden email]> wrote:
|
Hi xvallee,
I am experiencing the same issues. Do you mind sharing if you've made this work? Thanks. vsison |
Hi
I haven't had a chance to try since. Sorry. Xavier
On Thursday, 14 January 2016, vsison [via QuantLib] <[hidden email]> wrote: Hi xvallee, |
Hi,
I did as Stephan recommended. Then I ran: g++ -I/opt/local/include -stdlib=libstdc++ -mmacosx-version-min=10.6 -I/opt/local/include/boost \ BermudanSwaption.cpp -o bermudanswaption -L/opt/local/lib/ -lQuantLib and it compiled. I could run the executable from the Finder on Mac OSX. I will now try to use it in Python!! Xavier |
In reply to this post by xvallee
Hi,
I have successfully managed to install Quantlib and Quantlib Swig for Python (Anaconda) on mac Os. I was wondering if you'd like me to post the steps that I've followed as a reference? Xavier |
Yes, definitely. Thanks! Luigi On 13:02, Sun, Jan 17, 2016 xvallee <[hidden email]> wrote: Hi, -- <http://leanpub.com/implementingquantlib> ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
to install Quantlib and Quantlib-SWIG on Mac OS 10.11.2 (El Capitan) and get it to work on Anaconda and pyCharm, I've followed the steps below: 1) Install Xcode 7.2, Apple's Command Line Developer Tools and Macports 2) Install boost with sudo port install boost 3) Download Quantlib 1.7 from source forge and extracted it in /Users/my_account 4) Run ./configure --enable-static --with-boost-include=/opt/local/include/ --with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ CXXFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" LDFLAGS="-stdlib=libstdc++ -mmacosx-version-min=10.6" 5) Remove "-lboost_thread" from Examples/FRA/Makefile.in 6) Run make && sudo make install 7) Download Quantlib-SWIG from SF and untar 8) Go into Python directory 9) Run python setup.py build, python setup.py test 10) Run python python setup.py install --prefix //anaconda/envs/your_virtual_env Then you should be able to "import QuantLib as ql" in pyCharm, or any python IDE |
by the way, "make check" in Quantlib fails for test suite.
|
What is the error? Does it still fail if you run the test suite today? Luigi On Sun, Jan 17, 2016 at 6:01 PM xvallee <[hidden email]> wrote: by the way, "make check" in Quantlib fails for test suite. ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |