在OS X 10.8.4 Mountain Lion下增加1.54构建错误

时间:2013-08-12 04:39:26

标签: xcode macos boost

大多数增强库使用xcode命令行工具在山狮下成功构建。但在构建期间收到了4个错误:

./boost/utility/result_of.hpp:174
./boost/proto/transform/default.hpp:135
./boost/log/detail/light_function_pp.hpp:280
./boost/log/detail/custom_terminal_spec.hpp:54

有没有人面临同样的问题?我该如何解决错误?

今天早上尝试在Linux下构建并收到同样的错误。使用gcc 4.1.2。

完整错误消息:

./boost/utility/result_of.hpp:174: error: invalid use of undefined type 'struct boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::ex\
pressions::has_attribute<void> >::result<const boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> > \
()(boost::phoenix::vector2<boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<bo\
ost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> > >, 0l> >*, const boost::log::v2_mt_posix::attribu\
te_value_set&>&, const boost::phoenix::default_actions&>)>'
./boost/log/detail/unary_function_terminal.hpp:63: error: declaration of 'struct boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::e\
xpressions::has_attribute<void> >::result<const boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> >\
 ()(boost::phoenix::vector2<boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<b\
oost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> > >, 0l> >*, const boost::log::v2_mt_posix::attrib\
ute_value_set&>&, const boost::phoenix::default_actions&>)>'
./boost/log/detail/custom_terminal_spec.hpp:54: error: no type named 'type' in 'struct boost::result_of<const boost::log::v2_mt_posix::expressions::aux::unary_function_termin\
al<boost::log::v2_mt_posix::expressions::has_attribute<void> > ()(boost::phoenix::vector2<boost::phoenix::vector2<const boost::phoenix::actor<boost::proto::exprns_::expr<boos\
t::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attr\
ibute<void> > >, 0l> >*, const boost::log::v2_mt_posix::attribute_value_set&>&, const boost::phoenix::default_actions&>)>'
./boost/log/detail/light_function_pp.hpp:77: error: no match for call to '(boost::phoenix::actor<boost::log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log\
::v2_mt_posix::expressions::has_attribute<void> > >) (const boost::log::v2_mt_posix::attribute_value_set&)'
./boost/phoenix/core/actor.hpp:240: note: candidates are: typename boost::phoenix::result_of::actor<typename boost::mpl::eval_if_c<boost::mpl::or_<boost::phoenix::is_custom_t\
erminal<Expr, void>,mpl_::bool_<boost::is_placeholder<T>::value>,mpl_::bool_<false>,mpl_::bool_<false>,mpl_::bool_<false> >::value, boost::proto::terminal<T>, boost::mpl::ide\
ntity<T> >::type::proto_base_expr, void, void, void, void, void, void, void, void, void, void, void>::type boost::phoenix::actor<Expr>::operator()() [with Expr = boost::log::\
v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> >]
./boost/phoenix/core/actor.hpp:249: note:                 typename boost::phoenix::result_of::actor<typename boost::mpl::eval_if_c<boost::mpl::or_<boost::phoenix::is_custom_t\
erminal<Expr, void>,mpl_::bool_<boost::is_placeholder<T>::value>,mpl_::bool_<false>,mpl_::bool_<false>,mpl_::bool_<false> >::value, boost::proto::terminal<T>, boost::mpl::ide\
ntity<T> >::type::proto_base_expr, void, void, void, void, void, void, void, void, void, void, void>::type boost::phoenix::actor<Expr>::operator()() const [with Expr = boost:\
:log::v2_mt_posix::expressions::aux::unary_function_terminal<boost::log::v2_mt_posix::expressions::has_attribute<void> >]

1 个答案:

答案 0 :(得分:1)

根据Igor R的提示,我在linux上尝试了gcc 4.8.1,效果很好。 然后我认为c ++ 11可能会在错误中发挥作用,并试图找到如何获得c ++ 11。 所以最终我得到了它的工作。 XCode附带两套工具。 gcc前端+ llvm后端和clang前端+ llvm后端。 gcc版本在我的机器上是旧的(4.2),clang支持c ++ 11,所以一旦我使用“toolset = clang”,我就可以成功编译所有内容。