Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,36 @@ AC_SUBST(EXTRA_VERSION)
AC_SUBST(SCM_VERSION)
AC_SUBST(SOVERSION)

UCX_LT_RELEASE=
ucx_soname_suffix_summary="<disabled>"
ucx_module_deepbind_summary="no"
AC_ARG_WITH([soname-suffix],
AS_HELP_STRING([--with-soname-suffix=SUFFIX],
[Append SUFFIX to UCX shared library and module SONAMEs. Disabled by default. [default=NO]]),
[], [with_soname_suffix=no])
AS_IF([test "x$with_soname_suffix" != xno],
[AS_IF([test "x$with_soname_suffix" = xyes],
[AC_MSG_ERROR([--with-soname-suffix requires an explicit suffix value])])
AS_IF([printf '%s\n' "$with_soname_suffix" | grep -Eq '^@<:@A-Za-z0-9@:>@@<:@A-Za-z0-9_.-@:>@*$'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] [important] Dotted suffixes break module loading

The option accepts dots, but libtool -release 1.22 produces names like libucs-1.22.so.0; UCX's module loader derives module_ext from the first dot in the loaded libucs basename, so it would look for module files ending in .22.so.0 instead of .so.0. That means accepted values such as --with-soname-suffix=1.22 can prevent optional UCT/UCM modules from loading. Either reject dots here or fix the loader to derive the real shared-library extension, and add a small configure/runtime check for a dotted suffix.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ MINOR

the regex printf | grep -Eq works but is heavier than needed; a case statement (as used elsewhere in autoconf) would avoid spawning subprocesses and be more portable. minor.

[],
[AC_MSG_ERROR([--with-soname-suffix must contain only letters, digits, dots, underscores, and dashes])])
UCX_LT_RELEASE="-release $with_soname_suffix"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 BLOCKER

libtool's -release changes the installed library filename (e.g. libucp-SUFFIX.so.0), not just the SONAME. With this set, ucx.pc (which emits -lucp) and cmake/ucx-targets.cmake.in (which hardcodes libucp.so/libucs.so/libuct.so) will fail to locate the libs for downstream consumers. Either also template these files with the suffix, or use a mechanism that only alters the SONAME (e.g., -Wl,-soname=...) if the intent really is SONAME-only as the option name suggests.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ INFO

only the four core libs (ucm/ucp/ucs/uct) get $(UCX_LT_RELEASE); the per-transport module libs (e.g. src/uct/ib/Makefile.am, src/ucm/cuda/Makefile.am, …) still use plain -version-info $(SOVERSION). is the asymmetry intentional? if two UCX trees with different suffixes are installed in the same prefix, the modules will collide.

AC_DEFINE_UNQUOTED([UCX_MODULE_SONAME_SUFFIX],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ MINOR

minor: the macro name UCX_MODULE_SONAME_SUFFIX is misleading — libtool -release modifies the library file name (and link/SONAME), it doesn't append to the ELF SONAME. Maybe UCX_MODULE_FILE_SUFFIX or UCX_MODULE_RELEASE_SUFFIX would be clearer.

["-$with_soname_suffix"],
[Suffix appended to private UCX module library names])
ucx_soname_suffix_summary="$with_soname_suffix"])
AC_SUBST([UCX_LT_RELEASE])
UCT_MODULE_LDFLAGS='$(UCX_LT_RELEASE)'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ MINOR

UCT_MODULE_LDFLAGS is just $(UCX_LT_RELEASE) and the rest of the diff already uses $(UCX_LT_RELEASE) directly in ucm/, ucp/, ucs/, perf/. Why have two names for the same thing? Can we drop UCT_MODULE_LDFLAGS and use $(UCX_LT_RELEASE) everywhere?

AC_SUBST([UCT_MODULE_LDFLAGS])

AC_ARG_ENABLE([module-deepbind],
AS_HELP_STRING([--enable-module-deepbind],
[Load UCX modules with RTLD_DEEPBIND. Intended for private UCX bundles. Disabled by default. [default=NO]]),
[], [enable_module_deepbind=no])
AS_IF([test "x$enable_module_deepbind" = xyes],
[AS_IF([test "x$with_soname_suffix" = xno],
[AC_MSG_ERROR([--enable-module-deepbind requires --with-soname-suffix])])])

AC_PROG_CC
AC_PROG_CXX
AC_OPENMP
Expand All @@ -87,6 +117,14 @@ AC_FUNC_STRERROR_R

AC_PATH_TOOL([PKG_CONFIG], [pkg-config], [pkg-config])

