From: Michael Jeanson Date: Fri, 15 Oct 2021 16:08:13 +0000 (-0400) Subject: relayd: do not link lttng-relayd on liblttng-ctl X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e56e5792ea1543cf5b506e343076820ef5863647;p=lttng-tools.git relayd: do not link lttng-relayd on liblttng-ctl 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 --- 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.