All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move
@ 2019-05-31  2:52 zhe.he
  2019-05-31  8:44 ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: zhe.he @ 2019-05-31  2:52 UTC (permalink / raw)
  To: openembedded-devel

From: He Zhe <zhe.he@windriver.com>

GCC9 introduce more stricter checks deprecated-copy and pessimizing-move, while
rocksdb uses -Werror and causes the following build error.

db/version_edit.h:178:33: error: implicitly-declared 'constexpr rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)' is deprecated [-Werror=deprecated-copy]

utilities/persistent_cache/persistent_cache_util.h:51:23: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 8d84619..bbd8e4f 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -31,6 +31,9 @@ EXTRA_OECMAKE = "\
     -DWITH_TESTS=OFF \
     -DWITH_TOOLS=OFF \
 "
+do_compile_prepend() {
+    sed -i 's/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=shadow")/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=shadow -Wno-error=deprecated-copy -Wno-error=pessimizing-move")/' ${S}/CMakeLists.txt
+}
 
 do_install_append() {
     # fix for qa check buildpaths
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-14 23:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31  2:52 [meta-oe][PATCH] rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move zhe.he
2019-05-31  8:44 ` Adrian Bunk
2019-06-14 19:25   ` Khem Raj
2019-06-14 23:29     ` Adrian Bunk
2019-06-14 23:45       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.