AS_IF([test "x$enable_module_deepbind" = xyes],
[AC_CHECK_DECLS([RTLD_DEEPBIND],
[AC_DEFINE([UCX_MODULE_DLOPEN_DEEPBIND], [1],
[Load UCX modules with RTLD_DEEPBIND])
ucx_module_deepbind_summary="yes"],
[AC_MSG_ERROR([--enable-module-deepbind requires RTLD_DEEPBIND support from <dlfcn.h>])],
[[#include <dlfcn.h>]])])
Comment thread
roiedanino marked this conversation as resolved.


#
# Define SHARED_LIB preprocessor macro when building a shared library
Expand Down Expand Up @@ -434,6 +472,8 @@ AC_MSG_NOTICE([ Multi-thread: ${mt_enable}])
AC_MSG_NOTICE([ MPI tests: ${mpi_enable}])
AC_MSG_NOTICE([ VFS support: ${vfs_enable}])
AC_MSG_NOTICE([ Devel headers: ${enable_devel_headers}])
AC_MSG_NOTICE([ SONAME suffix: ${ucx_soname_suffix_summary}])
AC_MSG_NOTICE([ Module deepbind: ${ucx_module_deepbind_summary}])
AC_MSG_NOTICE([io_demo CUDA support: ${with_iodemo_cuda}])
AC_MSG_NOTICE([ Bindings: <$(echo ${build_bindings}|tr ':' ' ') >])
AC_MSG_NOTICE([ UCS modules: <$(echo ${ucs_modules}|tr ':' ' ') >])
Expand Down
3 changes: 2 additions & 1 deletion src/tools/perf/cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ if HAVE_CUDA
module_LTLIBRARIES = libucx_perftest_cuda.la
libucx_perftest_cuda_la_CPPFLAGS = $(BASE_CPPFLAGS) $(CUDA_CPPFLAGS)
libucx_perftest_cuda_la_CFLAGS = $(BASE_CFLAGS) $(CUDA_CFLAGS) $(LT_CFLAGS)
libucx_perftest_cuda_la_LDFLAGS = $(CUDA_LDFLAGS) -version-info $(SOVERSION)
libucx_perftest_cuda_la_LDFLAGS = $(CUDA_LDFLAGS) -version-info $(SOVERSION) \
$(UCX_LT_RELEASE)
libucx_perftest_cuda_la_LIBADD = $(CUDART_LIBS)
libucx_perftest_cuda_la_SOURCES = cuda_alloc.c

Expand Down
3 changes: 2 additions & 1 deletion src/tools/perf/mad/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module_LTLIBRARIES = libucx_perftest_mad.la
libucx_perftest_mad_la_CPPFLAGS = $(BASE_CPPFLAGS)
libucx_perftest_mad_la_CFLAGS = $(BASE_CFLAGS) $(MAD_CFLAGS) \
$(OPENMP_CFLAGS) $(LT_CFLAGS)
libucx_perftest_mad_la_LDFLAGS = $(MAD_LDFLAGS) -version-info $(SOVERSION)
libucx_perftest_mad_la_LDFLAGS = $(MAD_LDFLAGS) -version-info $(SOVERSION) \
$(UCX_LT_RELEASE)
libucx_perftest_mad_la_LIBADD = $(MAD_LIBS)
libucx_perftest_mad_la_SOURCES = perftest_mad.c

Expand Down
1 change: 1 addition & 0 deletions src/tools/perf/rocm/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ libucx_perftest_rocm_la_CPPFLAGS = $(BASE_CPPFLAGS) $(HIP_CPPFLAGS)
libucx_perftest_rocm_la_CFLAGS = $(BASE_CFLAGS) $(HIP_CFLAGS) \
$(LT_CFLAGS)
libucx_perftest_rocm_la_LDFLAGS = $(HIP_LDFLAGS) $(HIP_LIBS) -version-info $(SOVERSION) \
$(UCX_LT_RELEASE) \
$(patsubst %, -Xlinker %, -L$(ROCM_ROOT)/lib -rpath $(ROCM_ROOT)/hip/lib -rpath $(ROCM_ROOT)/lib) \
$(patsubst %, -Xlinker %, --enable-new-dtags) \
$(patsubst %, -Xlinker %, -rpath $(ROCM_ROOT)/lib64)
Expand Down
3 changes: 2 additions & 1 deletion src/tools/perf/ze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module_LTLIBRARIES = libucx_perftest_ze.la
libucx_perftest_ze_la_CPPFLAGS = $(BASE_CPPFLAGS) $(ZE_CPPFLAGS)
libucx_perftest_ze_la_CFLAGS = $(BASE_CFLAGS) $(ZE_CFLAGS) \
$(LT_CFLAGS)
libucx_perftest_ze_la_LDFLAGS = $(ZE_LDFLAGS) $(ZE_LIBS) -version-info $(SOVERSION)
libucx_perftest_ze_la_LDFLAGS = $(ZE_LDFLAGS) $(ZE_LIBS) \
-version-info $(SOVERSION) $(UCX_LT_RELEASE)
libucx_perftest_ze_la_SOURCES = ze_alloc.c

include $(top_srcdir)/config/module.am
Expand Down
2 changes: 1 addition & 1 deletion src/ucm/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SUBDIRS = . cuda rocm ze
lib_LTLIBRARIES = libucm.la
libucm_ladir = $(includedir)/ucm
libucm_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \
-ldl -version-info $(SOVERSION)
-ldl -version-info $(SOVERSION) $(UCX_LT_RELEASE)
libucm_la_CPPFLAGS = $(BASE_CPPFLAGS) -DUCM_MALLOC_PREFIX=ucm_dl
libucm_la_CFLAGS = $(BASE_CFLAGS) $(CFLAGS_NO_DEPRECATED) \
$(LT_CFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion src/ucm/cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ libucm_cuda_la_CFLAGS = $(BASE_CFLAGS) $(CUDA_CFLAGS) $(LT_CFLAGS)
libucm_cuda_la_LIBADD = ../libucm.la $(CUDA_LIBS) $(CUDART_LIBS)
libucm_cuda_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \
$(patsubst %, -Xlinker %, $(CUDA_LDFLAGS)) \
-version-info $(SOVERSION)
-version-info $(SOVERSION) $(UCX_LT_RELEASE)

noinst_HEADERS = \
cudamem.h
Expand Down
1 change: 1 addition & 0 deletions src/ucm/rocm/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ libucm_rocm_la_CFLAGS = $(BASE_CFLAGS) $(ROCM_CFLAGS) $(LT_CFLAGS)
libucm_rocm_la_LIBADD = ../libucm.la
libucm_rocm_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \
$(ROCM_LDFLAGS) $(ROCM_LIBS) -version-info $(SOVERSION) \
$(UCX_LT_RELEASE) \
$(patsubst %, -Xlinker %, -L$(ROCM_ROOT)/lib -rpath $(ROCM_ROOT)/hip/lib -rpath $(ROCM_ROOT)/lib) \
$(patsubst %, -Xlinker %, --enable-new-dtags) \
$(patsubst %, -Xlinker %, -rpath $(ROCM_ROOT)/lib64)
Expand Down
2 changes: 1 addition & 1 deletion src/ucm/ze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ libucm_ze_la_CFLAGS = $(BASE_CFLAGS) $(ZE_CFLAGS) $(LT_CFLAGS)
libucm_ze_la_LIBADD = ../libucm.la $(ZE_LIBS)
libucm_ze_la_LDFLAGS = $(UCM_MODULE_LDFLAGS) \
$(patsubst %, -Xlinker %, $(ZE_LDFLAGS)) \
-version-info $(SOVERSION)
-version-info $(SOVERSION) $(UCX_LT_RELEASE)

noinst_HEADERS = \
zemem.h
Expand Down
2 changes: 1 addition & 1 deletion src/ucp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ lib_LTLIBRARIES = libucp.la
libucp_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libucp_la_LIBS =
libucp_la_CPPFLAGS = $(BASE_CPPFLAGS)
libucp_la_LDFLAGS = -ldl -version-info $(SOVERSION)
libucp_la_LDFLAGS = -ldl -version-info $(SOVERSION) $(UCX_LT_RELEASE)
libucp_la_LIBADD = ../ucs/libucs.la ../uct/libuct.la
libucp_ladir = $(includedir)/ucp

Expand Down
2 changes: 1 addition & 1 deletion src/ucs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ libucs_la_CPPFLAGS = $(BASE_CPPFLAGS) $(BFD_CPPFLAGS) \
-DUCX_MODULE_DIR=\"$(moduledir)\" \
-DUCX_CONFIG_DIR=\"$(ucx_config_dir)\"
libucs_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libucs_la_LDFLAGS = -ldl $(BFD_LDFLAGS) -version-info $(SOVERSION)
libucs_la_LDFLAGS = -ldl $(BFD_LDFLAGS) -version-info $(SOVERSION) $(UCX_LT_RELEASE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] [important] libucs_signal is left unsuffixed

The new suffix is applied to libucm/libucs/libuct/libucp, but libucs_signal is also an installed versioned UCX shared library. If the goal is avoiding collisions with already-loaded UCX DSOs, leaving this SONAME as libucs_signal.so.0 keeps one UCX entry point outside the suffix scheme. Add $(UCX_LT_RELEASE) here as well, or explicitly document that this option is limited to the four core libraries.

libucs_ladir = $(includedir)/ucs
libucs_la_LIBADD = $(LIBM) $(top_builddir)/src/ucm/libucm.la $(BFD_LIBS)

Expand Down
2 changes: 1 addition & 1 deletion src/ucs/signal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ lib_LTLIBRARIES = libucs_signal.la

libucs_signal_la_CPPFLAGS = $(BASE_CPPFLAGS)
libucs_signal_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libucs_signal_la_LDFLAGS = -version-info $(SOVERSION)
libucs_signal_la_LDFLAGS = -version-info $(SOVERSION) $(UCX_LT_RELEASE)
libucs_signal_la_LIBADD = $(top_builddir)/src/ucs/libucs.la
libucs_signal_la_SOURCES = signal.c
17 changes: 17 additions & 0 deletions src/ucs/sys/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ static int ucs_module_flags_to_dlopen_mode(unsigned flags)
} else {
mode |= RTLD_LOCAL;
}
#if defined(UCX_MODULE_DLOPEN_DEEPBIND) && defined(RTLD_DEEPBIND)
mode |= RTLD_DEEPBIND;
#endif

return mode;
}
Expand Down Expand Up @@ -292,6 +295,19 @@ ucs_module_filename_to_base(const char *filename, char *base, size_t base_max)
base[base_len] = '\0';
}

static void ucs_module_normalize_base(char *base)
{
#ifdef UCX_MODULE_SONAME_SUFFIX
size_t suffix_len = strlen(UCX_MODULE_SONAME_SUFFIX);
size_t base_len = strlen(base);

if ((base_len > suffix_len) &&
!strcmp(base + base_len - suffix_len, UCX_MODULE_SONAME_SUFFIX)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ MINOR

minor: this only strips the suffix when it appears at the very end of base. After ucs_module_filename_to_base that is what we get for libtool -release output (e.g. libuct_cuda-MYSUFFIX), so it works, but a one-line comment here describing the expected input (lib<framework>_<mod>-<suffix>) would help future readers understand why a tail-only check is sufficient.

base[base_len - suffix_len] = '\0';
}
#endif
}

static void ucs_module_load_from_dir(const char *dir, const char *framework,
int mode, ucs_string_set_t *loaded_set)
{
Expand Down Expand Up @@ -324,6 +340,7 @@ static void ucs_module_load_from_dir(const char *dir, const char *framework,
}

ucs_module_filename_to_base(entry->d_name, base, sizeof(base));
ucs_module_normalize_base(base);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ MINOR

ucs_module_normalize_base will also strip the configured suffix from any unrelated module name that happens to end with it (e.g. a third-party libuct_foo-ci.so not built with --with-soname-suffix=ci). Worth scoping on the -<suffix> separator anchored to the framework prefix, or at least a comment that such collisions are accepted.

if (strchr(base + prefix_len, '_') != NULL) {
ucs_module_debug("module name contains '_': %s, skipping", base + prefix_len);
continue;
Expand Down
3 changes: 2 additions & 1 deletion src/ucs/vfs/fuse/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ libucs_fuse_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libucs_fuse_la_LIBADD = $(FUSE3_LIBS) \
$(top_builddir)/src/ucs/vfs/sock/libucs_vfs_sock.la \
$(top_builddir)/src/ucs/libucs.la
libucs_fuse_la_LDFLAGS = $(FUSE3_LDFLAGS) -version-info $(SOVERSION)
libucs_fuse_la_LDFLAGS = $(FUSE3_LDFLAGS) -version-info $(SOVERSION) \
$(UCX_LT_RELEASE)
libucs_fuse_la_SOURCES = vfs_fuse.c

PKG_CONFIG_NAME=fuse
Expand Down
2 changes: 1 addition & 1 deletion src/uct/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lib_LTLIBRARIES = libuct.la
libuct_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_la_CPPFLAGS = $(BASE_CPPFLAGS)
libuct_la_LIBADD = $(top_builddir)/src/ucs/libucs.la
libuct_la_LDFLAGS = -ldl -version-info $(SOVERSION)
libuct_la_LDFLAGS = -ldl -version-info $(SOVERSION) $(UCX_LT_RELEASE)
libuct_ladir = $(includedir)/uct

nobase_dist_libuct_la_HEADERS = \
Expand Down
3 changes: 2 additions & 1 deletion src/uct/cuda/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ SUBDIRS = . gdr_copy
module_LTLIBRARIES = libuct_cuda.la
libuct_cuda_la_CPPFLAGS = $(BASE_CPPFLAGS) $(CUDA_CPPFLAGS)
libuct_cuda_la_CFLAGS = $(BASE_CFLAGS) $(CUDA_CFLAGS) $(LT_CFLAGS)
libuct_cuda_la_LDFLAGS = $(CUDA_LDFLAGS) -version-info $(SOVERSION)
libuct_cuda_la_LDFLAGS = $(CUDA_LDFLAGS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)
libuct_cuda_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la \
$(CUDA_LIBS) $(NVML_LIBS)
Expand Down
4 changes: 3 additions & 1 deletion src/uct/cuda/gdr_copy/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ if HAVE_GDR_COPY
module_LTLIBRARIES = libuct_cuda_gdrcopy.la
libuct_cuda_gdrcopy_la_CPPFLAGS = $(BASE_CPPFLAGS) $(GDR_COPY_CPPFLAGS)
libuct_cuda_gdrcopy_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_cuda_gdrcopy_la_LDFLAGS = $(GDR_COPY_LDFLAGS) -version-info $(SOVERSION)
libuct_cuda_gdrcopy_la_LDFLAGS = $(GDR_COPY_LDFLAGS) \
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)
libuct_cuda_gdrcopy_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/cuda/libuct_cuda.la \
$(GDR_COPY_LIBS)
Expand Down
4 changes: 3 additions & 1 deletion src/uct/gaudi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ libuct_gaudi_la_CPPFLAGS = $(BASE_CPPFLAGS) $(GAUDI_CPPFLAGS)
libuct_gaudi_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_gaudi_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_gaudi_la_LDFLAGS = $(GAUDI_LDFLAGS) $(GAUDI_LIBS) -version-info $(SOVERSION)
libuct_gaudi_la_LDFLAGS = $(GAUDI_LDFLAGS) $(GAUDI_LIBS) \
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)

noinst_HEADERS = \
base/scal.h \
Expand Down
3 changes: 2 additions & 1 deletion src/uct/ib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ libuct_ib_la_CPPFLAGS = $(BASE_CPPFLAGS) $(IBVERBS_CPPFLAGS)
libuct_ib_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_ib_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_ib_la_LDFLAGS = $(IBVERBS_LDFLAGS) -version-info $(SOVERSION)
libuct_ib_la_LDFLAGS = $(IBVERBS_LDFLAGS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)

noinst_HEADERS = \
base/ib_device.h \
Expand Down
3 changes: 2 additions & 1 deletion src/uct/ib/efa/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ libuct_ib_efa_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la \
$(top_builddir)/src/uct/ib/libuct_ib.la
libuct_ib_efa_la_LDFLAGS = $(EFA_LIB) $(IBVERBS_LDFLAGS) \
-version-info $(SOVERSION)
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)

libuct_ib_efa_la_SOURCES = base/ib_efa_md.c \
srd/srd_iface.c \
Expand Down
4 changes: 3 additions & 1 deletion src/uct/ib/mlx5/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ SUBDIRS = . gdaki
module_LTLIBRARIES = libuct_ib_mlx5.la
libuct_ib_mlx5_la_CPPFLAGS = $(BASE_CPPFLAGS) $(IBVERBS_CPPFLAGS)
libuct_ib_mlx5_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_ib_mlx5_la_LDFLAGS = $(LIB_MLX5) $(IBVERBS_LDFLAGS) -version-info $(SOVERSION)
libuct_ib_mlx5_la_LDFLAGS = $(LIB_MLX5) $(IBVERBS_LDFLAGS) \
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)
libuct_ib_mlx5_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la \
$(top_builddir)/src/uct/ib/libuct_ib.la
Expand Down
3 changes: 2 additions & 1 deletion src/uct/ib/mlx5/gdaki/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ libuct_ib_mlx5_gda_la_CPPFLAGS = $(BASE_CPPFLAGS) $(IBVERBS_CPPFLAGS) \
$(CUDA_CPPFLAGS)
libuct_ib_mlx5_gda_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS) $(CUDA_CFLAGS)
libuct_ib_mlx5_gda_la_LDFLAGS = $(IBVERBS_LDFLAGS) $(CUDA_LDFLAGS) \
-version-info $(SOVERSION)
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)
libuct_ib_mlx5_gda_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la \
$(top_builddir)/src/uct/ib/libuct_ib.la \
Expand Down
4 changes: 3 additions & 1 deletion src/uct/ib/rdmacm/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ if HAVE_DEVX
libuct_rdmacm_la_LIBADD += $(LIB_MLX5)
endif

