Closed LionZA1979 closed 2 years ago
When trying running new install
Script ./installing_deps.sh errors with the following
db/db_impl/db_impl_compaction_flush.cc: In member function ‘rocksdb::Status rocksdb::DBImpl::CompactFilesImpl(const rocksdb::CompactionOptions&, rocksdb::ColumnFamilyData, rocksdb::Version, const std::vector<std::__cxx11::basic_string >&, std::vector<std::__cxx11::basic_string >, int, int, rocksdb::JobContext, rocksdb::LogBuffer, rocksdb::CompactionJobInfo)’: db/db_impl/db_impl_compaction_flush.cc:1040:21: error: loop variable ‘newf’ creates a copy from type ‘const std::pair<int, rocksdb::FileMetaData>’ [-Werror=range-loop-construct] 1040 | for (const auto newf : c->edit()->GetNewFiles()) { | ^~~~ db/db_impl/db_impl_compaction_flush.cc:1040:21: note: use reference type to prevent copying 1040 | for (const auto newf : c->edit()->GetNewFiles()) { | ^~~~ | & db/db_impl/db_impl_compaction_flush.cc: In member function ‘void rocksdb::DBImpl::NotifyOnCompactionBegin(rocksdb::ColumnFamilyData, rocksdb::Compaction, const rocksdb::Status&, const rocksdb::CompactionJobStats&, int)’: db/db_impl/db_impl_compaction_flush.cc:1140:21: error: loop variable ‘newf’ creates a copy from type ‘const std::pair<int, rocksdb::FileMetaData>’ [-Werror=range-loop-construct] 1140 | for (const auto newf : c->edit()->GetNewFiles()) { | ^~~~ db/db_impl/db_impl_compaction_flush.cc:1140:21: note: use reference type to prevent copying 1140 | for (const auto newf : c->edit()->GetNewFiles()) { | ^~~~ | & cc1plus: all warnings being treated as errors make[2]: [Makefile:2117: db/db_impl/db_impl_compaction_flush.o] Error 1 make[2]: Leaving directory '/AIL-framework/ardb/deps/rocksdb-6.8.1' make[1]: [Makefile:411: /AIL-framework/ardb/src/../deps/rocksdb-6.8.1/librocksdb.a] Error 2 make[1]: Leaving directory '/AIL-framework/ardb/src' make: *** [Makefile:4: all] Error 2
Same issue. Did you find a solution ?
Unfortunately no solution has been advised yet
I just tried on ubuntu 20.04 and it works as expected.
When trying running new install
Script ./installing_deps.sh errors with the following
db/db_impl/db_impl_compaction_flush.cc: In member function ‘rocksdb::Status rocksdb::DBImpl::CompactFilesImpl(const rocksdb::CompactionOptions&, rocksdb::ColumnFamilyData, rocksdb::Version, const std::vector<std::__cxx11::basic_string >&, std::vector<std::__cxx11::basic_string >, int, int, rocksdb::JobContext, rocksdb::LogBuffer, rocksdb::CompactionJobInfo)’:
db/db_impl/db_impl_compaction_flush.cc:1040:21: error: loop variable ‘newf’ creates a copy from type ‘const std::pair<int, rocksdb::FileMetaData>’ [-Werror=range-loop-construct]
1040 | for (const auto newf : c->edit()->GetNewFiles()) {
| ^~~~
db/db_impl/db_impl_compaction_flush.cc:1040:21: note: use reference type to prevent copying
1040 | for (const auto newf : c->edit()->GetNewFiles()) {
| ^~~~
| &
db/db_impl/db_impl_compaction_flush.cc: In member function ‘void rocksdb::DBImpl::NotifyOnCompactionBegin(rocksdb::ColumnFamilyData, rocksdb::Compaction, const rocksdb::Status&, const rocksdb::CompactionJobStats&, int)’:
db/db_impl/db_impl_compaction_flush.cc:1140:21: error: loop variable ‘newf’ creates a copy from type ‘const std::pair<int, rocksdb::FileMetaData>’ [-Werror=range-loop-construct]
1140 | for (const auto newf : c->edit()->GetNewFiles()) {
| ^~~~
db/db_impl/db_impl_compaction_flush.cc:1140:21: note: use reference type to prevent copying
1140 | for (const auto newf : c->edit()->GetNewFiles()) {
| ^~~~
| &
cc1plus: all warnings being treated as errors
make[2]: [Makefile:2117: db/db_impl/db_impl_compaction_flush.o] Error 1
make[2]: Leaving directory '/AIL-framework/ardb/deps/rocksdb-6.8.1'
make[1]: [Makefile:411: /AIL-framework/ardb/src/../deps/rocksdb-6.8.1/librocksdb.a] Error 2
make[1]: Leaving directory '/AIL-framework/ardb/src'
make: *** [Makefile:4: all] Error 2