Login  Register

Re: Installation problem with SWIG Python wrapper

Posted by nkatuna on Aug 16, 2015; 12:16pm
URL: http://quantlib.414.s1.nabble.com/Installation-problem-with-SWIG-Python-wrapper-tp15085p16783.html

Hi Francesco,

Did you ever find a solution to this issue?  I'm using the latest Boost and QuantLib releases---

QuantLib 1.6.1
Boost 1.58.0
Python 3.4.3
Mac OS X 10.10.5

and my error stack looks like yours---

$ python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
/usr/bin/clang -Wno-unused-result -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -I/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -I/opt/local/include -I/opt/local/include -c QuantLib/quantlib_wrap.cpp -o build/temp.macosx-10.10-x86_64-3.4/QuantLib/quantlib_wrap.o -Wno-unused
In file included from QuantLib/quantlib_wrap.cpp:3916:
In file included from /opt/local/include/ql/quantlib.hpp:47:
In file included from /opt/local/include/ql/math/all.hpp:35:
In file included from /opt/local/include/ql/math/matrixutilities/all.hpp:4:
In file included from /opt/local/include/ql/math/matrixutilities/basisincompleteordered.hpp:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/valarray:4035:59: error:
      'value_type' is a private member of
      'boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >'
    __val_expr<_BinaryOp<__bit_shift_left<typename _Expr::value_type>,
                                                          ^
QuantLib/quantlib_wrap.cpp:7111:23: note: while substituting deduced template arguments into function template
      'operator<<' [with _Expr = boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >]
                    s << (*self)[i][j];
                      ^
In file included from QuantLib/quantlib_wrap.cpp:3916:
In file included from /opt/local/include/ql/quantlib.hpp:47:
In file included from /opt/local/include/ql/math/all.hpp:35:
In file included from /opt/local/include/ql/math/matrixutilities/all.hpp:4:
In file included from /opt/local/include/ql/math/matrixutilities/basisincompleteordered.hpp:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/valarray:4036:46: error:
      'value_type' is a private member of
      'boost::iterators::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >'
               __scalar_expr<typename _Expr::value_type>, _Expr> >
                                             ^
2 errors generated.
error: command '/usr/bin/clang' failed with exit status 1


It appears that QuantLib built correctly on my machine, for all unit tests pass.


Thanks,

Neil