[
https://issues.apache.org/jira/browse/THRIFT-3937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15540439#comment-15540439
]
ASF GitHub Bot commented on THRIFT-3937:
----------------------------------------
Github user nsuke commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1101#discussion_r81470826
--- Diff: build/cmake/DefineOptions.cmake ---
@@ -164,31 +164,36 @@ message(STATUS "Thrift package version:
${PACKAGE_VERSION}
message(STATUS "Build configuration Summary")
message(STATUS " Build Thrift compiler:
${BUILD_COMPILER}")
message(STATUS " Build compiler plugin support:
${WITH_PLUGIN}")
+if (WITH_PLUGIN_COMPILER_TOO_OLD)
+ MESSAGE_DEP(WITH_PLUGIN "Disabled due to older compiler")
+else()
+ MESSAGE_DEP(WITH_PLUGIN "Disabled by WITH_PLUGIN=OFF")
--- End diff --
I mean, for example, `WITH_CPP` is a flag that users can directly set
ON/OFF while `BUILD_CPP` is an internal flag that is based on `WITH_CPP` but
can be disabled by `Boost-FOUND=OFF`.
The problem for `WITH_PLUGIN` is that, we're directly modifying this flag
without internal equivalent, based on `BUILD_CPP` and `BUILD_COMPILER` values.
So we cannot tell what ON/OFF value the user has put to it.
About autotools flag, try `--enable-plugin=no` instead.
Internally inside configure.ac, with/without flags seemed to be tied to
libraries so I used `enable` flag instead.
> Cannot compile 0.10.0 development tip with gcc-4.6.x
> ----------------------------------------------------
>
> Key: THRIFT-3937
> URL: https://issues.apache.org/jira/browse/THRIFT-3937
> Project: Thrift
> Issue Type: Bug
> Components: Build Process
> Affects Versions: 0.10.0
> Environment: 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
> Reporter: James E. King, III
> Assignee: Aki Sukegawa
>
> While building the tip using cmake:
> {noformat}
> [ 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
> {noformat}
> Workaround for gcc before 4.8 is to build using WITH_PLUGIN=OFF.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)