* [PATCH v2] tools build: Link static libs for libopenssl feature
@ 2026-03-17 8:50 Leo Yan
2026-03-17 15:52 ` Ian Rogers
0 siblings, 1 reply; 3+ messages in thread
From: Leo Yan @ 2026-03-17 8:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Namhyung Kim, James Clark,
linux-perf-users
Cc: Leo Yan
The perf static build reports that the BPF skeleton is disabled due to
the missing libopenssl feature.
Explicitly linking the libraries fixes the static build failure.
Fixes: 7678523109d1 ("tools/build: Add a feature test for libopenssl")
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
tools/build/feature/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 1fbcb3ce74d2173072748a417fc63bd9a5b13888..18a9abf6bfc43e86ecf58b96e0374a0e3c613bb0 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -384,7 +384,7 @@ $(OUTPUT)test-libpfm4.bin:
$(BUILD) -lpfm
$(OUTPUT)test-libopenssl.bin:
- $(BUILD) -lssl
+ $(BUILD) -lssl -lcrypto -lz -lzstd
$(OUTPUT)test-bpftool-skeletons.bin:
$(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
---
base-commit: bb551508e78c886e6d3bcca6c744d3bc3fd8ad59
change-id: 20260317-tools_fix_build_libopenssl-8290bfebda3c
Best regards,
--
Leo Yan <leo.yan@arm.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] tools build: Link static libs for libopenssl feature
2026-03-17 8:50 [PATCH v2] tools build: Link static libs for libopenssl feature Leo Yan
@ 2026-03-17 15:52 ` Ian Rogers
2026-03-17 19:08 ` Leo Yan
0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2026-03-17 15:52 UTC (permalink / raw)
To: Leo Yan
Cc: Arnaldo Carvalho de Melo, Namhyung Kim, James Clark,
linux-perf-users
On Tue, Mar 17, 2026 at 1:50 AM Leo Yan <leo.yan@arm.com> wrote:
>
> The perf static build reports that the BPF skeleton is disabled due to
> the missing libopenssl feature.
>
> Explicitly linking the libraries fixes the static build failure.
>
> Fixes: 7678523109d1 ("tools/build: Add a feature test for libopenssl")
> Signed-off-by: Leo Yan <leo.yan@arm.com>
> ---
> tools/build/feature/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 1fbcb3ce74d2173072748a417fc63bd9a5b13888..18a9abf6bfc43e86ecf58b96e0374a0e3c613bb0 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -384,7 +384,7 @@ $(OUTPUT)test-libpfm4.bin:
> $(BUILD) -lpfm
>
> $(OUTPUT)test-libopenssl.bin:
> - $(BUILD) -lssl
> + $(BUILD) -lssl -lcrypto -lz -lzstd
I wonder it would be better to do something like test-gtk2.bin so that
if openssl wasn't compiled with libz and libzstd things don't fail:
```
$(OUTPUT)test-gtk2.bin:
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0
2>/dev/null) -Wno-deprecated-declarations
```
so:
```
$(OUTPUT)test-openssl.bin:
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags openssl 2>/dev/null)
```
Since "-lssl" is a dependency of BUILD_ALL, that will probably also
need updating.
Thanks,
Ian
>
> $(OUTPUT)test-bpftool-skeletons.bin:
> $(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
>
> ---
> base-commit: bb551508e78c886e6d3bcca6c744d3bc3fd8ad59
> change-id: 20260317-tools_fix_build_libopenssl-8290bfebda3c
>
> Best regards,
> --
> Leo Yan <leo.yan@arm.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] tools build: Link static libs for libopenssl feature
2026-03-17 15:52 ` Ian Rogers
@ 2026-03-17 19:08 ` Leo Yan
0 siblings, 0 replies; 3+ messages in thread
From: Leo Yan @ 2026-03-17 19:08 UTC (permalink / raw)
To: Ian Rogers
Cc: Arnaldo Carvalho de Melo, Namhyung Kim, James Clark,
linux-perf-users
On Tue, Mar 17, 2026 at 08:52:23AM -0700, Ian Rogers wrote:
> On Tue, Mar 17, 2026 at 1:50 AM Leo Yan <leo.yan@arm.com> wrote:
> >
> > The perf static build reports that the BPF skeleton is disabled due to
> > the missing libopenssl feature.
> >
> > Explicitly linking the libraries fixes the static build failure.
> >
> > Fixes: 7678523109d1 ("tools/build: Add a feature test for libopenssl")
> > Signed-off-by: Leo Yan <leo.yan@arm.com>
> > ---
> > tools/build/feature/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> > index 1fbcb3ce74d2173072748a417fc63bd9a5b13888..18a9abf6bfc43e86ecf58b96e0374a0e3c613bb0 100644
> > --- a/tools/build/feature/Makefile
> > +++ b/tools/build/feature/Makefile
> > @@ -384,7 +384,7 @@ $(OUTPUT)test-libpfm4.bin:
> > $(BUILD) -lpfm
> >
> > $(OUTPUT)test-libopenssl.bin:
> > - $(BUILD) -lssl
> > + $(BUILD) -lssl -lcrypto -lz -lzstd
>
> I wonder it would be better to do something like test-gtk2.bin so that
> if openssl wasn't compiled with libz and libzstd things don't fail:
> ```
> $(OUTPUT)test-gtk2.bin:
> $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0
> 2>/dev/null) -Wno-deprecated-declarations
> ```
> so:
> ```
> $(OUTPUT)test-openssl.bin:
> $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags openssl 2>/dev/null)
> ```
> Since "-lssl" is a dependency of BUILD_ALL, that will probably also
> need updating.
Thanks for suggestion, I have sent out v3.
Just record for another issue:
I was not able to build test-all.bin successfully with static linking
until explicitly added -lexpat. Seems some Python extension libraries
depends on libexpat, but python3-config doesn't include this dependency.
This would be a wider issue - as this is not limited to feature build,
we also need to fix perf's build as well? I might look into details
when have free time.
Thanks,
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-17 19:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 8:50 [PATCH v2] tools build: Link static libs for libopenssl feature Leo Yan
2026-03-17 15:52 ` Ian Rogers
2026-03-17 19:08 ` Leo Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox