在OSX Mavericks + Xcode 5下无法构建1.55的提升

时间:2014-02-19 20:46:42

标签: macos c++11 boost xcode5 clang

当我尝试在我的Mac机器上构建boost时,库本身构建正常但是它甚至无法构建累加器回归测试。这是我的所作所为:

tar -xzf ../boost_1_55_0.tar.gz
mkdir /tmp/boost
mkdir /tmp/boost/build
mkdir /tmp/boost/install
cd boost_1_55_0
./bootstrap.sh
./b2 toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ linkflags=-stdlib=libc++ -j2 --prefix=/tmp/boost/install --build-dir=/tmp/boost/build variant=release link=static threading=multi install
cd libs/accumulators/test
../../../b2 toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ linkflags=-stdlib=libc++ -j2 --build-dir=/tmp/boost/build

我得到的错误是:

clang-darwin.compile.c++ 

/tmp/boost/build/boost/bin.v2/libs/accumulators/test/valarray.test/clang-darwin-4.2.1/debug/link-static/valarray.o
In file included from valarray.cpp:18:
../../../boost/accumulators/statistics/weighted_mean.hpp:73:13: error: no matching constructor for initialization of 'result_type' (aka 'valarray<typename divides<left_value_type, const double>::result_type>')
      : mean(
        ^
../../../boost/accumulators/framework/depends_on.hpp:319:17: note: in instantiation of function template specialization 'boost::accumulators::impl::immediate_weighted_mean_impl<std::__1::valarray<int>, int, boost::accumulators::tag::sample>::immediate_weighted_mean_impl<boost::parameter::aux::arg_list<const boost::parameter::aux::tagged_argument<boost::accumulators::tag::sample, const std::__1::valarray<int> >, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<std::__1::valarray<int>, boost::accumulators::stats<boost::accumulators::tag::weighted_mean (boost::accumulators::immediate), mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, int> >, boost::parameter::aux::empty_arg_list> > >' requested here
          : Accumulator(args)
            ^
../../../boost/accumulators/framework/depends_on.hpp:252:29: note: in instantiation of function template specialization 'boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::immediate_weighted_mean_impl<std::__1::valarray<int>, int, boost::accumulators::tag::sample>, boost::accumulators::tag::immediate_weighted_mean>::accumulator_wrapper<boost::parameter::aux::arg_list<const boost::parameter::aux::tagged_argument<boost::accumulators::tag::sample, const std::__1::valarray<int> >, boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<std::__1::valarray<int>, boost::accumulators::stats<boost::accumulators::tag::weighted_mean (boost::accumulators::immediate), mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, int> >, boost::parameter::aux::empty_arg_list> > >' requested here

还有其他人看到这个吗?这是一个已知的提升错误吗?

1 个答案:

答案 0 :(得分:0)

尝试改为:

./b2 toolset=clang cxxflags=-stdlib=libstdc++ linkflags=-stdlib=libstdc++ -j2 --prefix=/tmp/boost/install --build-dir=/tmp/boost/build variant=release link=static threading=multi install

我已经获得了使用这些标志在10.9.2上编译的提升,因为它似乎至少通过了你提到的累加器测试。