lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241205102310.GA2899345@e132581.arm.com>
Date: Thu, 5 Dec 2024 10:23:10 +0000
From: Leo Yan <leo.yan@....com>
To: Quentin Monnet <qmo@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Andrii Nakryiko <andrii@...nel.org>,
	Martin KaFai Lau <martin.lau@...ux.dev>,
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
	Yonghong Song <yonghong.song@...ux.dev>,
	John Fastabend <john.fastabend@...il.com>,
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
	Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
	Nick Terrell <terrelln@...com>, bpf@...r.kernel.org,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mahe Tardy <mahe.tardy@...il.com>
Subject: Re: [PATCH] bpftool: Fix failure with static linkage

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