question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] boost/1.72.0: Build failure, Visual Studio 2017

See original GitHub issue

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: boost/1.72.0
  • Operating System+version: Windows 10 1803
  • Compiler+version: Visual Studio 2017 v15.9.20
  • Docker image: n/a
  • Conan version: conan 1.22.1
  • Python version: Python 3.6.7

Note: This problem started when RREV 98625d3ee856ce5020b7b74cded93fcf hit our system. If I force it to fb172ee71c4f6eab2c23b1ec1781ef01, it works.

Pinning the RREV is impractical, because if I pin it in our problem project, Conan complains that the version is different from boost/1.72.0 as used in requirements.

$ conan search -r conan-center-virtual 'boost/1.72.0@' -rev
Revisions for 'boost/1.72.0' at remote 'conan-center-virtual':
98625d3ee856ce5020b7b74cded93fcf (2020-02-11 09:47:21 UTC)
fb172ee71c4f6eab2c23b1ec1781ef01 (2020-02-05 20:33:40 UTC)
cd9a117751c1780db2e4107e55a96893 (2020-02-05 13:08:27 UTC)
1a89a2caf9cecf010acc949e84032851 (2020-01-31 10:09:08 UTC)
65bf1d6b91bdc49ec202f9baae1299a4 (2020-01-15 17:57:53 UTC)

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

Configuration for profile default:

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=15
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

$ conan install -if build boost/1.72.0@ -s os=Windows -s arch=x86_64 -s compiler="Visual Studio" -s compiler.version=15 -s build_type=Release -s compiler.runtime=MT --build missing

Logs (Include/Attach if Applicable)

See https://gist.github.com/datalogics-kam/45d33174d562d4d5b98efd73fa8248c8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
SSE4commented, Feb 13, 2020

such kinds of errors happen from time to time on certain systems. particularly, if system cannot allocate enough memory needed for the compiler. situation quickly gets worse on parallel builds. also, it’s more noticable with C++ code, especially if it uses lots of templates (like boost), which have to be instantiated numerous times, consuming the memory rapidly.

few things you can try:

  1. disable parallel builds, e.g. by setting CONAN_CPU_COUNT=1
  2. disable precompiled headers, e.g. by passing boost:extra_b2_flags=pcf=off option
  3. try to get more available memory (increase page file size, close some applications not needed during the build)
  4. try to specify the Zm compiler flag to increase compiler heap (as noted in C1076)

if none of these helps, I’d say you need to submit an issue to the Visual Studio bug tracker (but first ensure you have installed all updates for Visual Studio).

1reaction
SSE4commented, Feb 15, 2020

feel free to submit pull requests you need (e.g. for pcf option, or for setting /Zm). in the past, I’ve already seen boost didn’t compile properly with pch on Mac, for instance. so it’s worth to expose it as an option, as we know that pch might be problematic to use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to compile boost 1.72.0 with /std:c++latest
As the title indicates, compilation fails on boost 1.72.0 while ... I am not sure if the bug exists on Visual Studio side...
Read more >
Cannot build Boost with Visual Studio 2017 - Stack Overflow
I downloaded Boost 1.63.0 and tried building it with my newly installed Visual Studio 2017 but there is no way it works!
Read more >
Boost: Bootstrap.Bat Compilation Failure To Build Bjam - ADocLib
Building Boost fails with the current superbuild using Visual Studio 2017.We're calling bootstrap.bat on Windows and bootstrap.sh on other platforms. https:// ...
Read more >
Boost Getting Started on Windows - 1.72.0
To build the examples in this guide, you can use an Integrated Development Environment (IDE) like Visual Studio, or you can issue commands...
Read more >
Upgraded to VS 2017 15.9.13 and C++ projects won't build
1>Error: Error HRESULT E_FAIL has been returned from a call to a COM component. ========== Build: 0 succeeded, 1 failed, 0 up- ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found