[MDEV-5944] OQGraph doesn't built with llvm Created: 2014-03-25  Updated: 2016-12-19  Resolved: 2016-10-25

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - OQGRAPH
Affects Version/s: 10.0.9, 10.0.27
Fix Version/s: 10.0.28, 10.1.20, 10.2.3

Type: Bug Priority: Major
Reporter: Kolbe Kegel (Inactive) Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 2
Labels: clang, contribution, foundation, freebsd, mac, oqgraph, patch
Environment:

OS X 10.9 Mavericks


Attachments: HTML File upstream-mariadb-patch    
Issue Links:
Duplicate
is duplicated by MDEV-8051 oqgraph compile failure with clang Closed

 Description   

Apparently, OQGraph doesn't build on OS X, or perhaps in other environments that use llvm.

I get many error messages from that seem related to this: http://clang.llvm.org/compatibility.html#dep_lookup

It looks like they might be coming from boost itself, but there are enough other notes that I'm not real sure.

[ 76%] Building CXX object storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:94:17: error: call to function 'out_edges' that is neither visible in the template definition nor found by argument-dependent lookup
            p = out_edges(u, g);
                ^
/usr/local/include/boost/concept/usage.hpp:22:43: note: in instantiation of member function 'boost::concepts::IncidenceGraph<oqgraph3::graph>::~IncidenceGraph' requested here
    ~usage_requirements() { ((Model*)0)->~Model(); }
                                          ^
/usr/local/include/boost/concept/detail/general.hpp:38:42: note: in instantiation of member function 'boost::concepts::usage_requirements<boost::concepts::IncidenceGraph<oqgraph3::graph> >::~usage_requirements' requested here
    static void failed() { ((Model*)0)->~Model(); }
                                         ^
/usr/local/include/boost/graph/graph_concepts.hpp:86:9: note: in instantiation of member function 'boost::concepts::requirement<boost::concepts::failed ************boost::concepts::usage_requirements<boost::concepts::IncidenceGraph<oqgraph3::graph> >::************>::failed' requested here
        BOOST_CONCEPT_USAGE(IncidenceGraph) {
        ^
/usr/local/include/boost/concept/usage.hpp:35:7: note: expanded from macro 'BOOST_CONCEPT_USAGE'
      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
      ^
/usr/local/include/boost/concept/assert.hpp:44:5: note: expanded from macro 'BOOST_CONCEPT_ASSERT'
    BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
    ^
/usr/local/include/boost/concept/detail/general.hpp:70:51: note: expanded from macro 'BOOST_CONCEPT_ASSERT_FN'
    &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
                                                  ^
/usr/local/include/boost/graph/dijkstra_shortest_paths.hpp:383:5: note: in instantiation of function template specialization 'boost::breadth_first_visit<oqgraph3::graph, boost::d_ary_heap_indirect<unsigned long long, 4, boost::vector_property_map<unsigned long, oqgraph3::vertex_index_property_map>, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, std::less<double>, std::vector<unsigned long long, std::allocator<unsigned long long> > >, boost::detail::dijkstra_bfs_visitor<boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::d_ary_heap_indirect<unsigned long long, 4, boost::vector_property_map<unsigned long, oqgraph3::vertex_index_property_map>, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, std::less<double>, std::vector<unsigned long long, std::allocator<unsigned long long> > >, oqgraph3::edge_weight_property_map, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, boost::closed_plus<double>, std::less<double> >, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>, unsigned long long *>' requested here
    breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
    ^
/usr/local/include/boost/graph/dijkstra_shortest_paths.hpp:400:5: note: in instantiation of function template specialization 'boost::dijkstra_shortest_paths_no_init<oqgraph3::graph, unsigned long long *, boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, oqgraph3::edge_weight_property_map, oqgraph3::vertex_index_property_map, std::less<double>, boost::closed_plus<double>, double, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map> >' requested here
    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
    ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:776:13: note: in instantiation of function template specialization 'boost::dijkstra_shortest_paths_no_init<oqgraph3::graph, boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, oqgraph3::edge_weight_property_map, oqgraph3::vertex_index_property_map, std::less<double>, boost::closed_plus<double>, double, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map> >' requested here
            dijkstra_shortest_paths_no_init(share->g, *orig,
            ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:288:3: note: 'out_edges' should be declared prior to the call site or in namespace 'oqgraph3'
  out_edges(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:95:17: error: call to function 'out_degree' that is neither visible in the template definition nor found by argument-dependent lookup
            n = out_degree(u, g);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:303:3: note: 'out_degree' should be declared prior to the call site or in namespace 'oqgraph3'
  out_degree(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:97:17: error: call to function 'source' that is neither visible in the template definition nor found by argument-dependent lookup
            u = source(e, g);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:274:3: note: 'source' should be declared prior to the call site or in namespace 'oqgraph3'
  source(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:98:17: error: call to function 'target' that is neither visible in the template definition nor found by argument-dependent lookup
            v = target(e, g);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:280:3: note: 'target' should be declared prior to the call site or in namespace 'oqgraph3'
  target(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:102:17: error: call to function 'out_edges' that is neither visible in the template definition nor found by argument-dependent lookup
            p = out_edges(u, cg);
                ^
/usr/local/include/boost/graph/graph_concepts.hpp:99:13: note: in instantiation of member function 'boost::concepts::IncidenceGraph<oqgraph3::graph>::const_constraints' requested here
            const_constraints(g);
            ^
/usr/local/include/boost/concept/usage.hpp:22:43: note: in instantiation of member function 'boost::concepts::IncidenceGraph<oqgraph3::graph>::~IncidenceGraph' requested here
    ~usage_requirements() { ((Model*)0)->~Model(); }
                                          ^
/usr/local/include/boost/concept/detail/general.hpp:38:42: note: in instantiation of member function 'boost::concepts::usage_requirements<boost::concepts::IncidenceGraph<oqgraph3::graph> >::~usage_requirements' requested here
    static void failed() { ((Model*)0)->~Model(); }
                                         ^
/usr/local/include/boost/graph/graph_concepts.hpp:86:9: note: in instantiation of member function 'boost::concepts::requirement<boost::concepts::failed ************boost::concepts::usage_requirements<boost::concepts::IncidenceGraph<oqgraph3::graph> >::************>::failed' requested here
        BOOST_CONCEPT_USAGE(IncidenceGraph) {
        ^
/usr/local/include/boost/concept/usage.hpp:35:7: note: expanded from macro 'BOOST_CONCEPT_USAGE'
      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
      ^
/usr/local/include/boost/concept/assert.hpp:44:5: note: expanded from macro 'BOOST_CONCEPT_ASSERT'
    BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
    ^
/usr/local/include/boost/concept/detail/general.hpp:70:51: note: expanded from macro 'BOOST_CONCEPT_ASSERT_FN'
    &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
                                                  ^
/usr/local/include/boost/graph/dijkstra_shortest_paths.hpp:383:5: note: in instantiation of function template specialization 'boost::breadth_first_visit<oqgraph3::graph, boost::d_ary_heap_indirect<unsigned long long, 4, boost::vector_property_map<unsigned long, oqgraph3::vertex_index_property_map>, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, std::less<double>, std::vector<unsigned long long, std::allocator<unsigned long long> > >, boost::detail::dijkstra_bfs_visitor<boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::d_ary_heap_indirect<unsigned long long, 4, boost::vector_property_map<unsigned long, oqgraph3::vertex_index_property_map>, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, std::less<double>, std::vector<unsigned long long, std::allocator<unsigned long long> > >, oqgraph3::edge_weight_property_map, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, boost::closed_plus<double>, std::less<double> >, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>, unsigned long long *>' requested here
    breadth_first_visit(g, s_begin, s_end, Q, bfs_vis, color);
    ^
/usr/local/include/boost/graph/dijkstra_shortest_paths.hpp:400:5: note: in instantiation of function template specialization 'boost::dijkstra_shortest_paths_no_init<oqgraph3::graph, unsigned long long *, boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, oqgraph3::edge_weight_property_map, oqgraph3::vertex_index_property_map, std::less<double>, boost::closed_plus<double>, double, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map> >' requested here
    dijkstra_shortest_paths_no_init(g, &s, &s + 1, predecessor, distance,
    ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:776:13: note: in instantiation of function template specialization 'boost::dijkstra_shortest_paths_no_init<oqgraph3::graph, boost::dijkstra_visitor<open_query::oqgraph_goal<true, boost::on_finish_vertex, boost::associative_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > > > > >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, unsigned long long, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, unsigned long long> > >, boost::identity_initializer<unsigned long long> >, boost::lazy_property_map<boost::unordered::unordered_map<unsigned long long, double, boost::hash<boost::ulong_long_type>, std::equal_to<unsigned long long>, std::allocator<std::pair<const unsigned long long, double> > >, boost::value_initializer<double> >, oqgraph3::edge_weight_property_map, oqgraph3::vertex_index_property_map, std::less<double>, boost::closed_plus<double>, double, boost::two_bit_judy_map<oqgraph3::vertex_index_property_map> >' requested here
            dijkstra_shortest_paths_no_init(share->g, *orig,
            ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:288:3: note: 'out_edges' should be declared prior to the call site or in namespace 'oqgraph3'
  out_edges(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:103:17: error: call to function 'out_degree' that is neither visible in the template definition nor found by argument-dependent lookup
            n = out_degree(u, cg);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:303:3: note: 'out_degree' should be declared prior to the call site or in namespace 'oqgraph3'
  out_degree(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:105:17: error: call to function 'source' that is neither visible in the template definition nor found by argument-dependent lookup
            u = source(e, cg);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:274:3: note: 'source' should be declared prior to the call site or in namespace 'oqgraph3'
  source(
  ^
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore.cc:29:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/graphcore-graph.h:28:
In file included from /Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/local/include/boost/graph/directed_graph.hpp:10:
In file included from /usr/local/include/boost/graph/adjacency_list.hpp:246:
In file included from /usr/local/include/boost/graph/detail/adjacency_list.hpp:32:
/usr/local/include/boost/graph/graph_concepts.hpp:106:17: error: call to function 'target' that is neither visible in the template definition nor found by argument-dependent lookup
            v = target(e, cg);
                ^
/Users/kolbe/Devel/m/bzr/maria/10.0/storage/oqgraph/oqgraph_shim.h:280:3: note: 'target' should be declared prior to the call site or in namespace 'oqgraph3'
  target(
  ^
8 errors generated.
make[2]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o] Error 1
make[1]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/all] Error 2
make: *** [all] Error 2



 Comments   
Comment by Kolbe Kegel (Inactive) [ 2014-03-25 ]

This is with boost 1.55.0. I installed it via homebrew.

Comment by Arjen Lentz [ 2014-03-25 ]

Thanks for the report Kolbe, I've assigned it to Andrew as to me it looks like another Boost version incompatibility, or some variation thereof.

Comment by Bernard Spil [ 2014-12-31 ]

I've experienced out of memory problems with building mroonga as well, fixed by forcing to use GCC. Confirmed by others as well (FreeBSD)

Comment by Janus Troelsen [ 2015-11-20 ]

Is there any workaround for this, without resorting to GCC?

Comment by Don Lewis [ 2016-03-03 ]

This appears to be a namespace issue that clang is pickier about than gcc. The attached patch allows OQGraph to build with clang 3.4.1 on FreeBSD 10, clang 3.7.1 on FreeBSD 11, and gcc 4.2.1 on FreeBSD 9.

There are also references to some typedefs that were introduced in boost 1.46.1 and removed in boost 1.49.0. This patch does does not try to use them with boost 1.49.0 or newer.
Tested with boost 1.55.0 and 1.60.0.

Generated at Thu Feb 08 07:08:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.