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 |
having the same issue building SWIG for Python on Mavericks - using Boost 1.55 from macports and Quantlib 1.4 compiled from source. Any help would be hugely appreciated
|
In reply to this post by Bartels Matthias
Hello,
I have the same error messages. Did you find a solution? Thank you. Francesco |
Hello, did anybody make any progress on this one? Luigi On Fri, Mar 21, 2014 at 2:51 PM, eponalank <[hidden email]> wrote: Hello, <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi, In order to fix the first error regarding the conflict between value_type in valarray and boost/iterator/iterator_facade.hpp, I changed value_type to value_type_custom in the class operator_brackets_proxy in the file boost/iterator/iterator_facade.hpp (2 edits). This error was reported on another project here: https://github.com/graphlab-code/graphlab/issues/101. It appears to be a clang issue. I am not sure if there is a more permanent fix for this i.e. rather than amending a boost header file.
The second error - no matching constructor for initialization of 'std::vector<bool>::const_reference' - is due to the version of swig that is being used. The following commit in the swig project https://github.com/swig/swig/commit/843aa7cd65985319a64d4f1297778f93f96a5008 fixes this error. When I cloned the swig project and built it (commit: 3aacde4), this error was removed.
Thanks, Francis.
On Wed, Apr 9, 2014 at 4:03 PM, Luigi Ballabio <[hidden email]> wrote:
------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Bartels Matthias
Specifying the standard to be used seems to have solved the problem on my machine.
CXXFLAGS="-std=c++0x" ./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 |
Free forum by Nabble | Edit this page |