auto-differentiation / QuantLib-Risks-Cpp

Fast risks with QuantLib in C++
https://auto-differentiation.github.io
15 stars 10 forks source link

Linux Boost version mismatch for CXX20 #22

Open raneamri opened 1 month ago

raneamri commented 1 month ago

QuantLib expects Boost ver. ≥1.75.0 for CXX ≥20 but Linux fetches 1.74.0 with sudo apt install -y libboost-dev ccache ninja-build:

CMake Error at /usr/local/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Boost: Found unsuitable version "1.74.0", but required is at
  least "1.75.0" (found /usr/include, )
xcelerit-team commented 1 month ago

That depends on the Linux distribution and version and how it's setup I guess... Which Linux version are you using?

raneamri commented 1 month ago

This error was produced by CI workflow, which is running on ubuntu-latest. No other change was made to the repos except for the addition of set(CMAKE_CXX_STANDARD 20) in QuantLib's CMake file when this error came up.

xcelerit-team commented 1 month ago

Their development images used for building quantlib install boost from scratch. And the version used currently in their Linux builds is rolling. (see also here)

The container images can be found here, and we see it's using Boost 1.85.

Perhaps we should try to use the same container for our CI builds that QuantLib is using - that would make things easier to stay compatible....

xcelerit-team commented 1 month ago

(and note that you can set the standard using the CMake command-line, i.e. add -DCMAKE_CXX_STANDARD=20 to the cmake configure call)

raneamri commented 1 month ago

Good idea, I'll match the Linux workflow to QuantLib's. Is it also worth adding matrix configuration for CXX 20?

xcelerit-team commented 1 month ago

yes

raneamri commented 1 month ago

Should be fixed by #23