From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] Fix static build when zstd is enabled for libelf
Date: Fri, 3 Mar 2023 17:17:34 +0100 [thread overview]
Message-ID: <20230303161734.469458-1-mark@klomp.org> (raw)
When doing a static build (as with --enable-gcov) the build fails
because the executables aren't linked with -lzstd. Also the
run-debuginfod-query-retry.sh test relies on libdebuginfod.so.1 which
isn't there.
Fix by adding $(zstd_LIBS) to the static libelf lines and using the
debuginfod-find executable itself in the testcase.
* src/Makefile.am (libelf): When BUILD_STATIC add $(zstd_LIBS)
* tests/Makefile.am (libelf): Likewise.
* tests/run-debuginfod-query-retry.sh: Use debuginfod-find instead
of libdebuginfod.so.1
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
src/Makefile.am | 2 +-
tests/Makefile.am | 2 +-
tests/run-debuginfod-query-retry.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6cc019da..10d59a48 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@ CLEANFILES += make-debug-archive
if BUILD_STATIC
libasm = ../libasm/libasm.a
libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
-libelf = ../libelf/libelf.a -lz
+libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
else
libasm = ../libasm/libasm.so
libdw = ../libdw/libdw.so
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fd58bf84..7e32f117 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -664,7 +664,7 @@ installcheck-local:
if BUILD_STATIC
libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
-libelf = ../libelf/libelf.a -lz
+libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
libasm = ../libasm/libasm.a
else
libdw = ../libdw/libdw.so
diff --git a/tests/run-debuginfod-query-retry.sh b/tests/run-debuginfod-query-retry.sh
index 2f551ffb..d2cdfd65 100755
--- a/tests/run-debuginfod-query-retry.sh
+++ b/tests/run-debuginfod-query-retry.sh
@@ -26,7 +26,7 @@ unset VALGRIND_CMD
# set up tests for retrying failed queries.
retry_attempts=`(testrun env DEBUGINFOD_URLS=http://255.255.255.255/JUNKJUNK DEBUGINFOD_RETRY_LIMIT=10 DEBUGINFOD_VERBOSE=1 DEBUGINFOD_CACHE_PATH=${PWD}/.client_cache \
${abs_top_builddir}/debuginfod/debuginfod-find debuginfo \
- ${abs_top_builddir}/debuginfod/libdebuginfod.so.1 || true) \
+ ${abs_top_builddir}/debuginfod/debuginfod-find || true) \
2>&1 >/dev/null | grep -c 'Retry failed query'`
if [ $retry_attempts -ne 10 ]; then
echo "retry mechanism failed."
--
2.39.2
reply other threads:[~2023-03-03 16:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230303161734.469458-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).