Page MenuHomePhabricator

Failed to build boost
Closed, InvalidPublic

Description

I constantly have an error in the MITK superbuild (both current and 1 month old master) with building boost:

No update step for 'Boost'
Performing patch step for 'Boost'
patching file tools/build/src/engine/config_toolset.bat
Performing configure step for 'Boost'
Building Boost.Build engine

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

Output in bootstrap.log is:

libucrtd.lib(exit.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

If I run bootstrap.bat, the boost engine is built successfully. So, It may have something to do with the MSVC environment.

I use Windows 10 and Visual Studio 15.5.4

Related Objects

Event Timeline

kislinsk triaged this task as Normal priority.Mar 8 2018, 10:42 AM

The target machine type should be x64, too. When b2 is built, we call it with --address-model=64 on x64 systems. There is no such parameter for the build process of b2 ifself. Actually the build environment is set by Visual Studio, or, in case someone wants to compile from the command line, by the according batch file for setting up the build environment. So I guess, that this is indeed an issue with your Visual Studio environment or with the selected Visual Studio Generator in CMake.

Can you reproduce the build error on any other machine?

BTW, it turned out to be also an issue when updating Visual Studio 15.x and the compiler received an update like in 15.6 recently, which has compiler version 14.13 now. In this case one have to adjust the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER variables in CMake. I did not test yet if these updated variables are propagated to the third-party projects again. So I would recommend to do a clean superbuild after a compiler update.

I startet a superbuild with the current master. Boost builds now (still using Visual Studio 15.5.4).
Strangely, as I see no changes in the boost build process in the last month.
What irritates me a bit is this line in boostrap.log:

[vcvarsall.bat] Environment initialized for: 'x86'