我需要在Windows UWP ARM64平台上使用boost。因此,我首先尝试使用32位ARM从源代码构建增强功能。这项工作不费吹灰之力,但是针对ARM64进行构建(我尝试使用V1.68,由于缺少库,因此无法使用较新的版本)会导致以下错误:
.../tools/build/src/tools\msvc.jam:1093: in set-setup-command
*** argument error
* rule virtual-target.from-file ( file : file-loc : project )
* called with: ( : /.../boost-prefix/src/boost : object(project-target)@131 )
* missing argument file
.../tools/build/src/build\virtual-target.jam:970:see definition of rule 'virtual-target.from-file' being called
.../tools/build/src/tools\msvc.jam:652: in msvc.compile.c++
.../tools/build/src/kernel\modules.jam:107: in modules.call-in
.../tools/build/src/util\indirect.jam:105: in indirect.call
.../tools/build/src/build\virtual-target.jam:902: in execute
.../tools/build/src/build\virtual-target.jam:821: in class@action.actualize
.../tools/build/src/build\virtual-target.jam:332: in actualize-action
.../tools/build/src/build\virtual-target.jam:518: in actualize-no-scanner
.../tools/build/src/build\virtual-target.jam:142: in class@virtual-target.actualize
.../tools/build/src/build\virtual-target.jam:842: in actualize-source-type
.../tools/build/src/build\virtual-target.jam:863: in actualize-sources
.../tools/build/src/build\virtual-target.jam:801: in class@action.actualize
.../tools/build/src/build\virtual-target.jam:332: in actualize-action
.../tools/build/src/build\virtual-target.jam:518: in actualize-no-scanner
.../tools/build/src/build\virtual-target.jam:142: in class@virtual-target.actualize
.../tools/build/src/build\virtual-target.jam:948: in actualize-source-type
.../tools/build/src/build\virtual-target.jam:863: in actualize-sources
.../tools/build/src/build\virtual-target.jam:801: in class@action.actualize
.../tools/build/src/build\virtual-target.jam:332: in actualize-action
.../tools/build/src/build\virtual-target.jam:518: in actualize-no-scanner
.../tools/build/src/build\virtual-target.jam:142: in class@virtual-target.actualize
.../tools/build/src\build-system.jam:810: in load
...\tools\build\src/kernel\modules.jam:295: in import
...\tools\build\src/kernel/bootstrap.jam:139: in boost-build
...\boost-build.jam:17: in module scope
似乎在virtual-target.from-file ( file : file-loc : project )
调用中需要设置file
变量。
我查看了产生错误的文件,并试图找出变量应包含的内容。我没有找到设置变量的位置,但是在另一个平台(UWP ARM)上尝试显示该变量应该是
...\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsx86_arm64.bat
。这给了我一个问题,如果我通过在boost目录中调用以下命令正确地进行了设置:
./bootstrap.bat
./b2.exe architecture=arm windows-api=store toolset=msvc-14.1 address-model=64 --build-type=minimal --abbreviate-paths -j12 link=static threading=multi runtime-link=shared variant=debug --prefix=.../install/x64_uwp --with-system
然后我尝试在msvc.jam
中手动设置此变量(请注意,有问题的设置可能会导致其他问题),但这只会导致以下几行的错误:
.../tools/build/src/kernel\modules.jam:107: in modules.call-in
*** argument error
* rule msvc.adjust-setup-command ( new-setup : setup : properties * )
* called with: ( <pbin.v2\standalone\msvc\msvc-14.1>msvc-setup.bat : : <relevant>address-model <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>include <relevant>inlining <relevant>instruction-set <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <toolset-msvc:version>14.1 <toolset>msvc <windows-api>desktop : : : : : : : : : : : : : : : )
* missing argument setup
.../tools/build/src/tools\msvc.jam:1037:see definition of rule 'msvc.adjust-setup-command' being called
.../tools/build/src/util\indirect.jam:105: in indirect.call
.../tools/build/src/build\virtual-target.jam:902: in execute
.../tools/build/src/build\virtual-target.jam:821: in class@action.actualize
.../tools/build/src/build\virtual-target.jam:332: in actualize-action
.../tools/build/src/build\virtual-target.jam:518: in actualize-no-scanner
.../tools/build/src/build\virtual-target.jam:142: in class@virtual-target.actualize
.../tools/build/src/tools\msvc.jam:1102: in set-setup-command
...
因此在设置阶段可能是一些问题。
有人在构建Boost(用于UWP ARM64)方面有经验,可以帮助我正确地设置和构建它吗?