[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZj4PEamHktYLHqHrau0_pkr_q-J85MPCzFbe7mtLQ_+Q@mail.gmail.com>
Date: Tue, 21 Jan 2020 11:06:07 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Chris Down <chris@...isdown.name>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH] bpf: btf: Always output invariant hit in pahole DWARF to
BTF transform
On Tue, Jan 21, 2020 at 7:05 AM Chris Down <chris@...isdown.name> wrote:
>
> When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this
> error:
>
> % make -s
> Failed to generate BTF for vmlinux
> Try to disable CONFIG_DEBUG_INFO_BTF
> make[3]: *** [vmlinux] Error 1
>
> Compiling again without -s shows the true error (that pahole is
> missing), but since this is fatal, we should show the error
> unconditionally on stderr as well, not silence it using the `info`
> function. With this patch:
>
> % make -s
> BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
> Failed to generate BTF for vmlinux
> Try to disable CONFIG_DEBUG_INFO_BTF
> make[3]: *** [vmlinux] Error 1
>
> Signed-off-by: Chris Down <chris@...isdown.name>
> Cc: Stanislav Fomichev <sdf@...gle.com>
> Cc: Andrii Nakryiko <andriin@...com>
> Cc: John Fastabend <john.fastabend@...il.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Cc: bpf@...r.kernel.org
> Cc: kernel-team@...com
> ---
> scripts/link-vmlinux.sh | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index c287ad9b3a67..c8e9f49903a0 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -108,13 +108,15 @@ gen_btf()
> local bin_arch
>
> if ! [ -x "$(command -v ${PAHOLE})" ]; then
> - info "BTF" "${1}: pahole (${PAHOLE}) is not available"
> + printf 'BTF: %s: pahole (%s) is not available\n' \
> + "${1}" "${PAHOLE}" >&2
any reason not to use echo instead of printf? would be more minimal change
> return 1
> fi
>
> pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
> if [ "${pahole_ver}" -lt "113" ]; then
> - info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
> + printf 'BTF: %s: pahole version %s is too old, need at least v1.13\n' \
> + "${1}" "$(${PAHOLE} --version)" >&2
> return 1
> fi
>
> --
> 2.25.0
>
Powered by blists - more mailing lists