From: Leo Yan <leo.yan@arm.com>
To: Quentin Monnet <qmo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Nick Terrell <terrelln@fb.com>,
bpf@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org, Mahe Tardy <mahe.tardy@gmail.com>
Subject: Re: [PATCH] bpftool: Fix failure with static linkage
Date: Thu, 5 Dec 2024 10:23:10 +0000 [thread overview]
Message-ID: <20241205102310.GA2899345@e132581.arm.com> (raw)
In-Reply-To: <d4d5e80d-1a95-4ef7-a83f-1303563a91eb@kernel.org>
On Wed, Dec 04, 2024 at 10:55:32PM +0000, Quentin Monnet wrote:
[...]
> >>> I was about to report exactly the same. :)
> >>
> >> Thank you both. This has been reported before [0] but I didn't find the
> >> time to look into a proper fix.
> >>
> >> The tricky part is that static linkage works well without libzstd for
> >> older versions of elfutils [1], but newer versions now require this
> >> library. Which means that we don't want to link against libzstd
> >> unconditionally, or users trying to build bpftool may have to install
> >> unnecessary dependencies. Instead we should add a new probe under
> >> tools/build/feature (Note that we already have several combinations in
> >> there, libbfd, libbfd-liberty, libbfd-liberty-z, and I'm not sure what's
> >> the best approach in terms of new combinations).
> >
> > I think you can use pkg-config if available.
> >
> > $ pkg-config --static --libs libelf
> > -lelf -lz -lzstd -pthread
>
> That's another dependency that I'd like to avoid if I can :)
Seems to me, pkg-config is the right tool for doing such kind thing -
not only it is nature for local building, it is also friendly for build
system (e.g. buildroot, OpenEmbedded / Yocto). Though I have no deep
knowledge for building.
I am a bit confused why this issue is related to build features libbfd,
libbfd-liberty, libbfd-liberty-z. Should not the issue is related to
libelf? build/feature has several libelf checking, maybe we can add new
one libelf-zstd?
Thanks,
Leo
next prev parent reply other threads:[~2024-12-05 10:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 21:30 [PATCH] bpftool: Fix failure with static linkage Leo Yan
2024-12-04 21:36 ` Namhyung Kim
2024-12-04 22:08 ` Quentin Monnet
2024-12-04 22:25 ` Namhyung Kim
2024-12-04 22:55 ` Quentin Monnet
2024-12-05 10:23 ` Leo Yan [this message]
2024-12-05 10:58 ` Quentin Monnet
2024-12-10 18:26 ` Andrii Nakryiko
2024-12-10 20:19 ` Leo Yan
2024-12-05 19:24 ` Stanislav Fomichev
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=20241205102310.GA2899345@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mahe.tardy@gmail.com \
--cc=martin.lau@linux.dev \
--cc=namhyung@kernel.org \
--cc=qmo@kernel.org \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=terrelln@fb.com \
--cc=yonghong.song@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.