Boost logo

Boost Users :

Subject: [Boost-users] Sun C++ 5.10 and BGL adjacency_list
From: Nicholas Brealey (nick_at_[hidden])
Date: 2010-02-07 06:57:30


I am trying to use the Boost Graph Library from Boost 1.42.0 with Sun
Studio 12 update 1 but the adjacency_list.cpp example from the
libs/graph/example directory does not compile.

Does anyoone have a workaround?

> $ CC -V
> CC: Sun C++ 5.10 SunOS_i386 128229-04 2009/11/25
> Usage: CC [ options ] files. Use 'CC -flags' for details

> $ CC -library=stlport4 -features=tmplife -features=tmplrefstatic -I/home/nick/boost_1_42_0 -o adjacency_list adjacency_list.cpp
> "/home/nick/boost_1_42_0/boost/graph/detail/adjacency_list.hpp", line 1722: Error: Could not find a match for boost::detail::get_dispatch<boost::detail::Config, boost::detail::Base, boost::detail::Property>(boost::adj_list_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config, boost::undirected_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config>>, unsigned VertexProperties::*, int) needed in boost::get<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undir
ectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config, boost::undirected_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config>, unsigned VertexProperties::*>(unsigned VertexProperties::*, boost::adj_list_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config, boost::undirected_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS,
boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config>>&).
> "adjacency_list.cpp", line 63: Where: While instantiating "boost::get<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config, boost::undirected_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config>, unsigned VertexProperties::*>(unsigned VertexProperties::*, boost::adj_list_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, Vertex
Properties, EdgeProperties, boost::no_property, boost::listS>::config, boost::undirected_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>::config>>&)".
> "adjacency_list.cpp", line 63: Where: Instantiated from non-template code.
> "adjacency_list.cpp", line 71: Warning (Anachronism): Assigning int to boost::detail::error_property_not_found.
> "adjacency_list.cpp", line 71: Error: Cannot cast from int to boost::detail::error_property_not_found.
> "adjacency_list.cpp", line 82: Error: The operation "std::ostream<<boost::detail::error_property_not_found" is illegal.
> "adjacency_list.cpp", line 84: Error: The operation "boost::adj_list_vertex_property_map<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::detail::error_property_not_found, boost::detail::error_property_not_found&, std::string EdgeProperties::*>[boost::detail::edge_desc_impl<boost::undirected_tag, void*>]" is illegal.
> "adjacency_list.cpp", line 93: Error: The operation "std::ostream<<boost::detail::error_property_not_found" is illegal.
> "adjacency_list.cpp", line 98: Error: The operation "std::ostream<<boost::detail::error_property_not_found" is illegal.
> "adjacency_list.cpp", line 100: Error: The operation "boost::adj_list_vertex_property_map<boost::adjacency_list<boost::vecS, boost::listS, boost::undirectedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, boost::detail::error_property_not_found, boost::detail::error_property_not_found&, std::string EdgeProperties::*>[boost::detail::edge_desc_impl<boost::undirected_tag, void*>]" is illegal.
> 7 Error(s) and 1 Warning(s) detected.

I posted a similar question on the Sun C++ forum last year but no one
had a solution: http://forums.sun.com/thread.jspa?threadID=5419942

g++ works fine:

> $ g++ -I/home/nick/boost_1_42_0 -o adjacency_list adjacency_list.cpp
> $ g++ --version
> g++ (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>

Thanks

Nick


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