From ff66e638953e9536d980f7fb9b35ec687a5b1292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foyer?= Date: Tue, 19 Sep 2023 16:02:18 +0200 Subject: [PATCH] Fix missing library libsymLite.so Since dyninst/dyninst@739ad57883f032fb18a6c741f0c2f98e9a766bc7, the library can be built with `LIGHTWEIGHT_SYMTAB=ON` which allows (or disallows) for the building of the lightweight version of the dyninst library (particularly the Stackwalking, Parsing and ProcControl. This commit takes that in account by checking whether the light version is available, and if not, adds the relevant shared libraries. --- config/macros.m4 | 3 +++ src/launcher/dyninst/Makefile.am | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/macros.m4 b/config/macros.m4 index 88db6877..532167e8 100644 --- a/config/macros.m4 +++ b/config/macros.m4 @@ -1868,6 +1868,9 @@ AC_DEFUN([AX_PROG_DYNINST], dnl Check for stackwalk within DynInst (is Dyninst > 7.0.1?) AM_CONDITIONAL(DYNINST_HAVE_STACKWALK, test -f "${DYNINST_LIBSDIR}/libstackwalk.so") + dnl Check for DynInst flavour: Lite or Full? + AM_CONDITIONAL(DYNINST_IS_LITE, test -f "${DYNINST_LIBSDIR}/libsymLite.so") + dnl Did the checks pass? AM_CONDITIONAL(HAVE_DYNINST, test "${DYNINST_INSTALLED}" = "yes") diff --git a/src/launcher/dyninst/Makefile.am b/src/launcher/dyninst/Makefile.am index 78926880..5c9f00b1 100644 --- a/src/launcher/dyninst/Makefile.am +++ b/src/launcher/dyninst/Makefile.am @@ -15,7 +15,14 @@ DYNINST_EXTRA_LIBS += -lpatchAPI endif # Step #2, add pcontrol, stackwalk, dynDwarf/Elf and symLite if DYNINST_HAVE_STACKWALK -DYNINST_EXTRA_LIBS += -lpcontrol -lstackwalk -lcommon -ldynDwarf -ldynElf -lsymLite +DYNINST_EXTRA_LIBS += -lpcontrol -lstackwalk -lcommon -ldynDwarf -ldynElf +endif +# Step #3, add symLite if DynInst was configured with LIGHTWEIGHT_SYMTAB=On, all +# other required libraries otherwise. +if DYNINST_IS_LITE +DYNINST_EXTRA_LIBS += -lsymLite +else +DYNINST_EXTRA_LIBS += -lsymtabAPI endif extrae_SOURCES = extrae.C \