From: Adrian Bunk <bunk@stusta.de>
To: zhe.he@windriver.com
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH] rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move
Date: Fri, 31 May 2019 11:44:47 +0300 [thread overview]
Message-ID: <20190531084447.GA18583@localhost> (raw)
In-Reply-To: <1559271137-240663-1-git-send-email-zhe.he@windriver.com>
On Fri, May 31, 2019 at 10:52:17AM +0800, zhe.he@windriver.com wrote:
> 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
> +}
>...
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
--
"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
next prev parent reply other threads:[~2019-05-31 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-06-14 19:25 ` Khem Raj
2019-06-14 23:29 ` Adrian Bunk
2019-06-14 23:45 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190531084447.GA18583@localhost \
--to=bunk@stusta.de \
--cc=openembedded-devel@lists.openembedded.org \
--cc=zhe.he@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox