boost.graph python bindings build against RC-1-34

Hi, Has anyone had any joy building these against the latest RC_1_34_0? I think the support for boost.build v1 has been removed from the latest CVS version. The bgl-python library still uses v1 Jamfiles though. Even if I update these to v2 jamfiles I still get compilation errors: bgl-python\boost/graph/python/resizable_property_map.hpp(56) : error C2039: 'get_store' : is not a member of 'boost::vector_property_map<T,IndexMap>' Any advice on the easiest way to proceed? Maybe I should download 1_33_1 and compile against that. Does anyone have any pre-built binaries for python 2.5? Thanks, John.

On Fri, 2006-12-22 at 11:56 +0000, John Reid wrote:
Hi,
Has anyone had any joy building these against the latest RC_1_34_0? I think the support for boost.build v1 has been removed from the latest CVS version. The bgl-python library still uses v1 Jamfiles though. Even if I update these to v2 jamfiles I still get compilation errors:
bgl-python\boost/graph/python/resizable_property_map.hpp(56) : error C2039: 'get_store' : is not a member of 'boost::vector_property_map<T,IndexMap>'
Any advice on the easiest way to proceed? Maybe I should download 1_33_1 and compile against that. Does anyone have any pre-built binaries for python 2.5?
I just put a BBv2-based build system into the BGL-Python Subversion repository this Wednesday. If you update to the latest Subversion revision, it should work with Boost RC_1_34_0 and CVS HEAD. If not, please report back and we'll try to get it fixed. Cheers, Doug

Douglas Gregor wrote:
I just put a BBv2-based build system into the BGL-Python Subversion repository this Wednesday. If you update to the latest Subversion revision, it should work with Boost RC_1_34_0 and CVS HEAD. If not, please report back and we'll try to get it fixed.
Right that looks like just what I need except I had to change a few things to get it to work on my system (boost RC_1_34_0 with MSVC 2005 express sp1) 1) I had to change the boost graph library line to the following: <library>/boost/graph//bgl-viz 2) I had to add the following to the bgl-python project's requirements: <define>BOOST_ALL_NO_LIB # disable boost auto-linking I think this is because I've misconfigured boost.build v2 somewhere. Anyhow this works for me, otherwise bjam complains it cannot find the boost python library. 3) I was still getting unresolved symbols from expat until I made the following changes to the expat Jamfile.v2 project expat-2.0.0 : source-location lib : build-dir bin.v2 : requirements <define>HAVE_MEMMOVE <define>XML_STATIC <define>XML_BUILDING_EXPAT <link>static : usage-requirements <define>HAVE_MEMMOVE <define>XML_STATIC ; lib expat : # Sources xmlparse.cpp xmlrole.cpp xmltok.cpp ; 4) The install option complains with the following: Jamfile.v2:181: in load-aux *** argument error * rule SHELL ( command : * ) * called with: ( ) * missing argument command (builtin):see definition of rule 'SHELL' being called C:/Dev/ThirdParty/boost/RC_1_34_0/boost/tools/build/v2/build\project.jam:318: in load-jamfile C:/Dev/ThirdParty/boost/RC_1_34_0/boost/tools/build/v2/build\project.jam:68: in load C:/Dev/ThirdParty/boost/RC_1_34_0/boost/tools/build/v2/build\project.jam:170: in project.find C:/Dev/ThirdParty/boost/RC_1_34_0/boost/tools/build/v2\build-system.jam:215: in load C:\Dev\ThirdParty\boost\RC_1_34_0\boost\tools\build\v2/kernel\modules.jam:261: i n import C:\Dev\ThirdParty\boost\RC_1_34_0\boost\tools\build\v2/kernel/bootstrap.jam:132: in boost-build C:\Dev\ThirdParty\boost\bgl-python\boost-build.jam:9: in module scope but I can install the library manually. Or I thought I could, actually I can't import it because of a dependency on msvcr80.dll. I'm scratching my head over this one. It must be something to do with my 'upgrade' to sp1 - something I'd advise anyone else against. Thanks for a very useful library it is much appreciated, John.

Right I've got past my vc8 sp1 problems (at some point it had uninstalled some dll it needed) and I now have a working BGL. I did want to compile in the IETL sparse spectrum code but when I do I get the following errors. Perhaps you can help? Using boost build at: C:\Dev\ThirdParty\boost\RC_1_34_0\boost/tools/build/v2 Using boost at: C:\Dev\ThirdParty\boost\RC_1_34_0\boost Using python at C:\apps\Python25 Using IETL at C:\Dev\ThirdParty\C\ietl-2.2 Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (and if you don't know what ICU is then you probably don't need it). ...patience... ...patience... ...found 4205 targets... ...updating 5 targets... compile-c-c++ bin.v2\msvc\release\threading-multi\sparse_spectrum.obj sparse_spectrum.cpp C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/docstring_options.hpp(65) : warning C4099: 'boost::python::objects::function' : type name first seen using 'struct' now seen using 'class' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/object/function.hpp(17) : see declaration of 'boost::python::objects::function' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/numeric.hpp(98) : warning C4099: 'boost::python::numeric::array' : type name first seen using 'struct' now seen using 'class' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/numeric.hpp(20) : see declaration of 'boost::python::numeric::array' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/iterator/transform_iterator.hpp(91) : error C2872: 'detail' : ambiguous symbol could be 'boost::detail' or 'boost::numeric::ublas::detail' .\boost/graph/sparse_spectrum.hpp(100) : see reference to class template instantiation 'boost::transform_iterator<UnaryFunction,Iterator>' being compiled with [ UnaryFunction=boost::graph::python::basic_descriptor<void *,boost::undirectedS>::create, Iterator=boost::adjacency_iterator<boost::adjacency_list<boost::listS,boost::listS,boost::undirectedS,boost::property<boost::vertex_index_t,size_t>,boost::property<boost::edge_index_t,size_t>>,void *,boost::detail::out_edge_iter<std::list<boost::detail::sei_<void *,std::list<boost::list_edge<void *,boost::property<boost::edge_index_t,size_t>>>::_Iterator<true>,boost::property<boost::edge_index_t,size_t>>>::_Iterator<true>,void *,boost::detail::edge_desc_impl<boost::undirected_tag,void *>,__w64 int>,int> ] src\sparse_spectrum.cpp(31) : see reference to function template instantiation 'void boost::sparse_spectrum<Graph,std::vector<_Ty>,std::vector<double>>(Graph &,int,int,EigenvectorMatrix &,EVector &,double,double)' being compiled with [ Graph=boost::graph::python::Graph, _Ty=Vector, EigenvectorMatrix=std::vector<Vector>, EVector=std::vector<double> ] src\sparse_spectrum.cpp(59) : see reference to function template instantiation 'boost::python::tuple boost::graph::python::sparse_spectrum<boost::graph::python::Graph>(Graph &,int,int,double,double)' being compiled with [ Graph=boost::graph::python::Graph ] C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/iterator/iterator_adaptor.hpp(263) : error C2872: 'detail' : ambiguous symbol could be 'boost::detail' or 'boost::numeric::ublas::detail' ... let me know if you need the rest of the output. Thanks, John.

