Quantlib-SWIG for Java not compiling in MacOS X

Posted by Bartels Matthias on
URL: http://quantlib.414.s1.nabble.com/Quantlib-SWIG-for-Java-not-compiling-in-MacOS-X-tp14879.html

Hi everyone,

I tried to build the Quantlib SWIG Library for Java under MacOS X 10.9.
I did the following:
- installed Boost 1.55 from source
- installed Quantlib 1.3 from source

Everything worked out successfully so far.

My problems started when I tried to build Qunatlib-SWIG for Java. That's what I did:

./configure -with-jdk-include=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include -with-jdk-system-include=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include/darwin

make -C Java
This call fails with:

g++ -c quantlib_wrap.cpp -fno-strict-aliasing -g -O2 -I/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include/darwin `quantlib-config --cflags` -o quantlib_wrap.o
In file included from quantlib_wrap.cpp:268:
In file included from /usr/local/include/ql/quantlib.hpp:46:
In file included from /usr/local/include/ql/math/all.hpp:36:
In file included from /usr/local/include/ql/math/matrixutilities/all.hpp:4:
In file included from /usr/local/include/ql/math/matrixutilities/basisincompleteordered.hpp:25:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/valarray:4027:59: error: 
      'value_type' is a private member of
      'boost::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >'
    __val_expr<_BinaryOp<__bit_shift_left<typename _Expr::value_type>,
                                                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/valarray:4030:1: note: 
      while substituting deduced template arguments into function template 'operator<<' [with _Expr =
      boost::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >]
operator<<(const typename _Expr::value_type& __x, const _Expr& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/valarray:4028:46: error: 
      'value_type' is a private member of
      'boost::detail::operator_brackets_proxy<QuantLib::step_iterator<double *> >'
               __scalar_expr<typename _Expr::value_type>, _Expr> >
                                             ^
quantlib_wrap.cpp:10273:40: error: no matching constructor for initialization of
      'std::vector<bool>::const_reference' (aka '__bit_const_reference<std::__1::vector<bool,
      std::__1::allocator<bool> > >')
  std::vector< bool >::const_reference result;
                                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:140:5: note: 
      candidate constructor not viable: requires single argument '__x', but no arguments were provided
    __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:151:5: note: 
      candidate constructor not viable: requires 2 arguments, but 0 were provided
    __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:124:7: note: 
      candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were
      provided
class __bit_const_reference


Some days ago I could build everything successful under Ubuntu. 
Any ideas?

Cheers 
Matthias

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users