Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail with gcc 9 #6715

Closed
austinnichols101 opened this issue Apr 16, 2020 · 2 comments
Closed

Build fail with gcc 9 #6715

austinnichols101 opened this issue Apr 16, 2020 · 2 comments

Comments

@austinnichols101
Copy link

Expected behavior

Compilation completes successfully.

Actual behavior

Compilation failure:

$DEBUG_LEVEL is 0
  GEN      util/build_version.cc
$DEBUG_LEVEL is 0
  GEN      util/build_version.cc
  CC       shared-objects/cache/clock_cache.o
  CC       shared-objects/cache/lru_cache.o
  CC       shared-objects/cache/sharded_cache.o
  CC       shared-objects/db/arena_wrapped_db_iter.o
  CC       shared-objects/db/blob/blob_file_addition.o
  CC       shared-objects/db/blob/blob_file_garbage.o
  CC       shared-objects/db/blob/blob_file_meta.o
  CC       shared-objects/db/builder.o
  CC       shared-objects/db/c.o
  CC       shared-objects/db/column_family.o
  CC       shared-objects/db/compacted_db_impl.o
  CC       shared-objects/db/compaction/compaction.o
  CC       shared-objects/db/compaction/compaction_iterator.o
  CC       shared-objects/db/compaction/compaction_job.o
  CC       shared-objects/db/compaction/compaction_picker.o
  CC       shared-objects/db/compaction/compaction_picker_fifo.o
  CC       shared-objects/db/compaction/compaction_picker_level.o
  CC       shared-objects/db/compaction/compaction_picker_universal.o
  CC       shared-objects/db/convenience.o
  CC       shared-objects/db/db_filesnapshot.o
  CC       shared-objects/db/db_impl/db_impl.o
db/db_impl/db_impl.cc: In member function 'virtual rocksdb::Status rocksdb::DBImpl::SetDBOptions(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)':
db/db_impl/db_impl.cc:1082:64: warning: implicitly-declared 'rocksdb::FileOptions& rocksdb::FileOptions::operator=(const rocksdb::FileOptions&)' is deprecated [-Wdeprecated-copy]
 1082 |       file_options_for_compaction_ = FileOptions(new_db_options);
      |                                                                ^
In file included from ./file/random_access_file_reader.h:16,
                 from ./file/file_prefetch_buffer.h:14,
                 from ./table/format.h:13,
                 from ./table/internal_iterator.h:14,
                 from ./db/pinned_iterators_manager.h:12,
                 from ./db/range_tombstone_fragmenter.h:15,
                 from ./db/memtable.h:19,
                 from ./db/memtable_list.h:17,
                 from ./db/column_family.h:17,
                 from ./db/db_impl/db_impl.h:22,
                 from db/db_impl/db_impl.cc:9:
./include/rocksdb/file_system.h:106:3: note: because 'rocksdb::FileOptions' has user-provided 'rocksdb::FileOptions::FileOptions(const rocksdb::FileOptions&)'
  106 |   FileOptions(const FileOptions& opts)
      |   ^~~~~~~~~~~
db/db_impl/db_impl.cc:1084:62: warning: implicitly-declared 'rocksdb::FileOptions& rocksdb::FileOptions::operator=(const rocksdb::FileOptions&)' is deprecated [-Wdeprecated-copy]
 1084 |           file_options_for_compaction_, immutable_db_options_);
      |                                                              ^
In file included from ./file/random_access_file_reader.h:16,
                 from ./file/file_prefetch_buffer.h:14,
                 from ./table/format.h:13,
                 from ./table/internal_iterator.h:14,
                 from ./db/pinned_iterators_manager.h:12,
                 from ./db/range_tombstone_fragmenter.h:15,
                 from ./db/memtable.h:19,
                 from ./db/memtable_list.h:17,
                 from ./db/column_family.h:17,
                 from ./db/db_impl/db_impl.h:22,
                 from db/db_impl/db_impl.cc:9:
./include/rocksdb/file_system.h:106:3: note: because 'rocksdb::FileOptions' has user-provided 'rocksdb::FileOptions::FileOptions(const rocksdb::FileOptions&)'
  106 |   FileOptions(const FileOptions& opts)
      |   ^~~~~~~~~~~
db/db_impl/db_impl.cc:1088:62: warning: implicitly-declared 'rocksdb::FileOptions& rocksdb::FileOptions::operator=(const rocksdb::FileOptions&)' is deprecated [-Wdeprecated-copy]
 1088 |           file_options_for_compaction_, immutable_db_options_);
      |                                                              ^
In file included from ./file/random_access_file_reader.h:16,
                 from ./file/file_prefetch_buffer.h:14,
                 from ./table/format.h:13,
                 from ./table/internal_iterator.h:14,
                 from ./db/pinned_iterators_manager.h:12,
                 from ./db/range_tombstone_fragmenter.h:15,
                 from ./db/memtable.h:19,
                 from ./db/memtable_list.h:17,
                 from ./db/column_family.h:17,
                 from ./db/db_impl/db_impl.h:22,
                 from db/db_impl/db_impl.cc:9:
./include/rocksdb/file_system.h:106:3: note: because 'rocksdb::FileOptions' has user-provided 'rocksdb::FileOptions::FileOptions(const rocksdb::FileOptions&)'
  106 |   FileOptions(const FileOptions& opts)
      |   ^~~~~~~~~~~

Steps to reproduce the behavior

gcc --version
gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 19.10
Release:	19.10
Codename:	eoan

make shared_lib

DEBUG_LEVEL=0 make shared_lib && make install-shared INSTALL_PATH=/usr

Workaround

Adding the following compiler flag allows the build to pass

DEBUG_LEVEL=0 CXXFLAGS='-Wno-error=deprecated-copy' make shared_lib && make install-shared INSTALL_PATH=/usr

Issue is similar to #5303

@ghost
Copy link

ghost commented Apr 16, 2020

should be fixed in #6697

@austinnichols101
Copy link
Author

Confirming that this issue is resolved by #6697 (compile without CXXFLAGS was successful).
Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant