BPF List
 help / color / mirror / Atom feed
From: Paul Chaignon <paul.chaignon@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Vitaly Chikunov <vt@altlinux.org>,
	bpf@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH bpf v3] resolve_btfids: Fix linker flags detection
Date: Thu, 5 Mar 2026 13:03:28 +0100	[thread overview]
Message-ID: <aalxEFnPAF5U1Y3h@Tunnel> (raw)
In-Reply-To: <20260305014730.3123382-1-ihor.solodrai@linux.dev>

On Wed, Mar 04, 2026 at 05:47:30PM -0800, Ihor Solodrai wrote:
> The "|| echo -lzstd" default makes zstd an unconditional link
> dependency of resolve_btfids. On systems where libzstd-dev is not
> installed and pkg-config fails, the linker fails:
> 
>   ld: cannot find -lzstd: No such file or directory
> 
> libzstd is a transitive dependency of libelf, so the -lzstd flag is
> strictly necessary only for static builds [1].
> 
> Remove ZSTD_LIBS variable, and instead set LIBELF_LIBS depending on
> whether the build is static or not. Use $(HOSTPKG_CONFIG) as primary
> source of the flags list.
> 
> Also add a default value for HOSTPKG_CONFIG in case it's not built via
> the toplevel Makefile. Pass it from selftests/bpf too.
> 
> [1] https://lore.kernel.org/bpf/4ff82800-2daa-4b9f-95a9-6f512859ee70@linux.dev/
> 
> Reported-by: BPF CI Bot (Claude Opus 4.6) <bot+bpf-ci@kernel.org>
> Reported-by: Vitaly Chikunov <vt@altlinux.org>
> Closes: https://lore.kernel.org/bpf/aaWqMcK-2AQw5dx8@altlinux.org/
> Fixes: 4021848a903e ("selftests/bpf: Pass through build flags to bpftool and resolve_btfids")
> Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> ---

Reviewed-by: Paul Chaignon <paul.chaignon@gmail.com>

[...]


  reply	other threads:[~2026-03-05 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05  1:47 [PATCH bpf v3] resolve_btfids: Fix linker flags detection Ihor Solodrai
2026-03-05 12:03 ` Paul Chaignon [this message]
2026-03-07 17:00 ` patchwork-bot+netdevbpf

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=aalxEFnPAF5U1Y3h@Tunnel \
    --to=paul.chaignon@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ihor.solodrai@linux.dev \
    --cc=kernel-team@meta.com \
    --cc=vt@altlinux.org \
    /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