[Property map] 1.40.0 breaks boost.graph python bindings

I'm using gcc 4.2.4 on Ubuntu. The boost.graph python bindings (http://www.osl.iu.edu/~dgregor/bgl-python/) work fine with boost 1.39. When I try with boost 1.40 I get many errors such as the following: ./boost/graph/python/resizable_property_map.hpp:101: error: ‘class boost::vector_property_map< boost::default_color_type, boost::graph::python::basic_index_map< boost::graph::python::basic_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag, void *>, boost::bidirectionalS>, boost::adj_list_edge_property_map< boost::bidirectional_tag, long unsigned int, const long unsigned int &, void *, const boost::property<boost::edge_index_t, long unsigned int, boost::no_property>, boost ::edge_index_t>>>’ has no member named ‘get_store’ Does anyone know what changed between 1.39 and 1.40 to break this? The Readme.txt that comes with boost 1.40 suggests that nothing was updated in the property map library. BTW it doesn't compile with gcc 4.3 either but then neither does it compile with boost 1.39 (albeit for different reasons). I can provide all of the error messages if needed. John.

On Fri, 9 Oct 2009, John Reid wrote:
I'm using gcc 4.2.4 on Ubuntu. The boost.graph python bindings (http://www.osl.iu.edu/~dgregor/bgl-python/) work fine with boost 1.39. When I try with boost 1.40 I get many errors such as the following:
./boost/graph/python/resizable_property_map.hpp:101: error: ‘class boost::vector_property_map< boost::default_color_type, boost::graph::python::basic_index_map<
boost::graph::python::basic_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag, void *>, boost::bidirectionalS>, boost::adj_list_edge_property_map< boost::bidirectional_tag, long unsigned int, const long unsigned int &, void *, const boost::property<boost::edge_index_t, long unsigned int, boost::no_property>, boost ::edge_index_t>>>’ has no member named ‘get_store’
Does anyone know what changed between 1.39 and 1.40 to break this? The Readme.txt that comes with boost 1.40 suggests that nothing was updated in the property map library.
BTW it doesn't compile with gcc 4.3 either but then neither does it compile with boost 1.39 (albeit for different reasons).
I can provide all of the error messages if needed.
The BGL Python bindings are not part of Boost and are, as far as I know, not currently maintained. You would need to ask Doug about them directly. -- Jeremiah Willcock

On Fri, 9 Oct 2009, John Reid wrote:
Jeremiah Willcock wrote:
The BGL Python bindings are not part of Boost and are, as far as I know, not currently maintained. You would need to ask Doug about them directly.
I was asking about property map.
The code that you are using is from the BGL Python bindings (from the URL that you gave); Boost.PropertyMap does not have Python bindings as an official part of Boost either. The only change in 1.40 for Boost.PropertyMap is that the headers are in a single directory and the layout of libs/property_map is cleaned up. It does not appear that the function that your error message reports as missing has been in Boost.PropertyMap recently. It could be that the Python bindings replace or modify some file that has been moved in Boost 1.40. -- Jeremiah Willcock

Jeremiah Willcock wrote:
The code that you are using is from the BGL Python bindings (from the URL that you gave); Boost.PropertyMap does not have Python bindings as an official part of Boost either. The only change in 1.40 for Boost.PropertyMap is that the headers are in a single directory and the layout of libs/property_map is cleaned up. It does not appear that the function that your error message reports as missing has been in Boost.PropertyMap recently. It could be that the Python bindings replace or modify some file that has been moved in Boost 1.40.
It doesn't seem like that could be the case. All I do is change the BOOST_ROOT environment variable and rebuild the python bindings. Against 1.40 it won't compile. Against 1.39 it works fine. I'll double check my environment.

John Reid wrote:
It doesn't seem like that could be the case. All I do is change the BOOST_ROOT environment variable and rebuild the python bindings. Against 1.40 it won't compile. Against 1.39 it works fine. I'll double check my environment.
So there's definitely some change between 1.39 and 1.40 that breaks the BGL python bindings. It is probably to do with the bindings having their own copy of boost/vector_property_map.hpp. I guess the bindings code relied on this get_store method that was removed, so they kept an old copy of the header in their codebase. If I can work out how to fix it, I'll post the solution.

