Login  Register

Installation issues on Mac OS X 10.11.2

Posted by xvallee on Jan 02, 2016; 12:16pm
URL: http://quantlib.414.s1.nabble.com/Installation-issues-on-Mac-OS-X-10-11-2-tp17214.html

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