From 782b44aa6e69e5db071c9a6ee018bc834653a437 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Jul 2023 16:32:09 +0900 Subject: [PATCH 1/4] build: stop using @x@ in Makefile.am Automake has an implicit x = @x@ for every AC_SUBST-ed variable already, stop reinventing the variables -- and enable standard make-time variable overrides. Signed-off-by: Jan Engelhardt --- Makefile.am | 3 +-- events/Makefile.am | 2 +- extras/cliutils/Makefile.am | 2 +- extras/command-completion/Makefile.am | 2 +- extras/init.d/Makefile.am | 6 +++--- extras/python/Makefile.am | 2 +- xlators/mount/Makefile.am | 2 +- xlators/mount/fuse/src/Makefile.am | 2 +- xlators/mount/fuse/utils/Makefile.am | 2 +- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7db663bc047..9d312ce1a5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,9 +12,8 @@ EXTRA_DIST = autogen.sh \ SUBDIRS = $(ARGP_STANDALONE_DIR) libglusterfs rpc api \ glusterfsd xlators $(FUSERMOUNT_SUBDIR) doc extras cli heal \ - @SYNCDAEMON_SUBDIR@ @UMOUNTD_SUBDIR@ tools events + $(SYNCDAEMON_SUBDIR) $(UMOUNTD_SUBDIR) tools events -pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = glusterfs-api.pc libgfchangelog.pc CLEANFILES = glusterfs-api.pc libgfchangelog.pc contrib/umountd/Makefile diff --git a/events/Makefile.am b/events/Makefile.am index 264bb742a80..544767087f4 100644 --- a/events/Makefile.am +++ b/events/Makefile.am @@ -4,5 +4,5 @@ noinst_PYTHON = eventskeygen.py if BUILD_EVENTS install-data-hook: - $(INSTALL) -d -m 755 $(DESTDIR)@GLUSTERD_WORKDIR@/events + $(INSTALL) -d -m 755 $(DESTDIR)$(GLUSTERD_WORKDIR)/events endif diff --git a/extras/cliutils/Makefile.am b/extras/cliutils/Makefile.am index 7039703e275..2edd60f17c4 100644 --- a/extras/cliutils/Makefile.am +++ b/extras/cliutils/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST= cliutils.py __init__.py -cliutilsdir = @BUILD_PYTHON_SITE_PACKAGES@/gluster/cliutils +cliutilsdir = $(BUILD_PYTHON_SITE_PACKAGES)/gluster/cliutils cliutils_PYTHON = cliutils.py __init__.py diff --git a/extras/command-completion/Makefile.am b/extras/command-completion/Makefile.am index d846d59ba00..6907c663087 100644 --- a/extras/command-completion/Makefile.am +++ b/extras/command-completion/Makefile.am @@ -1,2 +1,2 @@ -bashcompdir = @bashcompdir@ +bashcompdir = $(bashcompdir) dist_bashcomp_DATA = gluster.bash diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am index 8d8cc69571a..a0ec9485aa2 100644 --- a/extras/init.d/Makefile.am +++ b/extras/init.d/Makefile.am @@ -5,9 +5,9 @@ EXTRA_DIST = glusterd-Debian glusterd-FreeBSD glusterd-Redhat \ CLEANFILES = -INIT_DIR = @initdir@ -SYSTEMD_DIR = @systemddir@ -LAUNCHD_DIR = @launchddir@ +INIT_DIR = $(initdir) +SYSTEMD_DIR = $(systemddir) +LAUNCHD_DIR = $(launchddir) $(GF_DISTRIBUTION): if WITH_SERVER diff --git a/extras/python/Makefile.am b/extras/python/Makefile.am index 7d81fa0319b..890653994cb 100644 --- a/extras/python/Makefile.am +++ b/extras/python/Makefile.am @@ -1,6 +1,6 @@ if HAVE_PYTHON # Install __init__.py into the Python site-packages area -pypkgdir = @BUILD_PYTHON_SITE_PACKAGES@/gluster +pypkgdir = $(BUILD_PYTHON_SITE_PACKAGES)/gluster pypkg_PYTHON = __init__.py endif diff --git a/xlators/mount/Makefile.am b/xlators/mount/Makefile.am index 945982d95b4..41c849f9ee7 100644 --- a/xlators/mount/Makefile.am +++ b/xlators/mount/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = @FUSE_CLIENT_SUBDIR@ +SUBDIRS = $(FUSE_CLIENT_SUBDIR) CLEANFILES = diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am index 7018cad37f6..46961f4cb3b 100644 --- a/xlators/mount/fuse/src/Makefile.am +++ b/xlators/mount/fuse/src/Makefile.am @@ -27,7 +27,7 @@ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \ $(CONTRIBDIR)/fuse-lib/misc.c $(mount_source) fuse_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) -fuse_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GF_LDADD) @GF_FUSE_LDADD@ +fuse_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GF_LDADD) $(GF_FUSE_LDADD) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \ diff --git a/xlators/mount/fuse/utils/Makefile.am b/xlators/mount/fuse/utils/Makefile.am index fdad27ad103..828068f0d4d 100644 --- a/xlators/mount/fuse/utils/Makefile.am +++ b/xlators/mount/fuse/utils/Makefile.am @@ -1,4 +1,4 @@ -utildir = @mountutildir@ +utildir = $(mountutildir) if GF_LINUX_HOST_OS util_SCRIPTS = mount.glusterfs From 1ff28dbd4038643008147fc28a6d227fbc6f1404 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Jul 2023 17:22:48 +0900 Subject: [PATCH 2/4] build: remove unused -l flags from cloudsyncs3 plugin Why the heck are -lcurlpp -lcryptopp in AM_CPPFLAGS? That variable is not getting used during link anyway, and because of that, there is also no error emitted that I do not have them installed in my OS. Signed-off-by: Jan Engelhardt --- .../src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am index 6509426ef87..d072d11228e 100644 --- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am +++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am @@ -4,7 +4,7 @@ cspdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins cloudsyncs3_la_SOURCES = libcloudsyncs3.c $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-common.c cloudsyncs3_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la cloudsyncs3_la_LDFLAGS = -module -export-symbols $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.sym $(GF_XLATOR_LDFLAGS) -AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src -lcurlpp -lcryptopp +AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src noinst_HEADERS = libcloudsyncs3.h libcloudsyncs3-mem-types.h AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS) -lcurl -lcrypto -I$(top_srcdir)/xlators/features/cloudsync/src CLEANFILES = From 6f82064514ef733daeadf3513e57527def8ddc75 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Jul 2023 16:42:02 +0900 Subject: [PATCH 3/4] build: fix wrong position of -I, -l flags -l must go to LIBADD. Not CFLAGS. And definitely not CPPFLAGS. It's not a preprocessor flag, darn it. -I should preferably go into CPPFLAGS. Signed-off-by: Jan Engelhardt --- .../src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am index d072d11228e..b262fabd3c5 100644 --- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am +++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am @@ -2,11 +2,11 @@ csp_LTLIBRARIES = cloudsyncs3.la cspdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins cloudsyncs3_la_SOURCES = libcloudsyncs3.c $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-common.c -cloudsyncs3_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +cloudsyncs3_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lcurl -lcrypto cloudsyncs3_la_LDFLAGS = -module -export-symbols $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.sym $(GF_XLATOR_LDFLAGS) -AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src +AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src -I$(top_srcdir)/xlators/features/cloudsync/src noinst_HEADERS = libcloudsyncs3.h libcloudsyncs3-mem-types.h -AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS) -lcurl -lcrypto -I$(top_srcdir)/xlators/features/cloudsync/src +AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS) CLEANFILES = EXTRA_DIST = libcloudsyncs3.sym From 49e47c5f768ec116a9d876523bae9741cc2bf314 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Jul 2023 09:17:48 +0200 Subject: [PATCH 4/4] build: unbreak make LIBS="-lsomething" Stop trampling on user-defined variables. Move detected required libraries to their own specific variables. Another benefit is that components which do not need one or more of (-lcrypto, -lpthread, -lrt) are not forcibly linked to them. ./configure CFLAGS="-O0 -ggdb3 -fsanitize=address,undefined" && make -j16 LIBS="-lasan -lubsan" Signed-off-by: Jan Engelhardt --- api/examples/Makefile.am | 3 +- configure.ac | 29 +++++++++---------- extras/benchmarking/Makefile.am | 1 + glusterfsd/src/Makefile.am | 2 +- libglusterfs/src/Makefile.am | 3 +- rpc/rpc-lib/src/Makefile.am | 2 +- rpc/rpc-transport/socket/src/Makefile.am | 2 +- tools/gfind_missing_files/Makefile.am | 2 +- xlators/cluster/afr/src/Makefile.am | 2 +- xlators/features/bit-rot/src/bitd/Makefile.am | 3 +- .../features/changelog/lib/src/Makefile.am | 2 +- xlators/features/changelog/src/Makefile.am | 2 +- xlators/features/cloudsync/src/Makefile.am | 2 +- .../src/cloudsyncs3/src/Makefile.am | 2 +- xlators/features/index/src/Makefile.am | 2 +- xlators/features/leases/src/Makefile.am | 2 +- xlators/features/locks/src/Makefile.am | 2 +- xlators/features/quota/src/Makefile.am | 2 +- xlators/features/shard/src/Makefile.am | 2 +- xlators/mgmt/glusterd/src/Makefile.am | 3 +- xlators/mount/fuse/src/Makefile.am | 3 +- xlators/performance/io-cache/src/Makefile.am | 2 +- .../performance/io-threads/src/Makefile.am | 3 +- xlators/performance/md-cache/src/Makefile.am | 2 +- .../performance/read-ahead/src/Makefile.am | 2 +- xlators/protocol/client/src/Makefile.am | 2 +- xlators/protocol/server/src/Makefile.am | 2 +- xlators/storage/posix/src/Makefile.am | 2 +- 28 files changed, 46 insertions(+), 42 deletions(-) diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am index 7112c81d6a7..294edbfd966 100644 --- a/api/examples/Makefile.am +++ b/api/examples/Makefile.am @@ -2,5 +2,4 @@ EXTRA_PROGRAMS = glfsxmp glfsxmp_SOURCES = glfsxmp.c glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall -glfsxmp_LDADD = $(GLFS_LIBS) -lrt - +glfsxmp_LDADD = $(GLFS_LIBS) $(rt_LIBS) diff --git a/configure.ac b/configure.ac index 7c4894cf2d1..949ccbe5d99 100644 --- a/configure.ac +++ b/configure.ac @@ -408,10 +408,6 @@ if test x$cross_compiling != xyes; then fi fi -dnl On some distributions '-ldl' isn't automatically added to LIBS -AC_CHECK_LIB([dl], [dlopen], [LIB_DL=-ldl]) -AC_SUBST(LIB_DL) - AC_ARG_ENABLE([privport_tracking], AS_HELP_STRING([--disable-privport_tracking],[Disable internal tracking of privileged ports.])) TRACK_PRIVPORTS="yes" @@ -574,13 +570,20 @@ fi AC_CHECK_TOOL([LD],[ld]) -AC_CHECK_LIB([crypto], [MD5], , AC_MSG_ERROR([OpenSSL crypto library is required to build glusterfs])) - -AC_CHECK_LIB([pthread], [pthread_mutex_init], , AC_MSG_ERROR([Posix threads library is required to build glusterfs])) - -AC_CHECK_FUNC([dlopen], [has_dlopen=yes], AC_CHECK_LIB([dl], [dlopen], , AC_MSG_ERROR([Dynamic linking library required to build glusterfs]))) - -AC_CHECK_LIB([intl], [gettext]) +system_LIBS="$LIBS" +AC_SEARCH_LIBS([SHA256], [crypto], [crypto_LIBS="-lcrypto"; LIBS="$system_LIBS"]) +AC_SUBST([crypto_LIBS]) +AC_SEARCH_LIBS([pthread_mutex_init], [pthread], [pthread_LIBS="-lpthread"; LIBS="$system_LIBS"], + [AC_MSG_ERROR([Posix threads library is required to build glusterfs])]) +AC_SUBST([pthread_LIBS]) +AC_SEARCH_LIBS([dlopen], [dl], [dl_LIBS="-ldl"; LIBS="$system_LIBS"], + [AC_MSG_ERROR([Dynamic linking library required to build glusterfs])]) +AC_SUBST([dl_LIBS]) +AC_SEARCH_LIBS([clock_gettime], [rt], [rt_LIBS="-lrt"; LIBS="$system_LIBS"], + [AC_MSG_WARN([System doesn't have monotonic clock using contrib])]) +AC_SUBST([rt_LIBS]) +AC_SEARCH_LIBS([gettext], [intl], [intl_LIBS="-lintl"; LIBS="$system_LIBS"]) +AC_SUBST([intl_LIBS]) AC_CHECK_HEADERS([sys/xattr.h]) @@ -1090,10 +1093,6 @@ fi AC_SUBST(HAVE_FUTIMENS) AC_SUBST(HAVE_FUTIMES) -dnl check for Monotonic clock -AC_CHECK_LIB([rt], [clock_gettime], , - AC_MSG_WARN([System doesn't have monotonic clock using contrib])) - dnl check for argp, FreeBSD has the header in /usr/local/include case $host_os in *freebsd*) diff --git a/extras/benchmarking/Makefile.am b/extras/benchmarking/Makefile.am index bfcc59277a5..d3d79971cd1 100644 --- a/extras/benchmarking/Makefile.am +++ b/extras/benchmarking/Makefile.am @@ -2,6 +2,7 @@ benchmarkingdir = $(docdir)/benchmarking benchmarking_DATA = rdd.c glfs-bm.c README launch-script.sh local-script.sh +benchmarking_LDADD = $(pthread_LIBS) EXTRA_DIST = rdd.c glfs-bm.c README launch-script.sh local-script.sh diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am index d82ce74cf44..592153b5da9 100644 --- a/glusterfsd/src/Makefile.am +++ b/glusterfsd/src/Makefile.am @@ -6,7 +6,7 @@ endif glusterfsd_SOURCES = glusterfsd.c glusterfsd-mgmt.c glusterfsd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - $(top_builddir)/rpc/xdr/src/libgfxdr.la $(GF_LDADD) $(LIB_DL) + $(top_builddir)/rpc/xdr/src/libgfxdr.la $(GF_LDADD) $(dl_LIBS) $(pthread_LIBS) glusterfsd_LDFLAGS = $(GF_LDFLAGS) gf_attach_SOURCES = gf_attach.c diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index 7056bfef22a..2b1fa047547 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -18,7 +18,8 @@ if !HAVE_BACKTRACE libglusterfs_la_CPPFLAGS += -I$(CONTRIBDIR)/libexecinfo endif -libglusterfs_la_LIBADD = $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS) $(LIB_DL) \ +libglusterfs_la_LIBADD = $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS) \ + $(dl_LIBS) $(pthread_LIBS) $(rt_LIBS) \ $(URCU_LIBS) $(URCU_CDS_LIBS) libglusterfs_la_LDFLAGS = -version-info $(LIBGLUSTERFS_LT_VERSION) $(GF_LDFLAGS) \ -export-symbols $(top_srcdir)/libglusterfs/src/libglusterfs.sym diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am index 2eff25c17ce..8f3814eb9a6 100644 --- a/rpc/rpc-lib/src/Makefile.am +++ b/rpc/rpc-lib/src/Makefile.am @@ -8,7 +8,7 @@ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \ EXTRA_DIST = libgfrpc.sym libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ - $(top_builddir)/rpc/xdr/src/libgfxdr.la + $(top_builddir)/rpc/xdr/src/libgfxdr.la $(pthread_LIBS) libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS) \ -export-symbols $(top_srcdir)/rpc/rpc-lib/src/libgfrpc.sym diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am index 7b488583771..e3fc6611cd0 100644 --- a/rpc/rpc-transport/socket/src/Makefile.am +++ b/rpc/rpc-transport/socket/src/Makefile.am @@ -9,7 +9,7 @@ socket_la_SOURCES = socket.c name.c socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - -lssl + $(crypto_LIBS) $(pthread_LIBS) AM_CPPFLAGS = $(GF_CPPFLAGS) \ -I$(top_srcdir)/libglusterfs/src \ diff --git a/tools/gfind_missing_files/Makefile.am b/tools/gfind_missing_files/Makefile.am index 181fe7091f3..b66cea07ed1 100644 --- a/tools/gfind_missing_files/Makefile.am +++ b/tools/gfind_missing_files/Makefile.am @@ -13,7 +13,7 @@ gfindmissingfiles_PROGRAMS = gcrawler endif gcrawler_SOURCES = gcrawler.c -gcrawler_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +gcrawler_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) gcrawler_LDFLAGS = $(GF_LDFLAGS) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am index 610819b28fc..e1b0d1110fb 100644 --- a/xlators/cluster/afr/src/Makefile.am +++ b/xlators/cluster/afr/src/Makefile.am @@ -12,7 +12,7 @@ AFR_SELFHEAL_SOURCES = afr-self-heal-common.c afr-self-heal-data.c \ afr_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) afr_la_SOURCES = $(afr_common_source) $(AFR_SELFHEAL_SOURCES) afr.c -afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = afr.h afr-transaction.h afr-inode-write.h afr-inode-read.h \ afr-dir-read.h afr-dir-write.h afr-self-heal.h afr-mem-types.h \ diff --git a/xlators/features/bit-rot/src/bitd/Makefile.am b/xlators/features/bit-rot/src/bitd/Makefile.am index 6db800e6565..04fd88054cc 100644 --- a/xlators/features/bit-rot/src/bitd/Makefile.am +++ b/xlators/features/bit-rot/src/bitd/Makefile.am @@ -13,7 +13,8 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ bit_rot_la_SOURCES = bit-rot.c bit-rot-scrub.c bit-rot-ssm.c \ bit-rot-scrub-status.c bit_rot_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ - $(top_builddir)/xlators/features/changelog/lib/src/libgfchangelog.la + $(top_builddir)/xlators/features/changelog/lib/src/libgfchangelog.la \ + $(crypto_LIBS) $(pthread_LIBS) noinst_HEADERS = bit-rot.h bit-rot-scrub.h bit-rot-bitd-messages.h bit-rot-ssm.h \ bit-rot-scrub-status.h diff --git a/xlators/features/changelog/lib/src/Makefile.am b/xlators/features/changelog/lib/src/Makefile.am index c933ec53ed2..ec1ba50ad97 100644 --- a/xlators/features/changelog/lib/src/Makefile.am +++ b/xlators/features/changelog/lib/src/Makefile.am @@ -11,7 +11,7 @@ libgfchangelog_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 -D__USE_LARGEF libgfchangelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ - $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la + $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la $(pthread_LIBS) libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) \ -version-info $(LIBGFCHANGELOG_LT_VERSION) \ diff --git a/xlators/features/changelog/src/Makefile.am b/xlators/features/changelog/src/Makefile.am index 8e04c5412a5..5481b052009 100644 --- a/xlators/features/changelog/src/Makefile.am +++ b/xlators/features/changelog/src/Makefile.am @@ -14,7 +14,7 @@ changelog_la_SOURCES = changelog.c changelog-rt.c changelog-helpers.c \ changelog-rpc-common.c changelog-ev-handle.c changelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ - $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la + $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la $(pthread_LIBS) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \ diff --git a/xlators/features/cloudsync/src/Makefile.am b/xlators/features/cloudsync/src/Makefile.am index e2a277e372b..edd57ec5077 100644 --- a/xlators/features/cloudsync/src/Makefile.am +++ b/xlators/features/cloudsync/src/Makefile.am @@ -23,7 +23,7 @@ BUILT_SOURCES = cloudsync-autogen-fops.h cloudsync_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) -cloudsync_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIB_DL) +cloudsync_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(dl_LIBS) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \ -DCS_PLUGINDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins\" diff --git a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am index b262fabd3c5..551288a7a6e 100644 --- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am +++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am @@ -2,7 +2,7 @@ csp_LTLIBRARIES = cloudsyncs3.la cspdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins cloudsyncs3_la_SOURCES = libcloudsyncs3.c $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-common.c -cloudsyncs3_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lcurl -lcrypto +cloudsyncs3_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lcurl $(crypto_LIBS) cloudsyncs3_la_LDFLAGS = -module -export-symbols $(top_srcdir)/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.sym $(GF_XLATOR_LDFLAGS) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src -I$(top_srcdir)/xlators/features/cloudsync/src noinst_HEADERS = libcloudsyncs3.h libcloudsyncs3-mem-types.h diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am index c71c238c163..d95461a1bda 100644 --- a/xlators/features/index/src/Makefile.am +++ b/xlators/features/index/src/Makefile.am @@ -6,7 +6,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features index_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) index_la_SOURCES = index.c -index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = index.h index-mem-types.h index-messages.h diff --git a/xlators/features/leases/src/Makefile.am b/xlators/features/leases/src/Makefile.am index a1aef10e299..b836e570186 100644 --- a/xlators/features/leases/src/Makefile.am +++ b/xlators/features/leases/src/Makefile.am @@ -7,7 +7,7 @@ leases_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) leases_la_SOURCES = leases.c leases-internal.c -leases_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +leases_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = leases.h leases-mem-types.h leases-messages.h diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am index 0b174c19d2d..3acce8ffb61 100644 --- a/xlators/features/locks/src/Makefile.am +++ b/xlators/features/locks/src/Makefile.am @@ -8,7 +8,7 @@ locks_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) locks_la_SOURCES = common.c posix.c entrylk.c inodelk.c reservelk.c \ clear.c -locks_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +locks_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = locks.h common.h locks-mem-types.h clear.h pl-messages.h diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am index 1c2dcef0ca3..bf8208a6086 100644 --- a/xlators/features/quota/src/Makefile.am +++ b/xlators/features/quota/src/Makefile.am @@ -9,7 +9,7 @@ quotad_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) quota_la_SOURCES = quota.c quota-enforcer-client.c quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ - $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la + $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la $(pthread_LIBS) quotad_la_SOURCES = quotad.c quotad-helpers.c quotad-aggregator.c quotad_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ diff --git a/xlators/features/shard/src/Makefile.am b/xlators/features/shard/src/Makefile.am index bf5700d4bcc..0df91deb3f0 100644 --- a/xlators/features/shard/src/Makefile.am +++ b/xlators/features/shard/src/Makefile.am @@ -5,7 +5,7 @@ shard_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) shard_la_SOURCES = shard.c -shard_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +shard_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = shard.h shard-mem-types.h shard-messages.h diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am index c0b328bd210..561edc6fb96 100644 --- a/xlators/mgmt/glusterd/src/Makefile.am +++ b/xlators/mgmt/glusterd/src/Makefile.am @@ -31,7 +31,8 @@ glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \ glusterd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - $(XML_LIBS) -lcrypto $(URCU_LIBS) $(URCU_CDS_LIBS) $(LIB_DL) $(GF_XLATOR_MGNT_LIBADD) + $(XML_LIBS) $(crypto_LIBS) $(pthread_LIBS) $(URCU_LIBS) $(URCU_CDS_LIBS) \ + $(dl_LIBS) $(GF_XLATOR_MGNT_LIBADD) noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \ glusterd-sm.h glusterd-store.h glusterd-mem-types.h \ diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am index 46961f4cb3b..ca49ee5c38a 100644 --- a/xlators/mount/fuse/src/Makefile.am +++ b/xlators/mount/fuse/src/Makefile.am @@ -27,7 +27,8 @@ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \ $(CONTRIBDIR)/fuse-lib/misc.c $(mount_source) fuse_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) -fuse_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GF_LDADD) $(GF_FUSE_LDADD) +fuse_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ + $(GF_LDADD) $(GF_FUSE_LDADD) $(pthread_LIBS) AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \ diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am index bfa34ce5502..4c9ca87c331 100644 --- a/xlators/performance/io-cache/src/Makefile.am +++ b/xlators/performance/io-cache/src/Makefile.am @@ -4,7 +4,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance io_cache_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) io_cache_la_SOURCES = io-cache.c page.c ioc-inode.c -io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = io-cache.h ioc-mem-types.h io-cache-messages.h diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am index 7570cf41ed2..c4f1bbf1ef9 100644 --- a/xlators/performance/io-threads/src/Makefile.am +++ b/xlators/performance/io-threads/src/Makefile.am @@ -4,7 +4,8 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance io_threads_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) io_threads_la_SOURCES = io-threads.c -io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ + $(pthread_LIBS) $(rt_LIBS) noinst_HEADERS = io-threads.h iot-mem-types.h io-threads-messages.h diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am index 447ff0f30f0..a85384c032c 100644 --- a/xlators/performance/md-cache/src/Makefile.am +++ b/xlators/performance/md-cache/src/Makefile.am @@ -4,7 +4,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance md_cache_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) md_cache_la_SOURCES = md-cache.c -md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = md-cache-mem-types.h md-cache-messages.h diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am index 99efca3660c..c8315866142 100644 --- a/xlators/performance/read-ahead/src/Makefile.am +++ b/xlators/performance/read-ahead/src/Makefile.am @@ -4,7 +4,7 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance read_ahead_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) read_ahead_la_SOURCES = read-ahead.c page.c -read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la +read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(pthread_LIBS) noinst_HEADERS = read-ahead.h read-ahead-mem-types.h read-ahead-messages.h diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am index 609b9adb1f2..c992ff9f517 100644 --- a/xlators/protocol/client/src/Makefile.am +++ b/xlators/protocol/client/src/Makefile.am @@ -6,7 +6,7 @@ client_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - $(top_builddir)/rpc/xdr/src/libgfxdr.la + $(top_builddir)/rpc/xdr/src/libgfxdr.la $(pthread_LIBS) client_la_SOURCES = client.c client-helpers.c client-rpc-fops_v2.c \ client-handshake.c client-callback.c client-common.c diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am index d5ff11b6399..156881ac191 100644 --- a/xlators/protocol/server/src/Makefile.am +++ b/xlators/protocol/server/src/Makefile.am @@ -8,7 +8,7 @@ server_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS) server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ - $(top_builddir)/rpc/xdr/src/libgfxdr.la $(LIB_DL) + $(top_builddir)/rpc/xdr/src/libgfxdr.la $(dl_LIBS) $(pthread_LIBS) server_la_SOURCES = server.c server-resolve.c server-helpers.c \ server-handshake.c authenticate.c server-common.c \ diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am index ed69720f5eb..ab33e2d8c9f 100644 --- a/xlators/storage/posix/src/Makefile.am +++ b/xlators/storage/posix/src/Makefile.am @@ -9,7 +9,7 @@ posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c \ posix-gfid-path.c posix-entry-ops.c posix-inode-fd-ops.c \ posix-common.c posix-metadata.c posix-io-uring.c posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO) \ - $(LIBURING) $(ACL_LIBS) + $(LIBURING) $(ACL_LIBS) $(pthread_LIBS) noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h \ posix-messages.h posix-gfid-path.h posix-inode-handle.h \