On Mon, 12 Oct 2009, John Reid wrote:
John Reid wrote:
It doesn't seem like that could be the case. All I do is change the BOOST_ROOT environment variable and rebuild the python bindings. Against 1.40 it won't compile. Against 1.39 it works fine. I'll double check my environment.
So there's definitely some change between 1.39 and 1.40 that breaks the BGL python bindings. It is probably to do with the bindings having their own copy of boost/vector_property_map.hpp. I guess the bindings code relied on this get_store method that was removed, so they kept an old copy of the header in their codebase. If I can work out how to fix it, I'll post the solution.
That explains it then -- use the Boost 1.40 version of boost/vector_property_map.hpp and copy in the one from the Python bindings as boost/property_map/vector_property_map.hpp. -- Jeremiah Willcock

Jeremiah Willcock wrote:
That explains it then -- use the Boost 1.40 version of boost/vector_property_map.hpp and copy in the one from the Python bindings as boost/property_map/vector_property_map.hpp.
Yes, I did try that and it does fix most of the compilation problems. However I'm still left with the error below. I'm struggling to see what has changed between 1.39 and 1.40 to cause it. Here's an excerpt from the long output from gcc: src/astar_search.cpp:101: instantiated from ‘void boost::graph::python::astar_search( const boost::graph::python::basic_graph<boost::undirectedS> &, boost::graph_traits<G>::vertex_descriptor, boost::python::api::object, boost::python::api::object, boost::vector_property_map< boost::graph_traits<G>::vertex_descriptor, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *, boost::vector_property_map< float, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *, boost::vector_property_map<float, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> * , boost::vector_property_map<float, boost::property_map<boost::graph::python::basic_graph<boost::undirectedS>, boost::edge_index_t>::const_type> *, boost::vector_property_map< boost::default_color_type, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *)’ src/graphs.hpp:28: instantiated from here /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp:324: error: invalid conversion from ‘void *’ to ‘size_t’ /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp:324: error: init. arg 1 of ‘iterator_traits<vector<long unsigned int>::iterator>::reference boost ::vector_property_map<long unsigned int, boost::identity_property_map>::operator[](const boost::property_traits<boost::identity_property_map>::key_type &) const’ /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp: In function ‘void boost::put( const boost::put_get_helper<long unsigned int &, boost::vector_property_map<long unsigned int, boost::identity_property_map> > &, boost::graph::python::basic_descriptor< void *, boost::undirectedS>, const int &)’:

On Mon, 12 Oct 2009, John Reid wrote:
Jeremiah Willcock wrote:
That explains it then -- use the Boost 1.40 version of boost/vector_property_map.hpp and copy in the one from the Python bindings as boost/property_map/vector_property_map.hpp.
Yes, I did try that and it does fix most of the compilation problems. However I'm still left with the error below. I'm struggling to see what has changed between 1.39 and 1.40 to cause it.
Here's an excerpt from the long output from gcc:
src/astar_search.cpp:101: instantiated from ‘void boost::graph::python::astar_search( const boost::graph::python::basic_graph<boost::undirectedS> &, boost::graph_traits<G>::vertex_descriptor, boost::python::api::object, boost::python::api::object, boost::vector_property_map< boost::graph_traits<G>::vertex_descriptor, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *, boost::vector_property_map< float, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *, boost::vector_property_map<float, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> * , boost::vector_property_map<float, boost::property_map<boost::graph::python::basic_graph<boost::undirectedS>, boost::edge_index_t>::const_type> *, boost::vector_property_map< boost::default_color_type, boost::property_map<PropertyGraph, boost::vertex_index_t>::const_type> *)’ src/graphs.hpp:28: instantiated from here /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp:324: error: invalid conversion from ‘void *’ to ‘size_t’ /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp:324: error: init. arg 1 of ‘iterator_traits<vector<long unsigned int>::iterator>::reference boost ::vector_property_map<long unsigned int, boost::identity_property_map>::operator[](const boost::property_traits<boost::identity_property_map>::key_type &) const’ /home/john/Dev/ThirdParty/boost/tmp/boost_1_40_0/boost/property_map/property_map.hpp: In function ‘void boost::put( const boost::put_get_helper<long unsigned int &, boost::vector_property_map<long unsigned int, boost::identity_property_map> > &, boost::graph::python::basic_descriptor< void *, boost::undirectedS>, const int &)’:
Are there other files from 1.39 that are overwritten by the Python bindings? -- Jeremiah Willcock

