[Spirit/Graph] New 1.40.0 compile errors in Spirit/Graph headers when using GCC with _GLIBCXX_DEBUG

When I compile this script (saved as test.cpp) which includes a pair of Boost Graph headers : #include <boost/graph/adjacency_list.hpp> #include <boost/graph/depth_first_search.hpp> int main() { return 0; } ...using the compile command : g++ -I/usr/include/boost -D_GLIBCXX_DEBUG test.cpp -o test ...I get (this warning and) these errors from the Boost Spirit library: In file included from /usr/include/c++/4.3/backward/hash_set:64, from /usr/include/boost/graph/adjacency_list.hpp:25, from test.cpp:1: /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. In file included from /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp:23, from /usr/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp:17, from /usr/include/boost/spirit/home/phoenix/algorithm.hpp:11, from /usr/include/boost/spirit/home/phoenix.hpp:10, from /usr/include/boost/graph/depth_first_search.hpp:24, from test.cpp:2: /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:38: error: wrong number of template arguments (4, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:28: error: provided for ‘template<class T> struct boost::is_std_map’ /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:38: error: expected unqualified-id before ‘>’ token /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:53: error: wrong number of template arguments (4, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:43: error: provided for ‘template<class T> struct boost::is_std_multimap’ /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:53: error: expected unqualified-id before ‘>’ token In file included from /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp:24, from /usr/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp:17, from /usr/include/boost/spirit/home/phoenix/algorithm.hpp:11, from /usr/include/boost/spirit/home/phoenix.hpp:10, from /usr/include/boost/graph/depth_first_search.hpp:24, from test.cpp:2: /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:37: error: wrong number of template arguments (3, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:28: error: provided for ‘template<class T> struct boost::is_std_set’ /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:37: error: expected unqualified-id before ‘>’ token /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:51: error: wrong number of template arguments (3, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:42: error: provided for ‘template<class T> struct boost::is_std_multiset’ /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_set.hpp:51: error: expected unqualified-id before ‘>’ token In file included from /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_sort.hpp:22, from /usr/include/boost/spirit/home/phoenix/stl/algorithm/transformation.hpp:17, from /usr/include/boost/spirit/home/phoenix/algorithm.hpp:12, from /usr/include/boost/spirit/home/phoenix.hpp:10, from /usr/include/boost/graph/depth_first_search.hpp:24, from test.cpp:2: /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_list.hpp:36: error: wrong number of template arguments (2, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_list.hpp:28: error: provided for ‘template<class T> struct boost::is_std_list’ /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_list.hpp:36: error: expected unqualified-id before ‘>’ token I don't get the errors if I use this compile command which doesn't define _GLIBCXX_DEBUG : g++ -I/usr/include/boost test.cpp -o test ...and I don't get the errors if I use this compile command which uses the previous 1.39 libraries : g++ -I/usr/include/boost-1_39 -D_GLIBCXX_DEBUG test.cpp -o test If I reverse the order of the headers when using the original compile command, I still get errors but different errors. My compiler is gcc 4.3.3 (Ubuntu 4.3.3-5ubuntu4), my OS is Ubuntu 9.04 and my kernel is 2.6.28-15-generic. Many thanks in advance for any help. _________________________________________________________________ View your other email accounts from your Hotmail inbox. Add them now. http://clk.atdmt.com/UKM/go/167688463/direct/01/

On Wed, 9 Sep 2009, Tony Lewis wrote:
When I compile this script (saved as test.cpp) which includes a pair of Boost Graph headers :
#include <boost/graph/adjacency_list.hpp> #include <boost/graph/depth_first_search.hpp> int main() { return 0; }
...using the compile command :
g++ -I/usr/include/boost -D_GLIBCXX_DEBUG test.cpp -o test
...I get (this warning and) these errors from the Boost Spirit library:
In file included from /usr/include/c++/4.3/backward/hash_set:64, from /usr/include/boost/graph/adjacency_list.hpp:25, from test.cpp:1: /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Plea se use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
None of the errors are from Boost.Graph. This warning is because BGL uses the various compiler extension headers (automatically chosen) to use hash tables. Changing it to use TR1 or Boost.TR1 would be good for the future, though. -- Jeremiah Willcock

AMDG Tony Lewis wrote:
In file included from /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp:23, from /usr/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp:17, from /usr/include/boost/spirit/home/phoenix/algorithm.hpp:11, from /usr/include/boost/spirit/home/phoenix.hpp:10, from /usr/include/boost/graph/depth_first_search.hpp:24, from test.cpp:2: /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:38: error: wrong number of template arguments (4, should be 1) /usr/include/boost/spirit/home/phoenix/stl/algorithm/detail/./is_std_map.hpp:28: error: provided for ‘template<class T> struct boost::is_std_map’ <snip>
This has been fixed in the trunk, but Phoenix seems to have a bunch of unmerged changes. In Christ, Steven Watanabe

This has been fixed in the trunk, but Phoenix seems to have a bunch of unmerged changes.
In Christ, Steven Watanabe
Thanks very much for your help. I have found that applying the changes you made in revision 53262 (https://svn.boost.org/trac/boost/changeset/53262) to 1.40.0 solve this problem for me. I'm a newbie and I'm afraid I don't know the policy on merging fixes from trunk to releases but I would support getting this applied to 1.40.0 if it's possible. The issue is solved for me but it would be nice to avoid other users hitting it. I suspect this is what you are referring to by the unmerged changes in Phoenix. No worries if this isn't achievable for whatever reason. Thanks again and kind regards (I'm afraid I'll stick to that valediction as I'm not amongst the faithful :-) ), Tony Lewis _________________________________________________________________ Save time by using Hotmail to access your other email accounts. http://clk.atdmt.com/UKM/go/167688463/direct/01/
participants (3)
-
Jeremiah Willcock
-
Steven Watanabe
-
Tony Lewis