[MDEV-20470] MyRocks fails to compile on Debian Bullseye/Sid, gcc 9.2.1 Created: 2019-09-02  Updated: 2023-04-27

Status: Stalled
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19740 Debug build of 10.3.15 FTBFS Stalled
relates to MDEV-30610 Update RocksDB to the latest upstream... Open

 Description   

This is based on marko's complaints:

Compiling MyRocks on the recent Debian Unstable (bullseye/sid) fails with errors.

I've found four kinds of errors :

storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/db/compaction/compaction_picker_fifo.cc.o
|| In file included from /root/10.4/storage/rocksdb/rocksdb/db/memtable.h:21,
|| /root/10.4/storage/rocksdb/rocksdb/db/version_edit.h: In constructor 'rocksdb::FdWithKeyRange::FdWithKeyRange(rocksdb::FileDescriptor, rocksdb::Slice, rocksdb::Slice, rocksdb::FileMetaData*)':
storage/rocksdb/rocksdb/db/version_edit.h|178 col 33| error: implicitly-declared 'constexpr rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)' is deprecated [-Werror=deprecated-copy]
||   178 |         largest_key(_largest_key) {}
||       |                                 ^
storage/rocksdb/rocksdb/db/version_edit.h|55 col 19| note: because 'rocksdb::FileDescriptor' has user-provided 'rocksdb::FileDescriptor& rocksdb::FileDescriptor::operator=(const rocksdb::FileDescriptor&)'
||    55 |   FileDescriptor& operator=(const FileDescriptor& fd) {
||       |                   ^~~~~~~~

 
|| /root/10.4/storage/rocksdb/rocksdb/db/internal_stats.cc: In member function 'void rocksdb::InternalStats::DumpCFStatsNoFileHistogram(std::string*)':
storage/rocksdb/rocksdb/db/internal_stats.cc|1380 col 35| error: implicitly-declared 'rocksdb::InternalStats::CompactionStats& rocksdb::InternalStats::CompactionStats::operator=(const rocksdb::InternalStats::CompactionStats&)' is deprecated [-Werror=deprecated-copy]
||  1380 |   cf_stats_snapshot_.comp_stats = compaction_stats_sum;
||       |                                   ^~~~~~~~~~~~~~~~~~~~

 
|| /root/10.4/storage/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_util.h: In instantiation of 'T rocksdb::BoundedQueue<T>::Pop() [with T = rocksdb::ThreadedWriter::IO]':
storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc|556 col 18| required from here
storage/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_util.h|51 col 23| error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
||    51 |     return std::move(t);
||       |                       ^

|| /root/10.4/storage/rocksdb/rocksdb/env/io_posix.cc: In member function 'virtual rocksdb::Status rocksdb::PosixMmapFile::Allocate(uint64_t, uint64_t)':
storage/rocksdb/rocksdb/env/io_posix.cc|807 col 17| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
||   807 |   assert(offset <= std::numeric_limits<off_t>::max());
||       |          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/rocksdb/rocksdb/env/io_posix.cc|808 col 14| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
||   808 |   assert(len <= std::numeric_limits<off_t>::max());
||       |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|| /root/10.4/storage/rocksdb/rocksdb/env/io_posix.cc: In member function 'virtual rocksdb::Status rocksdb::PosixWritableFile::PositionedAppend(const rocksdb::Slice&, uint64_t)':
storage/rocksdb/rocksdb/env/io_posix.cc|877 col 17| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
||   877 |   assert(offset <= std::numeric_limits<off_t>::max());
||       |          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|| /root/10.4/storage/rocksdb/rocksdb/env/io_posix.cc: In member function 'virtual rocksdb::Status rocksdb::PosixWritableFile::Allocate(uint64_t, uint64_t)':
storage/rocksdb/rocksdb/env/io_posix.cc|1013 col 17| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
||  1013 |   assert(offset <= std::numeric_limits<off_t>::max());
||       |          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/rocksdb/rocksdb/env/io_posix.cc|1014 col 14| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
||  1014 |   assert(len <= std::numeric_limits<off_t>::max());
||       |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|| cc1plus: all warnings being treated as errors



 Comments   
Comment by Sergei Petrunia [ 2019-09-02 ]

Duplicate of MDEV-19740. Will be fixed when we update RocksDB to a newer version

Comment by Sergei Petrunia [ 2019-09-02 ]

No, not all of the issues will be fixed

Comment by Sergei Petrunia [ 2019-09-02 ]

Errors similar to this one

storage/rocksdb/rocksdb/env/io_posix.cc|1014 col 14| error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]

are fixed in this commit:

commit 849a8c0ae0a0d72e0872f8c497626e1ff6dd8af9
Author:	Yi Wu <yiwu@pingcap.com>  Wed Jul 31 00:09:02 2019
Committer:	Facebook Github Bot <facebook-github-bot@users.noreply.github.com>  Wed Jul 31 00:12:54 2019
 
fix sign compare warnings (#5651)

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