[MDEV-19110] Cassandra plugin fails to build with libthrift-dev in Debian unstable Created: 2019-03-31  Updated: 2020-07-15  Resolved: 2020-07-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Cassandra
Affects Version/s: 10.4.3
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Otto Kekäläinen Assignee: Sergei Petrunia
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-21368 Cassandra Storage Engine does not com... Closed
Relates
relates to MDEV-23024 Remove Cassandra Storage Engine Closed

 Description   

Traditionally the Cassandra plugin has not been built in Debian as the Thrift library is not available there. Our own buildbot builders have had a manually installed Thrift library.

Since recently however libthrift-dev has been introduced into Debian repositories:
https://packages.debian.org/buster/libthrift-dev

I tried to build latest 10.4 using it but the build fails with:

}}
boost::shared_ptr<org::apache::cassandra::CassandraIf>; _Alloc = std::allocator<boost::shared_ptr<org::apache::cassandra::CassandraIf> >]'
/tmp/building/package/storage/cassandra/gen-cpp/Cassandra.h:5065:92:   required from here
/usr/include/c++/8/ext/new_allocator.h:130:29: error: invalid application of 'sizeof' to incomplete type 'boost::shared_ptr<org::apache::cassandra::CassandraIf>'
       { return size_t(-1) / sizeof(_Tp); }
                             ^~~~~~~~~~~
make[4]: *** [storage/cassandra/CMakeFiles/cassandra.dir/build.make:76: storage/cassandra/CMakeFiles/cassandra.dir/cassandra_se.cc.o] Error 1
make[4]: Leaving directory '/tmp/building/package/builddir'
{{

Full log at https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/149622

Are these failures something that could be fixed so that we could start building the Cassandra plugin everywhere?



 Comments   
Comment by Otto Kekäläinen [ 2019-03-31 ]

Thrift in Debian overview: https://tracker.debian.org/pkg/thrift

Comment by Sergei Petrunia [ 2019-04-01 ]

Hi otto,

I don't think it makes much sense to spend time on getting Cassandra Storage Engine to compile. Cassandra has deprecated their Thrift interface years ago (a few months after Cassandra SE was released ) . The new way to access Cassandra is to use the CQL Connector, which does not use Thrift.

There have been talks (and even a GSoC project) to make a CassandraSE V2 but no usable code have been produced.
The motivation to keep CassandraSE in the MariaDB source code is to have it as an example for such future attempts (Should we somehow explicitly indicate this? So that packagers like you do not spend effort in vain?)

Comment by Otto Kekäläinen [ 2019-04-01 ]

OK, thanks for the information. Yes, please document this in an appropriate place. Maybe the debian/control file stanza about the mariadb-plugin-cassandra would be an apt place (pun intended) as there also users can see the note before installing the package. Other good places could be the mariadb.com/kb and maybe some README file in the storage/cassandra directory (currently there is no README in there).

Comment by Otto Kekäläinen [ 2020-04-10 ]

MDEV-21368 seems to be a duplicate of this.

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