boostbuildmsbuildmsvc12conan-2

Build Boost with Conan 2.0 fails with MSVC


I am using the following setup:

Here is my Conan profile:

[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.version=194
os=Windows

[conf]
tools.microsoft.msbuild:vs_version=17

When I try to build Boost using Conan with the command:

conan install --requires=boost/1.85.0 --build=missing -v

I encounter the following error:

boost/1.85.0: ERROR: Package 'dcbafcaa8ac5749d5d581be6c049bc3da7c6afbe' build failed
boost/1.85.0: WARN: Build folder D:\conan_data\b\boost53872d69de0c4\b\build-debug
ERROR: boost/1.85.0: Error in build() method, line 1130
        self.run(full_command)
        ConanException: Error 1 while executing

My global Conan configuration is empty. I have tried several solutions but haven't had any luck fixing this issue. How can I resolve this error and successfully build Boost using Conan?

EDIT:

If I try

conan install --requires=gtest/1.14.0 --build=missing -v

it works.


Solution

  • It is a known problem in Conan, they have a workaround, we had to add this: b2/5.2.0 to my Conanfile. the bug report is here