libuct_rdmacm_la_LDFLAGS = $(IBVERBS_LDFLAGS) $(RDMACM_LDFLAGS) -version-info $(SOVERSION)
libuct_rdmacm_la_LDFLAGS = $(IBVERBS_LDFLAGS) $(RDMACM_LDFLAGS) \
-version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)

noinst_HEADERS = \
rdmacm_cm.h \
Expand Down
1 change: 1 addition & 0 deletions src/uct/rocm/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ libuct_rocm_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_rocm_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_rocm_la_LDFLAGS = $(ROCM_LDFLAGS) $(ROCM_LIBS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS) \
$(patsubst %, -Xlinker %, -L$(ROCM_ROOT)/lib -rpath $(ROCM_ROOT)/hip/lib -rpath $(ROCM_ROOT)/lib) \
$(patsubst %, -Xlinker %, --enable-new-dtags) \
$(patsubst %, -Xlinker %, -rpath $(ROCM_ROOT)/lib64)
Expand Down
3 changes: 2 additions & 1 deletion src/uct/sm/mm/xpmem/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ libuct_xpmem_la_CFLAGS = $(BASE_CFLAGS) $(XPMEM_CFLAGS) $(LT_CFLAGS)
libuct_xpmem_la_CPPFLAGS = $(BASE_CPPFLAGS)
libuct_xpmem_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_xpmem_la_LDFLAGS = $(XPMEM_LIBS) -version-info $(SOVERSION)
libuct_xpmem_la_LDFLAGS = $(XPMEM_LIBS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)
libuct_xpmem_la_SOURCES = mm_xpmem.c

