Boost logo

Boost Users :

Subject: [Boost-users] [Spirit/Graph] New 1.40.0 compile errors in Spirit/Graph headers when using GCC with _GLIBCXX_DEBUGþ
From: Tony Lewis (tonyelewis_at_[hidden])
Date: 2009-09-09 07:41:49


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/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net