public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	James Clark <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] tools build: Link static libs for libopenssl feature
Date: Tue, 17 Mar 2026 19:08:15 +0000	[thread overview]
Message-ID: <20260317190815.GL8048@e132581.arm.com> (raw)
In-Reply-To: <CAP-5=fXopOUKZ=Hf1s5CZrb0CmH+W9XQa38JW9Bv+GXdYrcHnQ@mail.gmail.com>

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

      reply	other threads:[~2026-03-17 19:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20260317190815.GL8048@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.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