Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3937

Cannot compile 0.10.0 development tip with gcc-4.6.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • C++ - Compiler
    • None
    • Ubuntu 12.04.5 LTS with gcc-4.6.3 and boost 1.53.0, Ubuntu 14.04.2 LTS with gcc-4.6.4 and boost-1.54.0

    Description

      While building the tip using cmake:

      [ 51%] Building CXX object compiler/cpp/CMakeFiles/thriftc_static.dir/src/thrift/plugin/plugin_output.cc.o
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_enum, To = apache::thrift::plugin::t_enum]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:181:3: error: no matching function for call to ‘transform(std::vector<t_enum_value*>::const_iterator, std::vector<t_enum_value*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_enum_value> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:181:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_const_value, To = apache::thrift::plugin::t_const_value]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:212:5: error: no matching function for call to ‘transform(std::vector<t_const_value*>::const_iterator, std::vector<t_const_value*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_const_value> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:212:5: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_struct, To = apache::thrift::plugin::t_struct]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:235:3: error: no matching function for call to ‘transform(std::vector<t_field*>::const_iterator, std::vector<t_field*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_field> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:235:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_service, To = apache::thrift::plugin::t_service]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:267:3: error: no matching function for call to ‘transform(std::vector<t_function*>::const_iterator, std::vector<t_function*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_function> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:267:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_program, To = apache::thrift::plugin::t_program]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:360:3: error: no matching function for call to ‘transform(std::vector<t_program*>::iterator, std::vector<t_program*>::iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_program> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:360:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      make[2]: *** [compiler/cpp/CMakeFiles/thriftc.dir/src/thrift/plugin/plugin_output.cc.o] Error 1
      make[1]: *** [compiler/cpp/CMakeFiles/thriftc.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs....
      [ 52%] Building CXX object compiler/cpp/CMakeFiles/thriftc_static.dir/src/thrift/plugin/plugin.cc.o
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_enum, To = apache::thrift::plugin::t_enum]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:181:3: error: no matching function for call to ‘transform(std::vector<t_enum_value*>::const_iterator, std::vector<t_enum_value*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_enum_value> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:181:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_const_value, To = apache::thrift::plugin::t_const_value]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:212:5: error: no matching function for call to ‘transform(std::vector<t_const_value*>::const_iterator, std::vector<t_const_value*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_const_value> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:212:5: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_struct, To = apache::thrift::plugin::t_struct]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:235:3: error: no matching function for call to ‘transform(std::vector<t_field*>::const_iterator, std::vector<t_field*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_field> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:235:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_service, To = apache::thrift::plugin::t_service]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:267:3: error: no matching function for call to ‘transform(std::vector<t_function*>::const_iterator, std::vector<t_function*>::const_iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_function> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:267:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc: In function ‘void plugin_output::convert(From*, To&) [with From = t_program, To = apache::thrift::plugin::t_program]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:360:3: error: no matching function for call to ‘transform(std::vector<t_program*>::iterator, std::vector<t_program*>::iterator, std::back_insert_iterator<std::vector<apache::thrift::plugin::t_program> >, <unresolved overloaded function type>)’
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin_output.cc:360:3: note: candidates are:
      /usr/include/c++/4.6/bits/stl_algo.h:4871:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
      /usr/include/c++/4.6/bits/stl_algo.h:4907:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
      make[2]: *** [compiler/cpp/CMakeFiles/thriftc_static.dir/src/thrift/plugin/plugin_output.cc.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc: In function ‘void apache::thrift::plugin::convert(const From&, To*) [with From = apache::thrift::plugin::t_enum, To = t_enum]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc:220:86: error: no match for call to ‘(const boost::range_detail::forwarder<boost::range_detail::transform_holder>) (<unresolved overloaded function type>)’
      /usr/include/boost/range/adaptor/argument_fwd.hpp:42:16: note: candidate is:
      /usr/include/boost/range/adaptor/argument_fwd.hpp:45:23: note: template<class T> Holder<T> boost::range_detail::forwarder::operator()(T) const [with T = T, Holder = boost::range_detail::transform_holder]
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc: In function ‘void apache::thrift::plugin::convert(const From&, To*) [with From = apache::thrift::plugin::t_const_value, To = t_const_value]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc:257:89: error: no match for call to ‘(const boost::range_detail::forwarder<boost::range_detail::transform_holder>) (<unresolved overloaded function type>)’
      /usr/include/boost/range/adaptor/argument_fwd.hpp:42:16: note: candidate is:
      /usr/include/boost/range/adaptor/argument_fwd.hpp:45:23: note: template<class T> Holder<T> boost::range_detail::forwarder::operator()(T) const [with T = T, Holder = boost::range_detail::transform_holder]
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc: In function ‘void apache::thrift::plugin::convert(const From&, To*) [with From = apache::thrift::plugin::t_struct, To = t_struct]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc:284:79: error: no match for call to ‘(const boost::range_detail::forwarder<boost::range_detail::transform_holder>) (<unresolved overloaded function type>)’
      /usr/include/boost/range/adaptor/argument_fwd.hpp:42:16: note: candidate is:
      /usr/include/boost/range/adaptor/argument_fwd.hpp:45:23: note: template<class T> Holder<T> boost::range_detail::forwarder::operator()(T) const [with T = T, Holder = boost::range_detail::transform_holder]
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc: In function ‘void apache::thrift::plugin::convert(const From&, To*) [with From = apache::thrift::plugin::t_service, To = t_service]’:
      /home/jking/thrift/compiler/cpp/src/thrift/plugin/plugin.cc:311:84: error: no match for call to ‘(const boost::range_detail::forwarder<boost::range_detail::transform_holder>) (<unresolved overloaded function type>)’
      /usr/include/boost/range/adaptor/argument_fwd.hpp:42:16: note: candidate is:
      /usr/include/boost/range/adaptor/argument_fwd.hpp:45:23: note: template<class T> Holder<T> boost::range_detail::forwarder::operator()(T) const [with T = T, Holder = boost::range_detail::transform_holder]
      make[2]: *** [compiler/cpp/CMakeFiles/thriftc_static.dir/src/thrift/plugin/plugin.cc.o] Error 1
      make[1]: *** [compiler/cpp/CMakeFiles/thriftc_static.dir/all] Error 2
      

      Workaround for gcc before 4.8 is to build using WITH_PLUGIN=OFF.

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              jking3 James E. King III
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: