relayd: do not link lttng-relayd on liblttng-ctl
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 15 Oct 2021 16:08:13 +0000 (12:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 19 Nov 2021 23:34:13 +0000 (18:34 -0500)
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 <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-relayd/main.cpp

index b2f73dc276d1cc50e405cc805e41c68bdc9db049..e9b269666f3264d2fcdb3bbdba9dff6ee36053de 100644 (file)
@@ -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
index 51b23296835d1f14e1cd23958033582da5229481..10ad3a0ab4317b1fe9d1a114dd30f01a15ff9841 100644 (file)
@@ -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
index 71690f1da90f0d3ecdd96a6a1834d798e532e302..07d79adee6fa929642d17b46fe080a90e3708656 100644 (file)
@@ -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.
This page took 0.027378 seconds and 4 git commands to generate.