Не умеет компилировать

Я использую Ubuntu 12.04 и gcc 4.8, мой gfortran только что обновился до 4.8, некоторые я не смог скомпилировать, вот ошибки:

In file included from /home/rtbkit/local/include/boost/tuple/tuple.hpp:33:0,
from ./jml/boosting/tools/boosting_tool_common.h:16,
from ./jml/boosting/tools/boosting_tool_common.cc:10:
/home/rtbkit/local/include/boost/tuple/detail/tuple_basic.hpp: In function 'typename    boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type boost::tuples::get(const boost::tuples::cons<HT, TT>&)':
/home/rtbkit/local/include/boost/tuple/detail/tuple_basic.hpp:228:31: error: typedef 'cons_element' locally defined but not used [-Werror=unused-local-typedefs]
typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
^
In file included from /home/rtbkit/local/include/boost/multi_array/concept_checks.hpp:21:0,
from /home/rtbkit/local/include/boost/multi_array/base.hpp:28,
from /home/rtbkit/local/include/boost/multi_array.hpp:21,
from ./jml/boosting/classifier.h:20,
from ./jml/boosting/tools/boosting_tool_common.cc:14:
/home/rtbkit/local/include/boost/concept_check.hpp: In function 'void boost::function_requires (Model*)':
/home/rtbkit/local/include/boost/concept_check.hpp:45:113: error: typedef 'boost_concept_check45' locally defined but not used [-Werror=unused-local-typedefs]
BOOST_CONCEPT_ASSERT((Model));

^
typedef typename Array::index_range index_range;
^
/home/rtbkit/local/include/boost/multi_array/concept_checks.hpp:43:37: error: typedef 'index' locally defined but not used [-Werror=unused-local-typedefs]
typedef typename Array::index index;
^
/home/rtbkit/local/include/boost/multi_array/concept_checks.hpp: In static member function 'static void boost::multi_array_concepts::detail::idgen_helper<0ul>::call(Array&, const IdxGen&, Call_Type)':
^
In file included from /home/rtbkit/local/include/boost/regex/v4/regex.hpp:79:0,
from /home/rtbkit/local/include/boost/regex.hpp:31,
from ./jml/boosting/tools/boosting_tool_common.cc:18:
/home/rtbkit/local/include/boost/regex/v4/regex_format.hpp: In member function 'OutputIter boost::re_detail::format_functor_c_string<charT, Match, Traits>::operator()(const Match&,  , boost::regex_constants::match_flag_type, const Traits&)':

/home/rtbkit/local/include/boost/regex/v4/regex_format.hpp:1086:41: error: typedef 'char_type'   locally defined but not used [-Werror=unused-local-typedefs]
typedef typename Match::char_type char_type;
^
In file included from /home/rtbkit/local/include/boost/regex/v4/regex.hpp:166:0,
from /home/rtbkit/local/include/boost/regex.hpp:31,
from ./jml/boosting/tools/boosting_tool_common.cc:18:
/home/rtbkit/local/include/boost/regex/v4/regex_split.hpp: In function 'std::size_t boost::regex_split(OutputIterator, std::basic_string<charT, Traits1, Alloc1>&, const boost::basic_regex<charT, Traits2>&, boost::regex_constants::match_flag_type, std::size_t)':
/home/rtbkit/local/include/boost/regex/v4/regex_split.hpp:110:57: error: typedef 'match_allocator' locally defined but not used [-Werror=unused-local-typedefs]
typedef typename match_results<ci_t>::allocator_type                        match_allocator;
^
cc1plus: all warnings being treated as errors
make: ***     [build/x86_64/obj/jml/boosting/tools/boosting_tool_common.3ec7a8f7cea9a8b0de95729f9e9210cd.lo] Error 1

Что не так с моими библиотеками? Я проверил версию gfortran 4.8.

1

Решение

Эта ошибка возникает при компиляции rtbkit с GCC 4.8.

Наконец-то сработало у меня

nano /home/rtbkit/rtbkit/Makefile

добавить флаг компилятора -Wno-неиспользованные-местные-определения типов в CXXFLAGS

CXXFLAGS += -Wno-unused-local-typedefs -Wno-deprecated ...
3

Другие решения


По вопросам рекламы [email protected]