Fix: build: libcommon fd-tracker dependency is not available
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 7 Jun 2021 18:21:06 +0000 (14:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Jun 2021 15:40:41 +0000 (11:40 -0400)
Observed issue
==============

A build configured with:

  ./configure -disable-bin-lttng --disable-bin-lttng-crash --disable-bin-lttng-sessiond --disable-bin-lttng-relayd

Fails at build time with:

  make[3]: *** No rule to make target '../../src/common/fd-tracker/libfd-tracker.la', needed by 'libcommon.la'.  Stop.
  make[3]: *** Waiting for unfinished jobs....
  CC       lttng-elf.lo

Cause
=====

fd-tracker is required by libcommon. This is introduced by commit
8bb66c3cd60938352927ee865759433387324250 [1]

Build of libfd-tracker is disabled at the configure level by
build_lib_fd_tracker which in turn is enabled/disabled by the
--enable/disable-bin-* options.

For the observed issue, the --enable-bin-lttng-consumerd alone does not
enable the build of libfd-tracker.

Solution
========

All dependencies for libcommon are now always built. All bins require
libcommon to be present anyway.

This patch also fix a problem where the examples under the doc are build
even if liblttng-ctl is not built.

Known drawbacks
=========

None.

References
==========

[1]
http://git.lttng.org/?p=lttng-tools.git;a=commit;h=8bb66c3cd60938352927ee865759433387324250

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I94f5d7cdadcb4f8ff9c2617a675659c1f9eb4709

configure.ac
doc/examples/Makefile.am
src/common/Makefile.am

index 73ff2646f4ff8c06f35fb345e078c54a2f331d18..194736bd624d80e169bffa10cf512b60e4e16c57 100644 (file)
@@ -864,19 +864,13 @@ AC_ARG_ENABLE([extras], AS_HELP_STRING([--disable-extras],
              [Disable the build of the extra components]))
 
 
-# Always build libconfig since it a dependency of libcommon
-build_lib_config=yes
-
-build_lib_compat=no
 build_lib_consumer=no
-build_lib_hashtable=no
 build_lib_health=no
 build_lib_index=no
 build_lib_kernel_consumer=no
 build_lib_kernel_ctl=no
 build_lib_lttng_ctl=no
 build_lib_relayd=no
-build_lib_fd_tracker=no
 build_lib_sessiond_comm=no
 build_lib_testpoint=no
 build_lib_ust_consumer=no
@@ -911,12 +905,9 @@ AS_IF([test x$enable_bin_lttng_relayd != xno],
       [
        build_lib_lttng_ctl=yes
        build_lib_sessiond_comm=yes
-       build_lib_hashtable=yes
-       build_lib_compat=yes
        build_lib_index=yes
        build_lib_health=yes
        build_lib_testpoint=yes
-       build_lib_fd_tracker=yes
       ]
 )
 AS_IF([test x$enable_bin_lttng_sessiond != xno],
@@ -924,8 +915,6 @@ AS_IF([test x$enable_bin_lttng_sessiond != xno],
        build_lib_lttng_ctl=yes
        build_lib_sessiond_comm=yes
        build_lib_kernel_ctl=yes
-       build_lib_hashtable=yes
-       build_lib_compat=yes
        build_lib_relayd=yes
        build_lib_testpoint=yes
        build_lib_health=yes
@@ -936,7 +925,6 @@ AS_IF([test x$enable_bin_lttng_sessiond != xno],
 AS_IF([test x$build_lib_lttng_ctl = xyes],
       [
        build_lib_sessiond_comm=yes
-       build_lib_hashtable=yes
       ]
 )
 
@@ -944,8 +932,6 @@ AS_IF([test x$build_lib_consumer = xyes],
       [
        build_lib_sessiond_comm=yes
        build_lib_kernel_consumer=yes
-       build_lib_hashtable=yes
-       build_lib_compat=yes
        build_lib_relayd=yes
        AS_IF([test "x$with_lttng_ust" = "xyes"], [build_lib_ust_consumer=yes])
       ]
@@ -1040,17 +1026,13 @@ AM_CONDITIONAL([BUILD_TESTS], [test x$build_tests = xyes])
 AM_CONDITIONAL([BUILD_EXTRAS], [test x$enable_extras != xno])
 
 # Export libraries build conditions.
-AM_CONDITIONAL([BUILD_LIB_COMPAT], [test x$build_lib_compat = xyes])
-AM_CONDITIONAL([BUILD_LIB_CONFIG], [test x$build_lib_config = xyes])
 AM_CONDITIONAL([BUILD_LIB_CONSUMER], [test x$build_lib_consumer = xyes])
-AM_CONDITIONAL([BUILD_LIB_HASHTABLE], [test x$build_lib_hashtable = xyes])
 AM_CONDITIONAL([BUILD_LIB_HEALTH], [test x$build_lib_health = xyes])
 AM_CONDITIONAL([BUILD_LIB_INDEX], [test x$build_lib_index = xyes])
 AM_CONDITIONAL([BUILD_LIB_KERNEL_CONSUMER], [test x$build_lib_kernel_consumer = xyes])
 AM_CONDITIONAL([BUILD_LIB_KERNEL_CTL], [test x$build_lib_kernel_ctl = xyes])
 AM_CONDITIONAL([BUILD_LIB_LTTNG_CTL], [test x$build_lib_lttng_ctl = xyes])
 AM_CONDITIONAL([BUILD_LIB_RELAYD], [test x$build_lib_relayd = xyes])
-AM_CONDITIONAL([BUILD_LIB_FD_TRACKER], [test x$build_lib_fd_tracker = xyes])
 AM_CONDITIONAL([BUILD_LIB_SESSIOND_COMM], [test x$build_lib_sessiond_comm = xyes])
 AM_CONDITIONAL([BUILD_LIB_TESTPOINT], [test x$build_lib_testpoint = xyes])
 AM_CONDITIONAL([BUILD_LIB_UST_CONSUMER], [test x$build_lib_ust_consumer = xyes])
index 89aad3d069b5c68747c917016d87b99c4f9bf60a..25ef338db99d6ab78b01274e9e6607f03340d741 100644 (file)
@@ -1,3 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
+if BUILD_LIB_LTTNG_CTL
 SUBDIRS = rotation trigger-condition-event-matches
+endif
index e9bc3d96508d8860a78229deda7498f1bb0482b0..0885448b5dbccb63d53fd32ee05ea4a90f2bf66a 100644 (file)
@@ -3,10 +3,14 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
 SUBDIRS = \
-       string-utils \
+       argpar \
        bytecode \
+       compat \
+       config \
+       fd-tracker \
+       string-utils \
        filter \
-       argpar
+       hashtable
 
 # Make sure to always distribute all folders
 # since SUBDIRS is decided at configure time.
@@ -120,18 +124,10 @@ libcommon_la_LIBADD = \
        $(top_builddir)/src/common/filter/libfilter.la \
        $(top_builddir)/src/vendor/msgpack/libmsgpack.la
 
-if BUILD_LIB_COMPAT
-SUBDIRS += compat
-endif
-
 if BUILD_LIB_HEALTH
 SUBDIRS += health
 endif
 
-if BUILD_LIB_HASHTABLE
-SUBDIRS += hashtable
-endif
-
 if BUILD_LIB_KERNEL_CTL
 SUBDIRS += kernel-ctl
 endif
@@ -144,9 +140,6 @@ if BUILD_LIB_RELAYD
 SUBDIRS += relayd
 endif
 
-if BUILD_LIB_FD_TRACKER
-SUBDIRS += fd-tracker
-endif
 
 if BUILD_LIB_KERNEL_CONSUMER
 SUBDIRS += kernel-consumer
@@ -164,10 +157,6 @@ if BUILD_LIB_INDEX
 SUBDIRS += index
 endif
 
-if BUILD_LIB_CONFIG
-SUBDIRS += config
-endif
-
 if BUILD_LIB_CONSUMER
 SUBDIRS += consumer
 endif
This page took 0.027802 seconds and 4 git commands to generate.