Skip to content

Commit 1aabbe4

Browse files
committed
Add extra libs to PRRTE binaries for external deps
libevent, hwloc, and pmix can be external and may require that their libs be explicitly linked into the PRRTE binaries Signed-off-by: Ralph Castain <[email protected]>
1 parent f88f271 commit 1aabbe4

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

config/ompi_setup_prrte.m4

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525

2626
AC_DEFUN([OMPI_SETUP_PRRTE],[
27-
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static])
27+
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static opal_prrte_extra_libs opal_prrte_extra_ltlibs opal_prrte_extra_ldflags])
2828

2929
opal_prrte_save_CFLAGS=$CFLAGS
3030
opal_prrte_save_CPPFLAGS=$CPPFLAGS
@@ -59,29 +59,29 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
5959
if test "$enable_internal_rte" != "no"; then
6060
AC_MSG_RESULT([yes])
6161
ompi_want_prrte=yes
62-
if test -z $with_libevent || test "$with_libevent" = "internal" || test "$with_libevent" = "yes"; then
63-
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
64-
elif test "$with_libevent" = "external"; then
65-
opal_prrte_libevent_arg=""
66-
else
67-
opal_prrte_libevent_arg="--with-libevent=$with_libevent"
62+
opal_prrte_extra_libs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
63+
opal_prrte_extra_ltlibs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
64+
65+
if test "$opal_event_external_support" = "yes"; then
66+
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_event_external_LIBS"
67+
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_event_external_LIBS"
6868
fi
69+
# specifying --with-libevent-header causes prrte to ignore the with_libevent and with_libevent_libdir options
70+
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
6971

70-
if test -z $with_hwloc || test "$with_hwloc" = "internal" || test "$with_hwloc" = "yes"; then
71-
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
72-
elif test "$with_hwloc" = "external"; then
73-
opal_prrte_hwloc_arg=""
74-
else
75-
opal_prrte_hwloc_arg="--with-hwloc=$with_hwloc"
72+
if test "$opal_hwloc_external_support" = "yes"; then
73+
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_hwloc_external_LIBS"
74+
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_hwloc_external_LIBS"
7675
fi
76+
# specifying --with-hwloc-header causes prrte to ignore the with_hwloc and with_hwloc_libdir options
77+
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
7778

78-
if test -z $with_pmix || test "$with_pmix" = "internal" || test "$with_pmix" = "yes"; then
79-
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
80-
elif test "$with_pmix" = "external"; then
81-
opal_prrte_pmix_arg=""
82-
else
83-
opal_prrte_pmix_arg="--with-pmix=$with_pmix"
79+
if test "$opal_external_pmix_happy" = "yes"; then
80+
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_pmix_external_LIBS"
81+
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_pmix_external_LIBS"
8482
fi
83+
# specifying --with-pmix-header causes prrte to ignore the with_pmix and with_pmix_libdir options
84+
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
8585

8686
if test -z $enable_prte_prefix_by_default || test "$enable_prte_prefix_by_default" = "yes" ||
8787
test "$enable_orterun_prefix_given" = "yes"; then
@@ -102,7 +102,7 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
102102
opal_prrte_args="$opal_prrte_args --with-platform=$with_prrte_platform"
103103
fi
104104
# add the extra libs
105-
opal_prrte_args="$opal_prrte_args --with-prrte-extra-lib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la --with-prrte-extra-ltlib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la"
105+
opal_prrte_args="$opal_prrte_args --with-prrte-extra-lib=\"$opal_prrte_extra_libs\" --with-prrte-extra-ltlib=\"$opal_prrte_extra_ltlibs\""
106106

107107
AC_MSG_CHECKING([final prrte configure args])
108108
AC_MSG_RESULT([$opal_prrte_args])

0 commit comments

Comments
 (0)