Login  Register

Re: Installation issues on Mac OS X 10.11.2

Posted by Claves do Amaral-2 on Jan 02, 2016; 6:22pm
URL: http://quantlib.414.s1.nabble.com/Installation-issues-on-Mac-OS-X-10-11-2-tp17214p17215.html

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