[MDEV-8051] oqgraph compile failure with clang Created: 2015-04-25  Updated: 2016-06-07  Resolved: 2016-06-07

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - OQGRAPH
Affects Version/s: 10.0.17, 10.1.8
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Unassigned
Resolution: Duplicate Votes: 2
Labels: clang, freebsd
Environment:

Ubuntu 12.04 LTS - clang version 3.4 (tags/RELEASE_34/final)
FreeBSD-10.1/10.2


Issue Links:
Duplicate
duplicates MDEV-5944 OQGraph doesn't built with llvm Closed

 Description   

https://travis-ci.org/openquery/mariadb-server/jobs/59949722 / https://s3.amazonaws.com/archive.travis-ci.org/jobs/59949722/log.txt

In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:91: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/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/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/include/boost/graph/graph_concepts.hpp:83: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/include/boost/concept/usage.hpp:35:7: note: expanded from macro
      'BOOST_CONCEPT_USAGE'
      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
      ^
/usr/include/boost/concept/assert.hpp:44:5: note: expanded from macro
      'BOOST_CONCEPT_ASSERT'
    BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
    ^
/usr/include/boost/concept/detail/general.hpp:70:51: note: expanded from macro
      'BOOST_CONCEPT_ASSERT_FN'
    &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
                                                  ^
/usr/include/boost/graph/breadth_first_search.hpp:62:5: note: in instantiation
      of function template specialization
      'boost::function_requires<boost::concepts::IncidenceGraphConcept<oqgraph3::graph>
      >' requested here
    function_requires< IncidenceGraphConcept<IncidenceGraph> >();
    ^
/usr/include/boost/graph/dijkstra_shortest_paths.hpp:332: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_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_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_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_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_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> >' requested
      here
    breadth_first_visit(g, s, Q, bfs_vis, color);
    ^
/home/travis/build/openquery/mariadb-server/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_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_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_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,
            ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:292:3: note: 
      'out_edges' should be declared prior to the call site or in namespace
      'oqgraph3'
  out_edges(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:92: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);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:307:3: note: 
      'out_degree' should be declared prior to the call site or in namespace
      'oqgraph3'
  out_degree(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:94:17: error: call to function
      'source' that is neither visible in the template definition nor found by
      argument-dependent lookup
            u = source(e, g);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:278:3: note: 
      'source' should be declared prior to the call site or in namespace
      'oqgraph3'
  source(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:95:17: error: call to function
      'target' that is neither visible in the template definition nor found by
      argument-dependent lookup
            v = target(e, g);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:284:3: note: 
      'target' should be declared prior to the call site or in namespace
      'oqgraph3'
  target(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:99: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/include/boost/graph/graph_concepts.hpp:96:13: note: in instantiation of
      member function
      'boost::concepts::IncidenceGraph<oqgraph3::graph>::const_constraints'
      requested here
            const_constraints(g);
            ^
/usr/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/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/include/boost/graph/graph_concepts.hpp:83: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/include/boost/concept/usage.hpp:35:7: note: expanded from macro
      'BOOST_CONCEPT_USAGE'
      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
      ^
/usr/include/boost/concept/assert.hpp:44:5: note: expanded from macro
      'BOOST_CONCEPT_ASSERT'
    BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
    ^
/usr/include/boost/concept/detail/general.hpp:70:51: note: expanded from macro
      'BOOST_CONCEPT_ASSERT_FN'
    &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
                                                  ^
/usr/include/boost/graph/breadth_first_search.hpp:62:5: note: in instantiation
      of function template specialization
      'boost::function_requires<boost::concepts::IncidenceGraphConcept<oqgraph3::graph>
      >' requested here
    function_requires< IncidenceGraphConcept<IncidenceGraph> >();
    ^
/usr/include/boost/graph/dijkstra_shortest_paths.hpp:332: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_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_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_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_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_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> >' requested
      here
    breadth_first_visit(g, s, Q, bfs_vis, color);
    ^
/home/travis/build/openquery/mariadb-server/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_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_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_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,
            ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:292:3: note: 
      'out_edges' should be declared prior to the call site or in namespace
      'oqgraph3'
  out_edges(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:100: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);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:307:3: note: 
      'out_degree' should be declared prior to the call site or in namespace
      'oqgraph3'
  out_degree(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:102:17: error: call to function
      'source' that is neither visible in the template definition nor found by
      argument-dependent lookup
            u = source(e, cg);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:278:3: note: 
      'source' should be declared prior to the call site or in namespace
      'oqgraph3'
  source(
  ^
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore.cc:29:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/graphcore-graph.h:28:
In file included from /home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:33:
In file included from /usr/include/boost/graph/directed_graph.hpp:11:
In file included from /usr/include/boost/graph/adjacency_list.hpp:337:
In file included from /usr/include/boost/graph/detail/adjacency_list.hpp:31:
/usr/include/boost/graph/graph_concepts.hpp:103:17: error: call to function
      'target' that is neither visible in the template definition nor found by
      argument-dependent lookup
            v = target(e, cg);
                ^
/home/travis/build/openquery/mariadb-server/storage/oqgraph/oqgraph_shim.h:284: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



 Comments   
Comment by Elena Stepanova [ 2015-04-28 ]

I assume it's yet another clang-specific problem?

Comment by Daniel Black [ 2015-04-28 ]

I assume it's yet another clang-specific problem?

yes. gcc ( on same build https://travis-ci.org/openquery/mariadb-server/jobs/59949721 ) compiled ok (aborted tests as out of time).

Comment by Bernard Spil [ 2015-10-23 ]

Same error here on FreeBSD 10.2 compiling MariaDB 10.1.8
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Looks like an issue with boost-libs to me... Using boost-libs 1.5.5 here.
Compiling with gcc 4.8 is OK.

Comment by Don Lewis [ 2016-03-14 ]

I attached a patch to this ticket: <https://jira.mariadb.org/browse/MDEV-5944>.

Comment by Bernard Spil [ 2016-03-27 ]

I have included Don Lewis' patch in the FreeBSD port, it works on 10.3 / clang 3.4.1.

Please consider including this in your source distribution.

Comment by Daniel Black [ 2016-06-07 ]

Duplicate of MDEV-5944

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