我尝试在 Intel Solaris V11.2 平台上使用全新的 Solaris Studio 12.4 编译器构建 Boost V1.57。我试图在OTN 开发论坛上发布错误,但结果是我的简单 OTN 帐户不允许我添加新帖子。因此,SO的问题。
简要总结:1)自举成功:
cd tools/build
./bootstrap.sh --with-toolset=sun
2)构建命令行(注意我把b2
和编译器放在我的PATH
. 这是一个“阶段”构建,即没有安装步骤,只是为了看到所有的库都可以构建:
b2 -j2 --build-dir=build toolset=sun address-model=64 threading=multi variant=release stage >& /tmp/boost_1_57_build.log
这是一个压缩的错误列表:
"./boost/archive/binary_iarchive.hpp", line 57: Error: Multiple declaration for adjust_counter.
"./boost/archive/binary_iarchive.hpp", line 57: Error: Unexpected type name "get_counter<boost::archive::binary_iarchive>::type" encountered.
"./boost/archive/binary_oarchive.hpp", line 57: Error: Multiple declaration for adjust_counter.
"./boost/archive/binary_oarchive.hpp", line 57: Error: Unexpected type name "get_counter<boost::archive::binary_oarchive>::type" encountered.
"./boost/archive/detail/register_archive.hpp", line 45: Error: The function "adjust_counter" must have a prototype.
"./boost/archive/detail/register_archive.hpp", line 46: Error: Expression must have a constant value.
"./boost/archive/detail/register_archive.hpp", line 47: Error: Expression must have a constant value.
"./boost/archive/detail/register_archive.hpp", line 48: Error: An integer constant expression is required within the array subscript operator.
"./boost/archive/polymorphic_iarchive.hpp", line 170: Error: Multiple declaration for adjust_counter.
"./boost/archive/polymorphic_iarchive.hpp", line 170: Error: Unexpected type name "get_counter<boost::archive::polymorphic_iarchive>::type" encountered.
"./boost/archive/polymorphic_oarchive.hpp", line 153: Error: Multiple declaration for adjust_counter.
"./boost/archive/polymorphic_oarchive.hpp", line 153: Error: Unexpected type name "get_counter<boost::archive::polymorphic_oarchive>::type" encountered.
"./boost/archive/text_iarchive.hpp", line 136: Error: Multiple declaration for adjust_counter.
"./boost/archive/text_iarchive.hpp", line 136: Error: Unexpected type name "get_counter<boost::archive::text_iarchive>::type" encountered.
"./boost/archive/text_oarchive.hpp", line 121: Error: Multiple declaration for adjust_counter.
"./boost/archive/text_oarchive.hpp", line 121: Error: Unexpected type name "get_counter<boost::archive::text_oarchive>::type" encountered.
"./boost/archive/text_wiarchive.hpp", line 132: Error: Multiple declaration for adjust_counter.
"./boost/archive/text_wiarchive.hpp", line 132: Error: Unexpected type name "get_counter<boost::archive::text_wiarchive>::type" encountered.
"./boost/archive/text_woarchive.hpp", line 146: Error: Multiple declaration for adjust_counter.
"./boost/archive/text_woarchive.hpp", line 146: Error: Unexpected type name "get_counter<boost::archive::text_woarchive>::type" encountered.
"./boost/archive/xml_iarchive.hpp", line 146: Error: Multiple declaration for adjust_counter.
"./boost/archive/xml_iarchive.hpp", line 146: Error: Unexpected type name "get_counter<boost::archive::xml_iarchive>::type" encountered.
"./boost/archive/xml_oarchive.hpp", line 135: Error: Multiple declaration for adjust_counter.
"./boost/archive/xml_oarchive.hpp", line 135: Error: Unexpected type name "get_counter<boost::archive::xml_oarchive>::type" encountered.
"./boost/archive/xml_wiarchive.hpp", line 152: Error: Multiple declaration for adjust_counter.
"./boost/archive/xml_wiarchive.hpp", line 152: Error: Unexpected type name "get_counter<boost::archive::xml_wiarchive>::type" encountered.
"./boost/archive/xml_woarchive.hpp", line 142: Error: Multiple declaration for adjust_counter.
"./boost/archive/xml_woarchive.hpp", line 142: Error: Unexpected type name "get_counter<boost::archive::xml_woarchive>::type" encountered.
"./boost/math/cstdfloat/cstdfloat_types.hpp", line 378: Error: The type "boost::STATIC_ASSERTION_FAILURE<0>" is incomplete.
"/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_algo.c", line 436: Error: The function "lrand48" must have a prototype.
"/usr/include/stdlib.h", line 113: Error: putenv(char*) was declared before with a different language.
"libs/atomic/src/lockpool.cpp", line 74: Error: "}" expected instead of ",".
"libs/context/src/unsupported.cpp", line 7: Error: #error "platform not supported".
"libs/log/src/date_time_format_parser.cpp", line 399: Error: Linker scopes may not change after symbol definition.
"libs/log/src/date_time_format_parser.cpp", line 412: Error: Linker scopes may not change after symbol definition.
IMO 任何体面的 C++ 编译器都应该能够构建 Boost,因为我几乎无法想象没有 Boost 库的任何严肃的 C++ 项目。所以我只是想知道 Boost 或 Solaris Studio 开发人员是否会阅读这篇文章并帮助我解决一些补丁......
非常感谢任何提示!