问题
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:
Go to
tools\build\v2\
in the boost directory and run the bootstrap from there.Run
b2 toolset=gcc install --prefix=PREFIX
from the same directory as above where PREFIX is where you want boost.build to be installed.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, typeb2 --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