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,
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
.