Repository: conan-io/conan-center-index

Issue:
[package] boost/1.78.0: build from source fails with MSVC 2022 due to outdated b2 dep
### Issue summary

It appears later b2 package versions + recipes had support for VS 2022 added.  Latest version of b2 is 4.7.1, but currently the present Boost recipe still references b2/4.5.0.  Thus, you get the following with Microsoft Visual Studio 2022 when trying to build boost (which in turn tries to build b2):

Caution:  Conan n00b here so I might have gotten this report wrong ;-) 

```
b2/4.5.0: Calling build()
LOCALAPPDATA=C:\Users\Aaron Curley\AppData\Local
Found with vswhere C:\Program Files\Microsoft Visual Studio\2022\Community
###
### "Unknown toolset: vcunk"
###
### You can specify the toolset as the argument, i.e.:
###     .\build.bat msvc
###
### Toolsets supported by this script are: borland, como, gcc,
###     gcc-nocygwin, intel-win32, mingw,
###     vc12, vc14, vc141, vc142
###
### If you have Visual Studio 2017 installed you will need to either update
### the Visual Studio 2017 installer or run from VS 2017 Command Prompt
### as we where unable to detect your toolset installation.
###
b2/4.5.0:
b2/4.5.0: ERROR: Package '11e6a84a7894f41df553e7c92534c3bf26896802' build failed
b2/4.5.0: WARN: Build folder C:\conandata\b2\4.5.0\_\_\build\11e6a84a7894f41df553e7c92534c3bf26896802
ERROR: b2/4.5.0: Error in build() method, line 73
        self.run(command)
        ConanException: Error 1 while executing build
```

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **boost/1.78.0**
  * Operating System+version: **Windows 10 x86_64**
  * Compiler+version: **Visual Studio 2022 (32-bit toolchain, but doubt it matters)**
  * Conan version: **conan 1.44.1**
  * Python version: **Python 3.10.2 (x64)**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
Configuration for profile vs-2022-x86-debug:

[settings]
os=Windows
os_build=Windows
arch=x86
arch_build=x86
compiler=Visual Studio
compiler.version=17
compiler.cppstd=14
compiler.runtime=MDd
build_type=Debug
[options]
[conf]
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)
1. Depend on boost/1.78.0 in your conanfile.
2. Be using Visual Studio 2022.
3. Run `conan install` with `--build` option.  Conan will attempt to build b2 and it will failure due to older b2 not being set up to build with MSVC 2022.



Discussion:
I locally bumped b2 in the boost formula to version 4.7.1.  This seemed to fix the issue but I'm not sure if there could be other breakages as a result.  Gonna do some testing and if things work I'll open a PR.

Resolving patch:
diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py
--- a/recipes/boost/all/conanfile.py
+++ b/recipes/boost/all/conanfile.py
@@ -445,7 +445,7 @@ def validate(self):
 
     def build_requirements(self):
         if not self.options.header_only:
-            self.build_requires("b2/4.5.0")
+            self.build_requires("b2/4.7.1")
 
     def _with_dependency(self, dependency):
         """


Test patch: