Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Boost to 1.81 #2955

Merged
merged 5 commits into from
Oct 4, 2023
Merged

Upgrade Boost to 1.81 #2955

merged 5 commits into from
Oct 4, 2023

Conversation

andrjohns
Copy link
Collaborator

Summary

This PR upgrades the bundled boost version to 1.81, using the lib/upgrade-boost.sh script. 1.81 is the current version in the R BH headers.'

Tests

N/A current tests should still pass

Side Effects

N/A

Release notes

Updated Boost headers to v1.81

Checklist

  • Math issue #(issue number)

  • Copyright holder: Andrew Johnson

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@WardBrian WardBrian linked an issue Oct 1, 2023 that may be closed by this pull request
Copy link
Member

@syclik syclik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrjohns, thanks for doing this!

There's a file that was missed in the script that needs to be modified by hand. doxgyen/README.md. I'm seeing L11 and L76.

@syclik
Copy link
Member

syclik commented Oct 3, 2023

Has R's BH package been bumped to 1.81 or is that concern irrelevant now?

@andrjohns
Copy link
Collaborator Author

Has R's BH package been bumped to 1.81 or is that concern irrelevant now?

Yep, 1.81 is the current version of BH

Copy link
Member

@syclik syclik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@andrjohns andrjohns merged commit f037bb1 into develop Oct 4, 2023
8 checks passed
@andrjohns andrjohns deleted the boost-1.81-upgrade branch October 4, 2023 21:12
@WardBrian
Copy link
Member

After this cmdstan's build has a new warning:

In file included from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/detail/yield_k.hpp:23,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/detail/spinlock.hpp:42,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/smart_ptr/shared_ptr.hpp:29,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/shared_ptr.hpp:17,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/date_time/time_clock.hpp:17,
                 from stan/lib/stan_math/lib/boost_1.81.0/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from src/cmdstan/arguments/arg_seed.hpp:5,
                 from src/cmdstan/arguments/arg_random.hpp:4,
                 from src/cmdstan/command.hpp:9,
                 from src/cmdstan/main.cpp:1:
stan/lib/stan_math/lib/boost_1.81.0/boost/config/pragma_message.hpp:24:34: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   24 | # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
      |                                  ^~~~~~~
stan/lib/stan_math/lib/boost_1.81.0/boost/config/pragma_message.hpp:24:34: note: in definition of macro ‘BOOST_PRAGMA_MESSAGE’
   24 | # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
      |                                  ^~~~~~~
stan/lib/stan_math/lib/boost_1.81.0/boost/iterator.hpp:10:1: note: in expansion of macro ‘BOOST_HEADER_DEPRECATED’
   10 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~

It's not immediately clear to me what we can do - it sounds like boost is including its own deprecated header?

@andrjohns
Copy link
Collaborator Author

I had a look at the error, looks like it's a Stan header including <boost/iterator.hpp>:

In file included from stan/src/stan/services/pathfinder/multi.hpp:19:
stan/lib/stan_math/lib/boost_1.81.0/boost/iterator.hpp:10:1: warning: This header is deprecated. Use <iterator> instead. [-W#pragma-messages]
   10 | BOOST_HEADER_DEPRECATED("<iterator>")

I believe that this line just needs to be changed to <iterator>

@WardBrian
Copy link
Member

I think that boost/iterator.hpp and iterator are only equivalent in C++20 and later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

boost 1.81.0 upgrade
3 participants