From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, heiko.carstens@de.ibm.com,
brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com
Subject: Re: [PATCH v3] perf build: Build error in libbpf with EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"
Date: Mon, 30 Jul 2018 12:35:09 -0700 [thread overview]
Message-ID: <20180730123509.0ffa4737@cakuba.netronome.com> (raw)
In-Reply-To: <20180730085323.75738-1-tmricht@linux.ibm.com>
On Mon, 30 Jul 2018 10:53:23 +0200, Thomas Richter wrote:
> commit 531b014e7a2f ("tools: bpf: make use of reallocarray")
> causes a compiler error when building the perf tool in the linux-next
> tree. Compile file tools/lib/bpf/libbpf.c on a FEDORA 28
> installation with gcc compiler
> version: gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
> shows this error message:
>
> [root@p23lp27] # make V=1 EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"
> [...]
> make -f /home6/tmricht/linux-next/tools/build/Makefile.build
> dir=./util/scripting-engines obj=libperf
> libbpf.c: In function ‘bpf_object__elf_collect’:
> libbpf.c:811:15: error: ignoring return value of ‘strerror_r’,
> declared with attribute warn_unused_result [-Werror=unused-result]
> strerror_r(-err, errmsg, sizeof(errmsg));
> ^
> cc1: all warnings being treated as errors
> mv: cannot stat './.libbpf.o.tmp': No such file or directory
> /home6/tmricht/linux-next/tools/build/Makefile.build:96: recipe for target 'libbpf.o' failed
>
> Replace all occurrences of strerror() by calls to strerror_r().
> To keep the compiler quiet also use the return value from strerror_r()
> otherwise a 'variable set but not use' warning which is treated as error
> terminates the compile.
>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
> Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Conversion looks correct, thank you!
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
next prev parent reply other threads:[~2018-07-30 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 8:53 [PATCH v3] perf build: Build error in libbpf with EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2" Thomas Richter
2018-07-30 19:35 ` Jakub Kicinski [this message]
2018-07-31 0:13 ` Daniel Borkmann
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=20180730123509.0ffa4737@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ast@kernel.org \
--cc=brueckner@linux.vnet.ibm.com \
--cc=daniel@iogearbox.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tmricht@linux.ibm.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