0

I have successfully installed QuabtLib for my windows box, and wanted to port it to Linux Ubuntu. The Boost install was successful, and I was able to run ./configure from the swig directory. However when I run the make file, the system freezes at the following point:

QuantLib/quantlib_wrap.cpp: In function ‘void* _p_TestSurfacePtrTo_p_boost__shared_ptrT_Surface_t(void*, int*)’:
QuantLib/quantlib_wrap.cpp:253496:41: warning: ‘Surface’ is deprecated (declared at /usr/include/ql/math/surface.hpp:47) [-Wdeprecated-declarations]
     return (void *)((boost::shared_ptr< Surface > *)  ((TestSurfacePtr *) x));

Would be great if someone knew the fix. Environment info: Boost 1.56 QuantLib 1.4 QuantLibSwig 1.4 Python2.7.6 Ubuntu 14 Thanks,

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
Don Shanil
  • 161
  • 1
  • 7
  • The warning is just a warning and it expected (SWIG is wrapping a deprecated class). Does the system freeze, or it just starts swapping? The wrappers are huge, and compiling them might be using up all your RAM. If that's the case, try passing CXXFLAGS=-O0 to the Makefile to disable optimizations and decrease the memory requirements. – Luigi Ballabio Sep 22 '14 at 08:15
  • Thanks Luigi, increasing the RAM on the VM worked so it was the memory -- help much appreciated. Would you want to add the above as an answer so others can refer to it in the future? – Don Shanil Sep 23 '14 at 14:08
  • Glad it helped. I've posted the answer. – Luigi Ballabio Sep 23 '14 at 21:11

1 Answers1

1

Here's my comment above, posted as an answer for future reference.

The warning is expected. The Surface class was marked as deprecated in QuantLib 1.4, we're wrapping it anyway, and the compiler is warning us about that.

The freeze is probably caused (was definitely caused, in the case of the original poster) by the exhaustion of the available memory. The wrappers are huge, weighing at about 10 MBytes, and compiling them requires quite a few resources. If you're using a virtual machine, try adding more memory. If you're using a physical machine and you can't, try disabling optimizations to make the compilation process less demanding. You can do this by passing CXXFLAGS=-O0 to either ./configure or make.

Luigi Ballabio
  • 4,128
  • 21
  • 29