From e56e5792ea1543cf5b506e343076820ef5863647 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 15 Oct 2021 12:08:13 -0400 Subject: [PATCH] relayd: do not link lttng-relayd on liblttng-ctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Building on Cygwin, we get: libtool: link: gcc -shared .libs/cyglttng-ctl-0.dll.def .libs/lttng-ctl.o .libs/snapshot.o .libs/lttng-ctl-health.o .libs/save.o .libs/load.o .libs/deprecated-symbols.o .libs/channel.o .libs/rotate.o .libs/event.o .libs/destruction-handle.o .libs/clear.o .libs/tracker.o -Wl,--whole-archive ../../../src/common/sessiond-comm/.libs/libsessiond-comm.a ../../../src/common/.libs/libcommon.a -Wl,--no-whole-archive -L/cygdrive/c/Users/jenkins/workspace/lttng-tools_master_winbuild/arch/cygwin64/babeltrace_version/stable-2.0/build/std/conf/relayd-only/liburcu_version/master/test_type/base/deps/build/lib -lxml2 -L/build/lib -lurcu -lurcu-common -lurcu-cds -lrt -pthread -g -O2 -pthread -o .libs/cyglttng-ctl-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/liblttng-ctl.dll.a /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot export error_log_time: symbol not defined This is caused by commit ca806b0b247f ("liblttng-ctl: use export list to define exported symbols"). liblttng-ctl is not needed on Cygwin, so rather than fight it to resolve the issue and have liblttng-ctl build on Cygwin, skip building liblttng-ctl on Cygwin. liblttng-ctl is currently built on Cygwin because relayd depends on it. This should not be the case, as relayd does not use liblttng-ctl. Remove the dependency on liblttng-ctl from lttng-relayd/Makefile.am. Remove the dependency on libconfig.la (used for session config save and load) as well. It's included in libcommon.la, so it's redundant, but relayd doesn't need it anyway. Change-Id: If7e1944c4a30b8adcdd6e6d3083a94f27988697e Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- configure.ac | 1 - src/bin/lttng-relayd/Makefile.am | 4 +--- src/bin/lttng-relayd/main.cpp | 5 +++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b2f73dc27..e9b269666 100644 --- a/configure.ac +++ b/configure.ac @@ -951,7 +951,6 @@ AS_IF([test x$enable_bin_lttng_crash != xno], AS_IF([test x$enable_bin_lttng_relayd != xno], [ - build_lib_lttng_ctl=yes build_lib_sessiond_comm=yes build_lib_index=yes build_lib_health=yes diff --git a/src/bin/lttng-relayd/Makefile.am b/src/bin/lttng-relayd/Makefile.am index 51b232968..10ad3a0ab 100644 --- a/src/bin/lttng-relayd/Makefile.am +++ b/src/bin/lttng-relayd/Makefile.am @@ -35,6 +35,4 @@ lttng_relayd_LDADD = $(URCU_LIBS) \ $(top_builddir)/src/common/compat/libcompat.la \ $(top_builddir)/src/common/index/libindex.la \ $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la \ - $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la + $(top_builddir)/src/common/testpoint/libtestpoint.la diff --git a/src/bin/lttng-relayd/main.cpp b/src/bin/lttng-relayd/main.cpp index 71690f1da..07d79adee 100644 --- a/src/bin/lttng-relayd/main.cpp +++ b/src/bin/lttng-relayd/main.cpp @@ -96,6 +96,11 @@ char *opt_output_path, *opt_working_directory; static int opt_daemon, opt_background, opt_print_version, opt_allow_clear = 1; enum relay_group_output_by opt_group_output_by = RELAYD_GROUP_OUTPUT_BY_UNKNOWN; +/* Argument variables */ +int lttng_opt_quiet; /* not static in error.h */ +int lttng_opt_verbose; /* not static in error.h */ +int lttng_opt_mi; /* not static in error.h */ + /* * We need to wait for listener and live listener threads, as well as * health check thread, before being ready to signal readiness. -- 2.34.1