Jeremiah Willcock wrote:
Are there other files from 1.39 that are overwritten by the Python bindings?
Good point. This is the output of 'ls -R boost' at the top level of bgl-python: boost: graph vector_property_map.hpp boost/graph: circle_layout.hpp detail fruchterman_reingold.hpp king_ordering.hpp python small_world_generator.hpp spectral_embedding_3d_layout.hpp spectrum.hpp cuthill_mckee_ordering.hpp filtered_graph.hpp kamada_kawai_spring_layout.hpp point_traits.hpp random_layout.hpp sparse_spectrum.hpp spectral_embedding_layout.hpp boost/graph/detail: sparse_ordering.hpp boost/graph/python: astar_events.hpp breadth_first_search.hpp dijkstra_events.hpp dynamic_properties.hpp iterator.hpp point2d.hpp properties.hpp queue.hpp visitor.hpp bellman_ford_events.hpp connected_components.hpp dijkstra_shortest_paths.hpp generators.hpp list_append_iterator.hpp point3d.hpp property_map.hpp resizable_property_map.hpp bfs_events.hpp dfs_events.hpp distributed graph.hpp page_rank.hpp prim_minimum_spanning_tree.hpp python_property_map.hpp strong_components.hpp boost/graph/python/distributed: boman_et_al_graph_coloring.hpp breadth_first_search.hpp dehne_gotz_min_spanning_tree.hpp dijkstra_shortest_paths.hpp dinic_max_flow.hpp graphviz.hpp metis.hpp

On Mon, 12 Oct 2009, John Reid wrote:
Jeremiah Willcock wrote:
Are there other files from 1.39 that are overwritten by the Python bindings?
Good point. This is the output of 'ls -R boost' at the top level of bgl-python:
boost: graph vector_property_map.hpp
boost/graph: circle_layout.hpp detail fruchterman_reingold.hpp king_ordering.hpp python small_world_generator.hpp spectral_embedding_3d_layout.hpp spectrum.hpp cuthill_mckee_ordering.hpp filtered_graph.hpp kamada_kawai_spring_layout.hpp point_traits.hpp random_layout.hpp sparse_spectrum.hpp spectral_embedding_layout.hpp
boost/graph/detail: sparse_ordering.hpp
boost/graph/python: astar_events.hpp breadth_first_search.hpp dijkstra_events.hpp dynamic_properties.hpp iterator.hpp point2d.hpp properties.hpp queue.hpp visitor.hpp bellman_ford_events.hpp connected_components.hpp dijkstra_shortest_paths.hpp generators.hpp list_append_iterator.hpp point3d.hpp property_map.hpp resizable_property_map.hpp bfs_events.hpp dfs_events.hpp distributed graph.hpp page_rank.hpp prim_minimum_spanning_tree.hpp python_property_map.hpp strong_components.hpp
boost/graph/python/distributed: boman_et_al_graph_coloring.hpp breadth_first_search.hpp dehne_gotz_min_spanning_tree.hpp dijkstra_shortest_paths.hpp dinic_max_flow.hpp graphviz.hpp metis.hpp
Unfortunately, since there is nothing obvious (like the vector_property_map move) listed here, this is beyond what I am able to debug without looking through the code in detail. You might want to contact Doug Gregor for whatever help he can give. -- Jeremiah Willcock

Jeremiah Willcock wrote:
Unfortunately, since there is nothing obvious (like the vector_property_map move) listed here, this is beyond what I am able to debug without looking through the code in detail. You might want to contact Doug Gregor for whatever help he can give.
Ok will do. Thanks for the help. John.
participants (2)
-
Jeremiah Willcock
-
John Reid