odin-detector / odin-data

DAQ software libraries for capturing and storing data from parallel detector systems
https://odin-detector.github.io/odin-data/
Apache License 2.0
8 stars 11 forks source link

Add version-dependent mechanism to avoid boost global placeholder deprecation #316

Closed timcnicholls closed 1 year ago

timcnicholls commented 1 year ago

This PR addresses the issue with deprecation warnings during build that boost placeholders should not be imported into the global namespace.

The suggested fix for this, i.e. #include <boost/bind/bind.hpp> and using namespace boost::placeholders, is not compatible with the full range of OS/Boost/Cmake versions targeted by odin-data. This is because the placeholders namespace did not appear in boost until 1.60.0 (EL7 is 1.53.0), and that the use of placeholders in boost::property_tree didn't get updated until 1.76.0 (q.v. Ubuntu 22.04, EL9 variants have boost 1.75.0). Furthermore the expansion of the Boost version in the CMake finder varies in behaviour. The following changes are implemented:

Clean compilation has been checked on EL7, Ubuntu 22.04 and AlmaLinux 9.

timcnicholls commented 1 year ago

CI test job failing due to apt repo timeouts? Push job on branch passed.

GDYendell commented 1 year ago

Yeah I think it might be a problem with the runners. Hopefully it will resolve itself.

GDYendell commented 1 year ago

This needs rebasing to remove 201f71d before merging because I amended the base branch.

timcnicholls commented 1 year ago

Done. PR CI job failed (again) though the push job passed.