Boost C++ Libraries: Ticket #10546: Unable to build a project using boost coroutine using gcc 4.4.7 https://svn.boost.org/trac10/ticket/10546 <p> I am unable to build a simple project using boost coroutine on machines using gcc 4.4.7 (centos6.4, redhat 6.0, 6.1, etc). The same project builds fine using machines running gcc 4.8.3 (fedora 19, centos 7.0). </p> <p> Since the <a href="http://www.boost.org/users/history/version_1_55_0.html">Boost 1.55 version history</a> does list gcc 4.4.7 as a tested compiler, this likely means a regression. </p> <p> The simple test file consists of the following main.cpp file: </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/utility/enable_if.hpp&gt; #include &lt;boost/type_traits/is_convertible.hpp&gt; #include &lt;boost/coroutine/coroutine.hpp&gt; #include &lt;boost/function.hpp&gt; #include &lt;boost/bind.hpp&gt; using namespace std; typedef boost::coroutines::coroutine&lt;int()&gt; routine_t; // The implementation routine of the coroutine. void xrange_impl(routine_t::caller_type&amp; yield, int limit) { for(int i = 0; i &lt; limit; i++) { yield(i); // return results back to the caller } } int main() { routine_t foo(boost::bind(xrange_impl, _1, 10000)); return 0; }; </pre><p> The compile errors that I am getting are: </p> <pre class="wiki">Building CXX object corotest/CMakeFiles/corotest.dir/src/main.cpp.o In file included from /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:29, from /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:3: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp: In instantiation of ‘boost::detail::is_function_chooser&lt;false&gt;::result_&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp:60: instantiated from ‘boost::detail::is_function_impl&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp:102: instantiated from ‘boost::is_function&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:354: instantiated from ‘const bool boost::detail::is_convertible_impl&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;::value’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:480: instantiated from ‘boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if&lt;boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;, boost::coroutines::coroutine&lt;int(), 0&gt;::dummy*&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: instantiated from here /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp:52: error: forming pointer to reference type ‘boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;’ In file included from /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:29, from /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:3: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp: In instantiation of ‘boost::is_function&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:354: instantiated from ‘const bool boost::detail::is_convertible_impl&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;::value’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:480: instantiated from ‘boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if&lt;boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;, boost::coroutines::coroutine&lt;int(), 0&gt;::dummy*&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: instantiated from here /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp:102: error: ‘value’ is not a member of ‘boost::detail::is_function_impl&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ In file included from /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:3: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp: In instantiation of ‘const bool boost::detail::is_convertible_impl&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;::value’: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:480: instantiated from ‘boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if&lt;boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;, boost::coroutines::coroutine&lt;int(), 0&gt;::dummy*&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: instantiated from here /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:354: error: ‘value’ is not a member of ‘boost::is_function&lt;boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ In file included from /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:3: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp: In instantiation of ‘boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if&lt;boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;, boost::coroutines::coroutine&lt;int(), 0&gt;::dummy*&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: instantiated from here /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_convertible.hpp:480: error: ‘boost::detail::is_convertible_impl&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;::value’ is not a valid template argument for type ‘bool’ because it is a non-constant expression In file included from /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:2: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp: In instantiation of ‘boost::disable_if&lt;boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;, boost::coroutines::coroutine&lt;int(), 0&gt;::dummy*&gt;’: /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: instantiated from here /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: error: ‘value’ is not a member of ‘boost::is_convertible&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;&amp;, boost::rv&lt;boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt; &gt;&amp;&gt;’ /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp: In function ‘int main()’: /users/mtomer/mike/mysqlcpp_umbrella/corotest/src/main.cpp:22: error: no matching function for call to ‘boost::coroutines::coroutine&lt;int(), 0&gt;::coroutine(boost::_bi::bind_t&lt;void, void (*)(boost::coroutines::coroutine&lt;void(int), 1&gt;&amp;, int), boost::_bi::list2&lt;boost::arg&lt;1&gt;, boost::_bi::value&lt;int&gt; &gt; &gt;)’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/coroutine/v1/coroutine.hpp:600: note: candidates are: boost::coroutines::coroutine&lt;Signature, 0&gt;::coroutine(boost::rv&lt;boost::coroutines::coroutine&lt;Signature, 0&gt; &gt;&amp;) [with Signature = int()] /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/coroutine/v1/coroutine.hpp:155: note: boost::coroutines::coroutine&lt;Signature, 0&gt;::coroutine() [with Signature = int()] /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/coroutine/v1/coroutine.hpp:119: note: boost::coroutines::coroutine&lt;Signature, 0&gt;::coroutine(boost::coroutines::coroutine&lt;Signature, 0&gt;&amp;) [with Signature = int()] make[2]: *** [corotest/CMakeFiles/corotest.dir/src/main.cpp.o] Error 1 make[1]: *** [corotest/CMakeFiles/corotest.dir/all] Error 2 make: *** [all] Error 2 </pre><p> Output from "gcc --version" on the machine where it will NOT build is: </p> <pre class="wiki">$ gcc --version gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. </pre><p> Output from "gcc --version" on the machine where it will build is: </p> <pre class="wiki">$ gcc --version gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10546 Trac 1.4.3 Michael Tomer <Jester3141@…> Fri, 26 Sep 2014 19:35:35 GMT attachment set https://svn.boost.org/trac10/ticket/10546 https://svn.boost.org/trac10/ticket/10546 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> Ticket olli Fri, 26 Sep 2014 20:37:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10546#comment:1 https://svn.boost.org/trac10/ticket/10546#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> sorry, is too old gcc-4.4 and boost.coroutine did never compile with this version </p> Ticket