Loading...
Home / Reply To: Installation issues – RedHat

Home Forums Help Installation issues – RedHat Reply To: Installation issues – RedHat

#6260
Anonymous
Inactive

Hi Wojtek,

Have been digging into this a bit more, I can confirm that it is an issue that is coming up with Boost 1.66 and is caused by mixing C++98 (QuantLib and QuantExt) and C++11 (OREData and OREAnalytics) libraries and boost::optional.

The issue is caused by a QuantExt class that has a boost::optional parameter. When the class cpp file is compiled in QuantExt it is using the C++98 version of boost::optional. This object file is then part of the QLE library. When we build OREData (or Analytics) and we call this class constructor, the boost::optional is included by the compiler in C++11 mode, this probably generates an incompatible binary. Everything compiles but at runtime there is a mismatch which results in a SEGFAULT.

This explains why the QuantExt test suite (all C++98) is unaffected.

I’ve reproduced this with a simple boost example, I’ll post this to the boost forums and see what they say, for now the simplest workarounds for ORE are either
– Use boost 1.65.1 or lower
– Compile QL and QLE with -std=c++11

It also fails on a Mac with clang, so it’s definitely not a compiler issue, on windows it works but I believe that is because there are no strict C++98 flags in DevStudio so the binaries are always compatible.

Regards,
Niall.