public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Leo Yan <leo.yan@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Dmitrii Dolgov <9erthalion6@gmail.com>,
	James Clark <james.clark@linaro.org>,
	Blake Jones <blakejones@google.com>,
	Yuzhuo Jing <yuzhuo@google.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools build: Link crypto lib for libopenssl feature
Date: Mon, 16 Mar 2026 11:40:38 -0700	[thread overview]
Message-ID: <abhOpjDG6hr-Sfe2@google.com> (raw)
In-Reply-To: <20260307140553.2021539-1-leo.yan@arm.com>

Hi Leo,

On Sat, Mar 07, 2026 at 02:05:53PM +0000, Leo Yan wrote:
> The perf static build reports that the BPF skeleton is disabled due to
> the missing libopenssl feature.
> 
> Linking the crypto library fixes the static build failure.

I'm not sure if it's enough.  My build still doesn't have BPF skeleton
support even with this change.  It seems to want zlib and zstd as well.

Here's my tools/build/feature/test-libopenssl.make.output.

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function `dlfcn_globallookup':
(.text+0x18): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-bio_addr.o): in function `BIO_lookup_ex':
(.text+0xe77): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-bio_sock.o): in function `BIO_gethostbyname':
(.text+0x85): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_expand_block':
(.text+0x83): undefined reference to `inflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_compress_block':
(.text+0x157): undefined reference to `deflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_finish':
(.text+0x1bd): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0x1c6): undefined reference to `deflateEnd'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_stateful_init':
(.text+0x293): undefined reference to `inflateInit_'
/usr/bin/ld: (.text+0x308): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_ctrl':
(.text+0x506): undefined reference to `zError'
/usr/bin/ld: (.text+0x5f8): undefined reference to `deflate'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_write':
(.text+0x8c9): undefined reference to `deflate'
/usr/bin/ld: (.text+0x946): undefined reference to `zError'
/usr/bin/ld: (.text+0x9e7): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_read':
(.text+0xad9): undefined reference to `inflate'
/usr/bin/ld: (.text+0xb56): undefined reference to `zError'
/usr/bin/ld: (.text+0xbcb): undefined reference to `inflateInit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_expand_block':
(.text+0xc64): undefined reference to `uncompress'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_compress_block':
(.text+0xce4): undefined reference to `compress'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `bio_zlib_free':
(.text+0xd39): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0xd64): undefined reference to `deflateEnd'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_expand_block':
(.text+0x9e): undefined reference to `ZSTD_decompressStream'
/usr/bin/ld: (.text+0xa9): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_compress_block':
(.text+0x178): undefined reference to `ZSTD_compressStream2'
/usr/bin/ld: (.text+0x180): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0x1bf): undefined reference to `ZSTD_endStream'
/usr/bin/ld: (.text+0x1c7): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0x1ef): undefined reference to `ZSTD_flushStream'
/usr/bin/ld: (.text+0x1f7): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_finish':
(.text+0x22b): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: (.text+0x234): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_stateful_init':
(.text+0x2fd): undefined reference to `ZSTD_createCStream_advanced'
/usr/bin/ld: (.text+0x316): undefined reference to `ZSTD_initCStream'
/usr/bin/ld: (.text+0x337): undefined reference to `ZSTD_createDStream_advanced'
/usr/bin/ld: (.text+0x34c): undefined reference to `ZSTD_initDStream'
/usr/bin/ld: (.text+0x374): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: (.text+0x37d): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_new':
(.text+0x42c): undefined reference to `ZSTD_createDStream_advanced'
/usr/bin/ld: (.text+0x444): undefined reference to `ZSTD_initDStream'
/usr/bin/ld: (.text+0x449): undefined reference to `ZSTD_DStreamInSize'
/usr/bin/ld: (.text+0x46e): undefined reference to `ZSTD_createCStream_advanced'
/usr/bin/ld: (.text+0x488): undefined reference to `ZSTD_initCStream'
/usr/bin/ld: (.text+0x48d): undefined reference to `ZSTD_CStreamInSize'
/usr/bin/ld: (.text+0x4f4): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: (.text+0x4fd): undefined reference to `ZSTD_freeCStream'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_ctrl':
(.text+0x6dc): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: (.text+0x78d): undefined reference to `ZSTD_flushStream'
/usr/bin/ld: (.text+0x798): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_write':
(.text+0x9a2): undefined reference to `ZSTD_compressStream2'
/usr/bin/ld: (.text+0x9ad): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0xa24): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_read':
(.text+0xbcd): undefined reference to `ZSTD_decompressStream'
/usr/bin/ld: (.text+0xbd8): undefined reference to `ZSTD_isError'
/usr/bin/ld: (.text+0xc14): undefined reference to `ZSTD_getErrorName'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_oneshot_expand_block':
(.text+0xd87): undefined reference to `ZSTD_decompress'
/usr/bin/ld: (.text+0xd94): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `zstd_oneshot_compress_block':
(.text+0xe0a): undefined reference to `ZSTD_compress'
/usr/bin/ld: (.text+0xe17): undefined reference to `ZSTD_isError'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): in function `bio_zstd_free':
(.text+0xe77): undefined reference to `ZSTD_freeDStream'
/usr/bin/ld: (.text+0xe95): undefined reference to `ZSTD_freeCStream'
collect2: error: ld returned 1 exit status

Thanks,
Namhyung


  reply	other threads:[~2026-03-16 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-07 14:05 [PATCH] tools build: Link crypto lib for libopenssl feature Leo Yan
2026-03-16 18:40 ` Namhyung Kim [this message]
2026-03-17  8:48   ` Leo Yan

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=abhOpjDG6hr-Sfe2@google.com \
    --to=namhyung@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=acme@kernel.org \
    --cc=blakejones@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=yuzhuo@google.com \
    /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