Problem using dijkstra_shortest_paths with Boost 1.51

Hello, I tried building my Ledger project today with Boost 1.51 and clang --std=c++11, and received the following error: --8<---------------cut here---------------start------------->8--- /usr/local/include/boost-1_51/boost/mpl/eval_if.hpp:38:26: error: no type named 'type' in 'boost::no_property' typedef typename f_::type type; ~~~~~~~~~~~~~^~~~ [...] /Users/johnw/Projects/ledger/src/history.cc:455:3: note: in instantiation of function template specialization 'boost::dijkstra_shortest_paths<boost::filtered_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<boost::vertex_name_t, const ledger::commodity_t *, boost::property<boost::vertex_index_t, unsigned long, boost::no_property> >, boost::property<boost::edge_weight_t, long, boost::property<boost::edge_price_ratio_t, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > >, boost::property<boost::edge_price_point_t, ledger::price_point_t, boost::no_property> > >, boost::property<boost::graph_name_t, std::__1::basic_string<char>, boost::no_property>, boost::listS>, ledger::recent_edge_weight<boost::adj_list_edge_property_map<boost::undirected_tag, long, long &, unsigned long, boost::property<boost::edge_weight_t, long, boost::property<boost::edge_price_ratio_t, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > >, boost::property<boost::edge_price_point_t, ledger::price_point_t, boost::no_property> > >, boost::edge_weight_t>, boost::adj_list_edge_property_map<boost::undirected_tag, ledger::price_point_t, ledger::price_point_t &, unsigned long, boost::property<boost::edge_weight_t, long, boost::property<boost::edge_price_ratio_t, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > >, boost::property<boost::edge_price_point_t, ledger::price_point_t, boost::no_property> > >, boost::edge_price_point_t>, boost::adj_list_edge_property_map<boost::undirected_tag, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > >, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > > &, unsigned long, boost::property<boost::edge_weight_t, long, boost::property<boost::edge_price_ratio_t, std::__1::map<boost::posix_time::ptime, ledger::amount_t, std::__1::less<boost::posix_time::ptime>, std::__1::allocator<std::__1::pair<const boost::posix_time::ptime, ledger::amount_t> > >, boost::property<boost::edge_price_point_t, ledger::price_point_t, boost::no_property> > >, boost::edge_price_ratio_t> >, boost::keep_all>, f_max<long>, boost::distance_combine_t, boost::bgl_named_params<boost::iterator_property_map<long *, boost::vec_adj_list_vertex_id_map<boost::property<boost::vertex_name_t, const ledger::commodity_t *, boost::property<boost::vertex_index_t, unsigned long, boost::no_property> >, unsigned long>, long, long &>, boost::vertex_distance_t, boost::bgl_named_params<boost::iterator_property_map<unsigned long *, boost::vec_adj_list_vertex_id_map<boost::property<boost::vertex_name_t, const ledger::commodity_t *, boost::property<boost::vertex_index_t, unsigned long, boost::no_property> >, unsigned long>, unsigned long, unsigned long &>, boost::vertex_predecessor_t, boost::no_property> > >' requested here dijkstra_shortest_paths(fg, /* start= */ vs, ^ --8<---------------cut here---------------end--------------->8--- My graph type is: typedef adjacency_list <vecS, // Store all edges in a vector vecS, // Store all vertices in a vector undirectedS, // Relations are both ways // All vertices are commodities property<vertex_name_t, const commodity_t *, property<vertex_index_t, std::size_t> >, // All edges are weights computed as the absolute difference between // the reference time of a search and a known price point. A // filtered_graph is used to select the recent price point to the // reference time before performing the search. property<edge_weight_t, long, property<edge_price_ratio_t, price_map_t, property<edge_price_point_t, price_point_t> > >, // Graph itself has a std::string name property<graph_name_t, std::string> > Graph; The full source is located here: https://github.com/jwiegley/ledger/blob/next/src/history.cc What has changed in Boost.Graph since 1.50? The same code builds fine with all the same compiler options using that version. Thanks, -- John Wiegley BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

On Fri, 7 Sep 2012, John Wiegley wrote:
Hello,
I tried building my Ledger project today with Boost 1.51 and clang --std=c++11, and received the following error:
(snip)
The full source is located here:
https://github.com/jwiegley/ledger/blob/next/src/history.cc
What has changed in Boost.Graph since 1.50? The same code builds fine with all the same compiler options using that version.
Uses of undefined properties error out much earlier (and usually with better messages) in 1.51. I'll probably need to see the rest of the error message to find out exactly what's going on. One potential issue is that graphs with vecS vertex containers already have a vertex_index property map defined, and so defining your own property with the same name might be a problem. -- Jeremiah Willcock

Jeremiah Willcock <jewillco@osl.iu.edu> writes:
Uses of undefined properties error out much earlier (and usually with better messages) in 1.51. I'll probably need to see the rest of the error message to find out exactly what's going on. One potential issue is that graphs with vecS vertex containers already have a vertex_index property map defined, and so defining your own property with the same name might be a problem.
Removing the vertex_index property had no effect. Here is the full error: Thanks! -- John Wiegley BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

On Fri, 7 Sep 2012, John Wiegley wrote:
Jeremiah Willcock <jewillco@osl.iu.edu> writes:
Uses of undefined properties error out much earlier (and usually with better messages) in 1.51. I'll probably need to see the rest of the error message to find out exactly what's going on. One potential issue is that graphs with vecS vertex containers already have a vertex_index property map defined, and so defining your own property with the same name might be a problem.
Removing the vertex_index property had no effect. Here is the full error:
Could you please try the new trunk version? I tried to fix this issue. -- Jeremiah Willcock

Jeremiah Willcock <jewillco@osl.iu.edu> writes:
Could you please try the new trunk version? I tried to fix this issue.
I will try, though not for a week or two. Until then, you could build my project against it on your hardware: http://github.com/jwiegley/ledger.git If you have CMake installed, gmp and mpfr, you should be able to do "./acprep update" and CMake will find Boost. -- John Wiegley BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
participants (2)
-
Jeremiah Willcock
-
John Wiegley