rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move
PATCH 1/1 rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move
From: He Zhe <[email protected]>
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]
--- meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3 -0
@@ -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
Signature · 1 line
2.7.4
Quoted 19 lines · On Fri, May 31, 2019 at 10:52:17AM +0800, [email protected] wrote:
From: He Zhe <[email protected]>
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 'constexprrocksdb::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 <[email protected]>--- meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +0
-0
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb EXTRA_OECMAKE = "\ · line 36
Quoted 7 lines
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3
-0@@ -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 +}
It would be more elegant to add -DFAIL_ON_WARNINGS=OFF to EXTRA_OECMAKE instead.
This is also correct in general, since the few packages using -Werror are frequently causing this kind of problem for distributions.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 32 lines · Adrian Bunk
Quoted 19 lines · On Fri, May 31, 2019 at 10:52:17AM +0800, [email protected] wrote:
From: He Zhe <[email protected]>
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 'constexprrocksdb::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 <[email protected]>--- meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +0
-0meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb EXTRA_OECMAKE = "\ · line 36
Quoted 7 lines
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3
-0@@ -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 +}It would be more elegant to add -DFAIL_ON_WARNINGS=OFF to
EXTRA_OECMAKEinstead.
Quoted 3 lines
This is also correct in general, since the few packages using -Werror are frequently causing this kind of problem for distributions.
we also have a patch for new 6.x version, I am inclined to take that, so please check if this patch is still needed or not on that version secondly I see that deprecate-copy is gcc specific option, so mark it with toolchain-gcc override so if needed
Quoted 15 lines
cu
Adrian--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Quoted 33 lines · Khem Raj
Quoted 32 lines · Adrian Bunk
Quoted 19 lines · On Fri, May 31, 2019 at 10:52:17AM +0800, [email protected] wrote:
From: He Zhe <[email protected]>
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 'constexprrocksdb::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 <[email protected]>--- meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +0
-0meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb EXTRA_OECMAKE = "\ · line 36
Quoted 7 lines
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3
-0@@ -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 +}It would be more elegant to add -DFAIL_ON_WARNINGS=OFF to
EXTRA_OECMAKEinstead.
Quoted 7 lines
Quoted 3 lines
This is also correct in general, since the few packages using -Werror are frequently causing this kind of problem for distributions.
we also have a patch for new 6.x version, I am inclined to take that, so please check if this patch is still needed or not on that version
...
The 6.0.2 patch adds a fix for this on top of 6.0.2:
This also includes a patch that fixes GCC9 compatibility, it's currently submitted upstream but not yet accepted due to style issues.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 39 lines · Adrian Bunk
Quoted 37 lines · Khem Raj
Quoted 35 lines · Adrian Bunk
Quoted 19 lines · On Fri, May 31, 2019 at 10:52:17AM +0800, [email protected] wrote:
From: He Zhe <[email protected]>
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 'constexprrocksdb::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 <[email protected]>--- meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +0
-0meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb EXTRA_OECMAKE = "\ · line 36
Quoted 7 lines
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3
-0@@ -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 +}It would be more elegant to add -DFAIL_ON_WARNINGS=OFF to
EXTRA_OECMAKEinstead.This is also correct in general, since the few packages using -Werror are frequently causing this kind of problem for distributions.
Quoted 7 lines
Quoted 3 lines
we also have a patch for new 6.x version, I am inclined to take that, so please check if this patch is still needed or not on that version
...The 6.0.2 patch adds a fix for this on top of 6.0.2:
This also includes a patch that fixes GCC9 compatibility, it's currently submitted upstream but not yet accepted due to style issues.
yeah I think the patch is quite gcc specific, not upstream worthy IMO
Quoted 12 lines
cu
Adrian--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed