What do I do about “batch recursion exceeds stack limits” when running Boost.Build?

南楼画角 提交于 2019-12-12 11:32:59

问题


I am using 64-bit Win 7.

I downloaded the latest Boost source and in order to gather binaries I have to pass trough Boost.Build process. I took also the latest Boost.Build from official website and when I ran ./bootstrap I got an error:

******  B A T C H   R E C U R S I O N  exceeds STACK limits ******
Recursion Count=592, Stack Usage=90 percent
******       B A T C H   PROCESSING IS   A B O R T E D      ******

I have i5, 8 GB of memory.

Is there some other way to gain binaries for boost for GCC (G++). I know that there is Boostpro, but that can only give me VS binaries.


回答1:


This error occurs when:

  • you are using the sources from the *.tar.bz2 package for a Windows build, and
  • you are not specifying a toolset.

Either using the *.zip source package or specifying the toolset (bootstrap.sh msvc or whatever) resolves this problem (for me, at least).




回答2:


The answer has already given by Jesse Good and DevSolar

but needs some combination

for Windows + MinGW (gcc)

1) in CMD, under the root directory of Boost, type

.\bootstrap.bat gcc

the gcc argument will stop the Recursion Error

2) then b2 will be generated in the same directory

the simplest way to install is

.\b2 toolset=gcc --prefix="path\of\compiled\files\" install

the toolset=gcc argument is necessary, otherwise compiling of .dll will fail

3) add

"path\of\compiled\files\include\boost_?_??"
"path\of\compiled\files\lib"

to system path (you may google "add system path variable win", Win 7 needs NO reboot to activate the setting )




回答3:


  1. Go to tools\build\v2\ in the boost directory and run the bootstrap from there.

  2. Run b2 toolset=gcc install --prefix=PREFIX from the same directory as above where PREFIX is where you want boost.build to be installed.

  3. Add PREFIX\bin to your PATH environment variable, and then from the boost root directory type something like the following (this is an example, change the options as you wish, to find a list of the options, type b2 --help):

b2 toolset=gcc address-model=64 variant=release link=static,shared threading=multi --layout=system target-os=windows

Hopefully that helps.




回答4:


I have seen this happen when the Boost version is outdated and does not support the current toolset. For example, boost-1.57.0 does not support the VC15 compiler, and gave me your error message.

The simple solution was to use the most recent version of Boost.



来源:https://stackoverflow.com/questions/12484894/what-do-i-do-about-batch-recursion-exceeds-stack-limits-when-running-boost-bui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!