I'm attempting to run example code, but Boost's graphing library doesn't like it

I want to preface this by saying that I have some experience with C++, but I'm new to Linux and the the concept of installing libraries. The Boost Libraries are premade and the examples I'm trying to run are premade, so the problem could be some incompatibility between them, or it could be that I've just installed something incorrectly.

The problem seems to be that these four lines in SimulationTypeDef.hpp

typedef SiconosGraph<SP::DynamicalSystem, SP::UnitaryRelation, SystemData , RelationData, GraphData > DynamicalSystemsGraph;
typedef SiconosGraph<SP::UnitaryRelation, SP::DynamicalSystem, RelationData, SystemData, GraphData > UnitaryRelationsGraph;

TYPEDEF_SPTR(DynamicalSystemsGraph);
TYPEDEF_SPTR(UnitaryRelationsGraph);


cause some sort of issue in SiconosGraph.hpp, which in turn causes a mess to erupt in Boost's graphing library. I'm not really sure what to look for in those files aside from those lines. The error output is so long that it won't all fit in the terminal, but I've included some of it below.

I'm running version 1.52.0 of Boost and version 3.4.0 of Siconos. My OS is Ubuntu 12.04.1 LTS with and Intel Xeon processor.

A shortened version of one section of terminal output:

In file included from /home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/adjacency_list.hpp:245:0,
from /usr/include/Siconos/Kernel/SiconosGraph.hpp:35,
from /usr/include/Siconos/Kernel/SimulationTypeDef.hpp:34,
from /usr/include/Siconos/Kernel/Topology.hpp:29,
from /usr/include/Siconos/Kernel/NonSmoothDynamicalSystem.hpp:30,
from /usr/include/Siconos/Kernel/ModelingTools.hpp:44,
from /usr/include/Siconos/Kernel/SiconosKernel.hpp:28,
from /home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/DiodeBridge.cpp:47:
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp: In instantiation of ‘boost::detail::adj_list_any_edge_pmap::bind_<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, boost::property<boost::vertex_bundle_t, boost::shared_ptr<UnitaryRelation>, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_index_t, unsigned int, boost::property<vertex_properties_t, RelationData, boost::no_property> > > >, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::property<graph_properties_t, GraphData, boost::no_property>, boost::listS>, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::edge_bundle_t>’:
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2685:12: instantiated from ‘boost::detail::adj_list_choose_edge_pmap<boost::edge_bundle_t, boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, boost::property<boost::vertex_bundle_t, boost::shared_ptr<UnitaryRelation>, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_index_t, unsigned int, boost::property<vertex_properties_t, RelationData, boost::no_property> > > >, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::property<graph_properties_t, GraphData, boost::no_property>, boost::listS>, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > > >’
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2690:14: instantiated from ‘boost::detail::adj_list_edge_property_selector::bind_<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, boost::property<boost::vertex_bundle_t, boost::shared_ptr<UnitaryRelation>, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_index_t, unsigned int, boost::property<vertex_properties_t, RelationData, boost::no_property> > > >, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::property<graph_properties_t, GraphData, boost::no_property>, boost::listS>, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::edge_bundle_t>’


It goes multiple paragraphs about how it instantiated, and it ends with

/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/properties.hpp:228:10: instantiated from ‘boost::property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, boost::property<boost::vertex_bundle_t, boost::shared_ptr<UnitaryRelation>, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_index_t, unsigned int, boost::property<vertex_properties_t, RelationData, boost::no_property> > > >, boost::property<boost::edge_bundle_t, boost::shared_ptr<DynamicalSystem>, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, unsigned int, boost::property<edge_properties_t, SystemData, boost::no_property> > > >, boost::property<graph_properties_t, GraphData, boost::no_property>, boost::listS>, graph_properties_t>’
/usr/include/Siconos/Kernel/SiconosGraph.hpp:132:52: instantiated from ‘SiconosGraph<boost::shared_ptr<UnitaryRelation>, boost::shared_ptr<DynamicalSystem>, RelationData, SystemData, GraphData>’
/usr/include/Siconos/Kernel/SimulationTypeDef.hpp:145:1: instantiated from here
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2500:29: error: forming reference to void
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2501:35: error: forming reference to void
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2504:47: error: forming reference to void
/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/src/boost/graph/detail/adjacency_list.hpp:2506:53: error: forming reference to void
/usr/include/Siconos/Kernel/SiconosAlgebra.hpp:117:14: warning: ‘tolerance’ defined but not used [-Wunused-variable]
/usr/include/Siconos/Kernel/EventDriven.hpp:27:14: warning: ‘DEFAULT_TOL_ED’ defined but not used [-Wunused-variable]
/usr/include/Siconos/Kernel/OSNSMultipleImpact.hpp:15:14: warning: ‘DEFAULT_TOL_IMPACT’ defined but not used [-Wunused-variable]
/usr/include/Siconos/Kernel/Lsodar.hpp:30:18: warning: ‘ATOL_DEFAUTL’ defined but not used [-Wunused-variable]
/usr/include/Siconos/Kernel/Lsodar.hpp:31:18: warning: ‘RTOL_DEFAULT’ defined but not used [-Wunused-variable]
make[2]: *** [CMakeFiles/DiodeBridge.dir/home/chris/Siconos/siconos-examples-3.4.0-Source/Electronics/DiodeBridge/DiodeBridge.cpp.o] Error 1
make[1]: *** [CMakeFiles/DiodeBridge.dir/all] Error 2
make: *** [all] Error 2
Now that looks like a classic g++ template diagnostic. Haven't got clang++ installed have you? Those error messages are often more helpful in this sort of area.
Looks like an interesting library, I'll get it if I find the time.
If you followed their instructions, I'd send it to them, this looks like an installation/configuration issue (probably a version mismatch - the errors point at property map code, which went through some changes in later boost.graph versions)
You were right, Cubbi. It was a version issue. Siconos 3.4.0 is not compatible with Boost versions 1.51 and greater. I downgraded to 1.50 and it works now.
Topic archived. No new replies allowed.