Opened 8 years ago
Closed 8 years ago
#10546 closed Support Requests (wontfix)
Unable to build a project using boost coroutine using gcc 4.4.7
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | coroutine |
Version: | Boost 1.55.0 | Severity: | Regression |
Keywords: | Cc: |
Description
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).
Since the Boost 1.55 version history does list gcc 4.4.7 as a tested compiler, this likely means a regression.
The simple test file consists of the following main.cpp file:
#include <iostream> #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_convertible.hpp> #include <boost/coroutine/coroutine.hpp> #include <boost/function.hpp> #include <boost/bind.hpp> using namespace std; typedef boost::coroutines::coroutine<int()> routine_t; // The implementation routine of the coroutine. void xrange_impl(routine_t::caller_type& yield, int limit) { for(int i = 0; i < limit; i++) { yield(i); // return results back to the caller } } int main() { routine_t foo(boost::bind(xrange_impl, _1, 10000)); return 0; };
The compile errors that I am getting are:
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<false>::result_<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’: /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<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/type_traits/is_function.hpp:102: instantiated from ‘boost::is_function<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>::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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if<boost::is_convertible<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>, boost::coroutines::coroutine<int(), 0>::dummy*>’ /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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&’ 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<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’: /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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>::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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if<boost::is_convertible<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>, boost::coroutines::coroutine<int(), 0>::dummy*>’ /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<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ 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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>::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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if<boost::is_convertible<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>, boost::coroutines::coroutine<int(), 0>::dummy*>’ /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<boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ 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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’: /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/utility/enable_if.hpp:59: instantiated from ‘boost::disable_if<boost::is_convertible<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>, boost::coroutines::coroutine<int(), 0>::dummy*>’ /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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>::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<boost::is_convertible<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>, boost::coroutines::coroutine<int(), 0>::dummy*>’: /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<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >&, boost::rv<boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > > >&>’ /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<int(), 0>::coroutine(boost::_bi::bind_t<void, void (*)(boost::coroutines::coroutine<void(int), 1>&, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >)’ /users/mtomer/mike/mysqlcpp_umbrella/build/externals/boost/boost_build/install/include/boost/coroutine/v1/coroutine.hpp:600: note: candidates are: boost::coroutines::coroutine<Signature, 0>::coroutine(boost::rv<boost::coroutines::coroutine<Signature, 0> >&) [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<Signature, 0>::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<Signature, 0>::coroutine(boost::coroutines::coroutine<Signature, 0>&) [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
Output from "gcc --version" on the machine where it will NOT build is:
$ 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.
Output from "gcc --version" on the machine where it will build is:
$ 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.
Attachments (1)
Change History (2)
by , 8 years ago
comment:1 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
sorry, is too old gcc-4.4 and boost.coroutine did never compile with this version