[MDEV-4795] oqgraph engine fails to build with boost 1.54.0 Created: 2013-07-19  Updated: 2014-03-19  Resolved: 2014-03-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.32
Fix Version/s: 5.5.36

Type: Bug Priority: Minor
Reporter: Heinz Wiesinger Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: oqgraph
Environment:

Slackware Linux (current tree), gcc 4.8.1, glibc 2.17


Issue Links:
Duplicate
duplicates MDEV-4796 MariaDB-5.5.32 fails to compile with ... Closed

 Description   

Building MariaDB against a new boost version results in building erros for the OQGraph storage plugin:

[ 64%] Building CXX object storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o
In file included from /usr/include/boost/graph/adjacency_list.hpp:45:0,
                 from /tmp/mariadb-5.5.32/storage/oqgraph/graphcore.cc:40:
/usr/include/boost/graph/named_graph.hpp: In instantiation of 'void boost::graph::named_graph<Graph, Vertex, VertexProperty>::removing_vertex(Vertex, VertexIterStability) [with VertexIterStability = boost::graph_detail::unstable_tag; Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo>;
Vertex = long unsigned int; VertexProperty = open_query::VertexInfo]':
/usr/include/boost/graph/detail/adjacency_list.hpp:2203:7:   required from 'void boost::remove_vertex(typename Config::vertex_descriptor, boost::vec_adj_list_impl<G, C, B>&) [with
Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo>; Config = boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo>, boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo, boost::no_property, boost::listS>::config; Base = boost::bidirectional_graph_helper_with_property<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo>, boost::vecS, boost::vecS, boost::bidirectionalS, open_query::VertexInfo, open_query::EdgeInfo, boost::no_property, boost::listS>::config>; typename Config::vertex_descriptor = long unsigned int]'
/tmp/mariadb-5.5.32/storage/oqgraph/graphcore.cc:578:35:   required from here
/usr/include/boost/graph/named_graph.hpp:318:46: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
   BOOST_STATIC_ASSERT_MSG ((boost::is_base_of<boost::graph_detail::stable_tag,}VertexIterStability>::value), "Named graphs cannot use vecS as vertex container and remove vertices; the lack of vertex descriptor stability (which iterator stability is a proxy for) means that the name -> vertex mapping would need to be completely rebuilt after each deletion.  See https://svn.boost.org/trac/boost/ticket/7863 for more information and a test case.");
                                              ^
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 AL13N [ 2013-07-19 ]

i can confirm this...

from what i read, this seems like a boost bug in 1.54 (iinm 1.53 does not have this issue).

as a package maintainer of a distro, can i suggest a new feature for oqgraph? ==> "stop using boost" it's been kind of a PITA for us...

Comment by AL13N [ 2013-07-19 ]

to my untrained eye, this looks like a bad header dependency in boost...

Comment by AL13N [ 2013-07-21 ]

chat of some people who might have some insight in this issue.

10:41 < zao> Well, what static-assert is it tripping on?
10:43 < zao> See named_graph.hpp:318 for a long and descriptive string
10:43 < zao> BOOST_STATIC_ASSERT_MSG
((boost::is_base_of<boost::graph_detail::stable_tag,
VertexIterStability>::value), "Named graphs cannot use vecS as
vertex container and remove vertices; the lack of vertex
descriptor stability
10:43 < zao> (which iterator stability is a proxy for) means that the name ->
vertex mapping would need to be completely rebuilt after each deletion. See
https://svn.boost.org/trac/boost/ticket/7863 for more information
and a test case.");
10:45 < zao> neoclust: The bug indicates that this has been the cause of
subtly broken behaviour in the past and that the assert is there to cause a
hard compile-time failure instead.

Comment by Arjen Lentz [ 2013-07-25 ]

Acknowledged. Boost appears to cause some kind of new build issue with every new version...
I also appreciate the sentiment "stop using Boost".
We've looked at that option, but haven't found anything viable yet.

Comment by Arjen Lentz [ 2013-07-25 ]

This issue may resolve when we merge OQGRAPHv3 into MariaDB 10.0, Andrew McDonnell reports that it builds with Boost 1.54 without hassle.

Comment by Heinz Wiesinger [ 2013-07-25 ]

Fixing it in 10.0 is good, but I'd really prefer having this fixed in 5.5 as well. As it stands 5.5 is shipped with quite some distributions and unless it's fixed there too oqgraph will have to be disabled (where affected) until MariaDB is updated to 10.0.x

Comment by AL13N [ 2013-07-25 ]

will mariadb 10 be final before september? cause that's the date i need to be careful of...

if so, i can just switch to mariadb 10 and don't have any issue anymore...

if not, i'll have to try to get boost 1.53 embedded inside mariadb-5.5

Comment by Otto Kekäläinen [ 2013-09-18 ]

I guess this isn't fixed for .33 yet, as fix target seems to be .34?

Here is a possible fix as patches: https://github.com/ottok/pkg-mariadb/pull/1
Background: https://lists.launchpad.net/oqgraph-dev/msg00257.html

I assume Andrew will push this upstream soon?

Comment by Sergei Golubchik [ 2014-01-24 ]

I've added a test to CMakeLIsts.txt to disable OQGraph v2 (in 5.5) for incompatible Boost versions.

Comment by Arjen Lentz [ 2014-03-18 ]

The quagmire of Boost for 5.5 is a ghost we'd rather not chase. There are other problems with oqgraph v2 anyhow, which is why v3 was created.

v3 appears more tolerant with Boost versions, but in any case if version-specifics need to be chased it would make sense to do so for MariaDB 10.0 and not 5.x.

Comment by Arjen Lentz [ 2014-03-18 ]

AL13N you can technically have an embedded Boost in your build tree, this is how we started - however Boost/BGL is lots of files so this didn't create happiness. Therefore we didn't put it in the repo.

So, you could drop it in and make sure the build system can find it, but perhaps a better solution is to pin a specific version of Boost in your Linux install, if you find that the default/latest version has a problem. That way you can create a stable build environment without too much mess.

Please do report when a v3 has issues with specific versions of Boost, that's really important for us to track. thanks!

Comment by Otto Kekäläinen [ 2014-03-18 ]

Thanks for the info arjen!

I did indeed drop Boost and thus OQGgraph completely for MariaDB 5.5 (in Debian) as there is no compatible libboost-dev version available, while functional versions of Boost, Judy and OQGraph are present in MariaDB 10.0 (in Debian).

For details see the contents of 'control' and 'mariadb-server-x.x.install' files in debian/*
http://anonscm.debian.org/gitweb/?p=pkg-mysql/mariadb-5.5.git
http://anonscm.debian.org/gitweb/?p=pkg-mysql/mariadb-10.0.git

Note that your comments about custom build environments don't apply here. Everything in Debian and Ubuntu are build using their standard build robots, and we cannot customize anything else than the contents of our own package.

Comment by Sergei Golubchik [ 2014-03-18 ]

"Fixed" by adding a test in the CMakeLists.txt — now oqgraph is disabled on incompatible boost versions

Comment by Arjen Lentz [ 2014-03-19 ]

Serg - I can't find that info, can you please give the file path for that and/or paste the version info here?
I've looked in /engine/oqgraph/CMakeLists.txt

Comment by Sergei Golubchik [ 2014-03-19 ]

This is the revision with the fix: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4045

I didn't hard-code Boost versions (iirc 1.52 works and 1.53 doesn't), but extended try-compile check to include that piece of code that failed to compile on newer Boost.

Generated at Thu Feb 08 06:59:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.