PKG_CONFIG_NAME=xpmem
Expand Down
2 changes: 1 addition & 1 deletion src/uct/sm/scopy/cma/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ libuct_cma_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_cma_la_CPPFLAGS = $(BASE_CPPFLAGS)
libuct_cma_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_cma_la_LDFLAGS = -version-info $(SOVERSION)
libuct_cma_la_LDFLAGS = -version-info $(SOVERSION) $(UCT_MODULE_LDFLAGS)

noinst_HEADERS = \
cma_iface.h \
Expand Down
3 changes: 2 additions & 1 deletion src/uct/ugni/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ libuct_ugni_la_CFLAGS = $(BASE_CFLAGS) $(CRAY_UGNI_CFLAGS) \
$(LT_CFLAGS)
libuct_ugni_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_ugni_la_LDFLAGS = $(CRAY_UGNI_LIBS) -version-info $(SOVERSION)
libuct_ugni_la_LDFLAGS = $(CRAY_UGNI_LIBS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS)

noinst_HEADERS = \
base/ugni_def.h \
Expand Down
1 change: 1 addition & 0 deletions src/uct/ze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ libuct_ze_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libuct_ze_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/libuct.la
libuct_ze_la_LDFLAGS = $(ZE_LDFLAGS) $(ZE_LIBS) -version-info $(SOVERSION) \
$(UCT_MODULE_LDFLAGS) \
$(patsubst %, -Xlinker %, -L$(ZE_ROOT)/lib -rpath $(ZE_ROOT)/hip/lib -rpath $(ZE_ROOT)/lib) \
$(patsubst %, -Xlinker %, --enable-new-dtags) \
$(patsubst %, -Xlinker %, -rpath $(ZE_ROOT)/lib64)
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/ucs/test_module/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module_LTLIBRARIES = libtest_module.la
libtest_module_la_CPPFLAGS = $(BASE_CPPFLAGS)
libtest_module_la_CFLAGS = $(BASE_CFLAGS) $(LT_CFLAGS)
libtest_module_la_LDFLAGS = -version-info $(SOVERSION)
libtest_module_la_LDFLAGS = -version-info $(SOVERSION) $(UCX_LT_RELEASE)
libtest_module_la_SOURCES = test_module.c

include $(top_srcdir)/config/module.am
Expand Down
Loading