Right FWIW here are patches to fix these compilation problems. Add using namespace boost::detail; as line 30 in sparse_spectrum.cpp Replace lines 94 and 95 in sparse_spectrum.hpp with typedef boost::numeric::ublas::compressed_matrix<double> Matrix; John. John Reid wrote:
Right I've got past my vc8 sp1 problems (at some point it had uninstalled some dll it needed) and I now have a working BGL. I did want to compile in the IETL sparse spectrum code but when I do I get the following errors. Perhaps you can help?
Using boost build at: C:\Dev\ThirdParty\boost\RC_1_34_0\boost/tools/build/v2 Using boost at: C:\Dev\ThirdParty\boost\RC_1_34_0\boost Using python at C:\apps\Python25 Using IETL at C:\Dev\ThirdParty\C\ietl-2.2 Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (and if you don't know what ICU is then you probably don't need it). ...patience... ...patience... ...found 4205 targets... ...updating 5 targets... compile-c-c++ bin.v2\msvc\release\threading-multi\sparse_spectrum.obj sparse_spectrum.cpp C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/docstring_options.hpp(65) : warning C4099: 'boost::python::objects::function' : type name first seen using 'struct' now seen using 'class'
C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/object/function.hpp(17) : see declaration of 'boost::python::objects::function' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/numeric.hpp(98) : warning C4099: 'boost::python::numeric::array' : type name first seen using 'struct' now seen using 'class'
C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/python/numeric.hpp(20) : see declaration of 'boost::python::numeric::array' C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/iterator/transform_iterator.hpp(91) : error C2872: 'detail' : ambiguous symbol could be 'boost::detail' or 'boost::numeric::ublas::detail' .\boost/graph/sparse_spectrum.hpp(100) : see reference to class template instantiation 'boost::transform_iterator<UnaryFunction,Iterator>' being compiled with [ UnaryFunction=boost::graph::python::basic_descriptor<void *,boost::undirectedS>::create,
Iterator=boost::adjacency_iterator<boost::adjacency_list<boost::listS,boost::listS,boost::undirectedS,boost::property<boost::vertex_index_t,size_t>,boost::property<boost::edge_index_t,size_t>>,void *,boost::detail::out_edge_iter<std::list<boost::detail::sei_<void *,std::list<boost::list_edge<void *,boost::property<boost::edge_index_t,size_t>>>::_Iterator<true>,boost::property<boost::edge_index_t,size_t>>>::_Iterator<true>,void *,boost::detail::edge_desc_impl<boost::undirected_tag,void *>,__w64 int>,int> ] src\sparse_spectrum.cpp(31) : see reference to function template instantiation 'void boost::sparse_spectrum<Graph,std::vector<_Ty>,std::vector<double>>(Graph &,int,int,EigenvectorMatrix &,EVector &,double,double)' being compiled with [ Graph=boost::graph::python::Graph, _Ty=Vector, EigenvectorMatrix=std::vector<Vector>, EVector=std::vector<double> ] src\sparse_spectrum.cpp(59) : see reference to function template instantiation 'boost::python::tuple boost::graph::python::sparse_spectrum<boost::graph::python::Graph>(Graph &,int,int,double,double)' being compiled with [ Graph=boost::graph::python::Graph ] C:\Dev\ThirdParty\boost\RC_1_34_0\boost\boost/iterator/iterator_adaptor.hpp(263) : error C2872: 'detail' : ambiguous symbol could be 'boost::detail' or 'boost::numeric::ublas::detail'
...
let me know if you need the rest of the output.
Thanks, John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Dec 29, 2006, at 6:47 AM, John Reid wrote:
Right FWIW here are patches to fix these compilation problems.
Add using namespace boost::detail; as line 30 in sparse_spectrum.cpp
Replace lines 94 and 95 in sparse_spectrum.hpp with typedef boost::numeric::ublas::compressed_matrix<double> Matrix;
Thanks, John! I've committed these to the BGL-Python Subversion respository. Are the BGL-Python bindings working for you now? Cheers, Doug

Yes they are thank you very much. However on a slightly separate note I was expecting the spectrum code to calculate the eigenvalues of the laplacian. However I think it calculates the eigenvalues of the adjacency matrix which is what some authors define as the graph spectrum. I have some python (numpy) code that calculates the eigenvalues of the laplacian of a boost.graph in case anyone is interested in it. I needed it to calculate diffusion kernels I think it has some applications in partitioning as well. My reference for this: http://math.ucsd.edu/~fan/cbms.pdf Cheers, John. Doug Gregor wrote:
On Dec 29, 2006, at 6:47 AM, John Reid wrote:
Right FWIW here are patches to fix these compilation problems.
Add using namespace boost::detail; as line 30 in sparse_spectrum.cpp
Replace lines 94 and 95 in sparse_spectrum.hpp with typedef boost::numeric::ublas::compressed_matrix<double> Matrix;
Thanks, John! I've committed these to the BGL-Python Subversion respository.
Are the BGL-Python bindings working for you now?
Cheers, Doug
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Doug Gregor
-
Douglas Gregor
-
John Reid