From 916d0d910ad5407bc7826505aa05b277f5739a34 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 27 Jul 2019 01:10:16 -0400 Subject: [PATCH] Remove popt from project's dependencies All of the argument parsing having been moved to use the internal argpar library, we can now stop linking with popt. And since it was the last use of popt in the repo, remove anything related to it. Change-Id: Id2aee4869780e586833d6b6646e12e19c6d78f6a Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1795 Tested-by: jenkins Reviewed-by: Philippe Proulx --- CONTRIBUTING.adoc | 3 +-- Makefile.am | 4 ---- README | 3 --- configure.ac | 20 -------------------- extras/valgrind/popt.supp | 8 -------- src/cli/Makefile.am | 3 +-- src/cli/babeltrace2-cfg-cli-args.c | 3 +-- src/cli/babeltrace2-cfg-cli-params-arg.c | 1 - src/cli/babeltrace2.c | 1 - src/plugins/ctf/common/metadata/Makefile.am | 2 +- 10 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 extras/valgrind/popt.supp diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index be9688a3..72434e89 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1489,8 +1489,7 @@ loads libbabeltrace2, use: ---- $ G_SLICE=always-malloc G_DEBUG=gc-friendly PYTHONMALLOC=malloc \ - LIBBABELTRACE2_NO_DLCLOSE=1 valgrind --leak-check=full \ - --suppressions=/path/to/babeltrace/extras/valgrind/popt.supp app + LIBBABELTRACE2_NO_DLCLOSE=1 valgrind --leak-check=full app ---- `G_SLICE=always-malloc` and `G_DEBUG=gc-friendly` is for GLib and diff --git a/Makefile.am b/Makefile.am index 1c224213..cb1ec0f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,10 +6,6 @@ SUBDIRS = \ doc \ tests -# Directories added to EXTRA_DIST will be recursively copied to the distribution. -EXTRA_DIST = \ - extras - dist_doc_DATA = ChangeLog LICENSE mit-license.txt gpl-2.0.txt \ std-ext-lib.txt README CONTRIBUTING.adoc diff --git a/README b/README index 5e0e7664..2f304636 100644 --- a/README +++ b/README @@ -43,9 +43,6 @@ To compile Babeltrace, you will need: glib 2.22 or better development libraries (Debian : libglib2.0-0, libglib2.0-dev) (Fedora : glib2, glib2-devel) - libpopt >= 1.13 development libraries - (Debian : libpopt-dev) - (Fedora : popt) elfutils >= 0.154 development libraries (optional) (Debian : libelf-dev, libdw-dev) (Fedora : elfutils-devel, elfutils-libelf-devel) diff --git a/configure.ac b/configure.ac index e4a0c86d..30f72647 100644 --- a/configure.ac +++ b/configure.ac @@ -307,26 +307,6 @@ AC_CHECK_LIB([c], [posix_fallocate], [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_POSIX_FALLOCATE], 1, [Has posix_fallocate support.])] ) -# Check libpopt -PKG_CHECK_MODULES([POPT], [popt], - [ - dnl PKG_CHECK_MODULES defines POPT_LIBS - ], - [ - AC_MSG_WARN([pkg-config was unable to find a valid .pc for libpopt. Set PKG_CONFIG_PATH to specify the pkgconfig configuration file location]) - AC_MSG_WARN([Finding libpopt without pkg-config.]) - AC_CHECK_LIB([popt], - [poptGetContext], - [POPT_LIBS="-lpopt"], - [ - AC_MSG_FAILURE([Cannot find libpopt. Either set PKG_CONFIG_PATH to the configuration file location or use LDFLAGS=-Ldir to specify the library location]) - ] - ) - ] -) -AC_SUBST(POPT_LIBS) - - ## ## ## User variables ## ## ## diff --git a/extras/valgrind/popt.supp b/extras/valgrind/popt.supp deleted file mode 100644 index 61b5465a..00000000 --- a/extras/valgrind/popt.supp +++ /dev/null @@ -1,8 +0,0 @@ -{ - - Memcheck:Leak - fun:malloc - fun:poptGetNextOpt - fun:main -} - diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index 338a85fa..0f0884af 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -59,8 +59,7 @@ babeltrace2_bin_LDADD = \ $(top_builddir)/src/compat/libcompat.la \ $(top_builddir)/src/common/libbabeltrace2-common.la \ $(top_builddir)/src/logging/libbabeltrace2-logging.la \ - $(top_builddir)/src/ctfser/libbabeltrace2-ctfser.la \ - $(POPT_LIBS) + $(top_builddir)/src/ctfser/libbabeltrace2-ctfser.la if ENABLE_BUILT_IN_PLUGINS # Takes a plugin name and outputs the needed LDFLAGS to embed it. diff --git a/src/cli/babeltrace2-cfg-cli-args.c b/src/cli/babeltrace2-cfg-cli-args.c index dd7f4725..617bd51a 100644 --- a/src/cli/babeltrace2-cfg-cli-args.c +++ b/src/cli/babeltrace2-cfg-cli-args.c @@ -34,7 +34,6 @@ #include #include #include "common/common.h" -#include #include #include #include "argpar/argpar.h" @@ -856,7 +855,7 @@ end: return ret; } -/* popt options */ +/* argpar options */ enum { OPT_NONE = 0, OPT_BASE_PARAMS, diff --git a/src/cli/babeltrace2-cfg-cli-params-arg.c b/src/cli/babeltrace2-cfg-cli-params-arg.c index b13172d0..e5662c69 100644 --- a/src/cli/babeltrace2-cfg-cli-params-arg.c +++ b/src/cli/babeltrace2-cfg-cli-params-arg.c @@ -29,7 +29,6 @@ #include #include #include "common/common.h" -#include #include #include #include "babeltrace2-cfg.h" diff --git a/src/cli/babeltrace2.c b/src/cli/babeltrace2.c index 6a344024..1675446e 100644 --- a/src/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -29,7 +29,6 @@ #include "common/common.h" #include #include -#include #include #include #include diff --git a/src/plugins/ctf/common/metadata/Makefile.am b/src/plugins/ctf/common/metadata/Makefile.am index 4d1c6358..aa3b4490 100644 --- a/src/plugins/ctf/common/metadata/Makefile.am +++ b/src/plugins/ctf/common/metadata/Makefile.am @@ -42,7 +42,7 @@ libctf_ast_la_SOURCES = \ ctf-meta-configure-ir-trace.h if BABELTRACE_BUILD_WITH_MINGW -libctf_ast_la_LIBADD = -lintl -liconv -lole32 $(POPT_LIBS) +libctf_ast_la_LIBADD = -lintl -liconv -lole32 endif # start with empty files to clean -- 2.34.1