Opened 6 years ago
Last modified 6 years ago
#12644 new Bugs
Windows store - vcvarsall.bat is invoked with wrong arguments
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | Building Boost |
Version: | Boost 1.62.0 | Severity: | Problem |
Keywords: | Cc: |
Description
When building a store app (ie, windows-api=store
in boost), the vcvarsall.bat script (part of Visual Studio) is supposed to be invoked, for example, as
<VSPath>\VC\vcvarsall.bat x86_arm store
Boost's build system, however, invokes it without the 'store' argument, resulting in a flawed compiler environment.
This typically doesn't make a difference when building for desktop, but when building store apps for phone (arm), it can result in missing dll:s when trying to run the app consuming boost. Specifically, various boost dll:s will try to link with kernel32.lib, which does not exist on phone.
The origin of the error appears to be in boost_1_62_0/tools/build/src/tools/msvc.jam in the invocation of the maybe-rewrite-setup
rule. Here, the setup-options
parameter should probably contain 'store', but the <windows-api>
feature is never checked to add it.
The end result is that, during boost compilation, the library include paths end up wrong and the boost binaries will link with desktop libraries instead of store libraries (eg, VCRUNTIME140D.dll instead of VCRUNTIME140D_APP.dll).
The following patch fixes the issue for our use case: