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

Drop FindBoost module which is deprecated in CMake 3.30 and raise minimum version to 1.70. #5227

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Nov 13, 2024

Proposed changes

Boost 1.70 was release in 2019.

Instead of the CMake shipped module file, upstream Boost's BoostConfig.cmake package configuration file will be used.
This change requires installing boost properly but we only need the "headers" library. Untaring a boost archive won't work.

Installation of boost headers is very simple and quick

./bootstrap.sh --prefix=<location of your installation> --with-libraries=headers
./b2 install

QMCPACK CMake takes -DBOOST_ROOT=<location of your installation> as usual.

What type(s) of changes does this code introduce?

  • Build related changes
  • Documentation or build script changes

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

laptop

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 13, 2024

Test this please

Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this. I have been wondering about the boost cmake change for some time since we have been getting warnings on cdash from the nightlies.

Since this PR breaks multiple CI configurations, we can conclude that not only are we not ready for the change in the current version of the PR, but it will also cause headaches for existing users which we can easily avoid: I suggest to simply use the new find_package mechanisms for cmake >=3.30.0 otherwise use the old scheme.

If CMake 3.30.0 needs a specific minimum boost we can use that boost minimum version for CMake 3.30.0. => For CMake 3.30.0 we require 1.70.0, otherwise I we support the old route and old minimum version. This avoids creating work for no obvious benefit.

(Something to discuss for the rainy day list would would be to have boost as an optional dependency for real space builds. Removing a dependency would definitely make things easier for users. Currently optional LMY_ENGINE and AFQMC need it in many places, but we only make a little use elsewhere.)

@PDoakORNL
Copy link
Contributor

I don't think I've touched a boost tarball for a decade. Either it is a distro package or I use spack. And at least for spack I had to pull a newer version of spack and reinstall boost. My old install did not include the cmake config files for any version of spack. I can see the recipe for boost has been updated. So I think that's probably a possible issue here.

Once I've done that it works fine. I don't think spack was ever correct to leave these files out.

@PDoakORNL
Copy link
Contributor

PDoakORNL commented Nov 14, 2024

I'd add I'm using [email protected] was using [email protected] installed months ago and reinstalled after a pull of spack develop today. So this works with older cmake's but maybe not if you have a old spack install of boost even if its far newer that 1.70

On osx homebrew looks to be installing boost properly.

@prckent
Copy link
Contributor

prckent commented Nov 15, 2024

(Not changing my view here - needs updating to use the new find_package mechanisms for cmake >=3.30.0 otherwise use the old scheme. This is the least disruptive approach.)

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 16, 2024

@PDoakORNL boost issue fixed by spack/spack#46281 and spack/spack#46062 Aug/Sep 2024. So only recently.

…imum version to 1.70 (2019).

Instead of the CMake shipped module file, upstream Boost's BoostConfig.cmake package configuration file will be used.
This change requires installing boost but we only need the "headers" library.

Installation of boost headers is very simple and quick
./bootstrap.sh --prefix=<location of your installation> --with-libraries=headers
./b2 install

QMCPACK CMake takes -DBOOST_ROOT=<location of your installation> as usual.
@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 16, 2024

For CMake version < 3.30, keep using the boost module.

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 16, 2024

Test this please

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 18, 2024

Test this please

@prckent
Copy link
Contributor

prckent commented Nov 18, 2024

Thanks Ye!

@prckent
Copy link
Contributor

prckent commented Nov 18, 2024

Test this please

@prckent prckent enabled auto-merge November 18, 2024 14:47
@prckent prckent merged commit 5350c8a into QMCPACK:develop Nov 18, 2024
39 of 40 checks passed
@ye-luo ye-luo deleted the cleanup branch November 27, 2024 20:08
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.

3 participants