Skip to content

Commit 959353b

Browse files
committed
Add checks for libevent.so conflict with LSF
* LSF ships a `libevent.so` that is no related to the `libevent.so` shipped with Libevent. * Add some checks to the configure logic to detect scenarios where this conflict can be detected, and provide the user with a descriptive warning message. - When detected by `event/external` this is just a warning since the internal component may be able to be used instead. - This happens when the user supplies the LSF path via the `LDFLAGS` envar instead of via `--with-lsf-libdir`. - When detected by a LSF component and LSF was explicitly requested then this becomes an error. Otherwise it will just print the warning and that component will fail to build. * Note for `master` the `orter_check_lsf.m4` portion of this cherry-pick was moved to `prrte/config/prrte_check_lsf.m4` Signed-off-by: Joshua Hursey <[email protected]> (cherry picked from commit fc4199e)
1 parent a73a89f commit 959353b

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

opal/mca/event/external/configure.m4

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,35 @@ AC_DEFUN([MCA_opal_event_external_CONFIG],[
116116
[opal_event_external_support=yes],
117117
[opal_event_external_support=no])
118118

119+
# Check to see if the above check failed because it conflicted with LSF's libevent.so
120+
# This can happen if LSF's library is in the LDFLAGS envar or default search
121+
# path. The 'event_fini' function is only defined in LSF's libevent.so and not
122+
# in Libevent's libevent.so
123+
AS_IF([test "$opal_event_external_support" = "no"],
124+
[AC_CHECK_LIB([event], [event_fini],
125+
[AC_MSG_WARN([===================================================================])
126+
AC_MSG_WARN([Possible conflicting libevent.so libraries detected on the system.])
127+
AC_MSG_WARN([])
128+
AC_MSG_WARN([LSF provides a libevent.so that is not from Libevent in its])
129+
AC_MSG_WARN([library path. It is possible that you have installed Libevent])
130+
AC_MSG_WARN([on the system, but the linker is picking up the wrong version.])
131+
AC_MSG_WARN([])
132+
AC_MSG_WARN([Configure may continue and attempt to use the 'internal' libevent])
133+
AC_MSG_WARN([instead of the 'external' libevent if you did not explicitly request])
134+
AC_MSG_WARN([the 'external' component.])
135+
AC_MSG_WARN([])
136+
AC_MSG_WARN([If your intention was to use the 'external' libevent then you need])
137+
AC_MSG_WARN([to address this linker path ordering issue. One way to do so is])
138+
AC_MSG_WARN([to make sure the libevent system library path occurs before the])
139+
AC_MSG_WARN([LSF library path.])
140+
AC_MSG_WARN([===================================================================])
141+
opal_event_external_support=no
142+
])
143+
])
144+
119145
AS_IF([test "$opal_event_external_support" = "yes"],
120146
[LDFLAGS="$opal_event_external_LDFLAGS $LDFLAGS"
121-
CPPFLAGS="$opal_event_external_CPPFLAGS $CPPFLAGS"],
122-
[])
147+
CPPFLAGS="$opal_event_external_CPPFLAGS $CPPFLAGS"])
123148

124149
AS_IF([test "$opal_event_external_support" = "yes"],
125150
[# Ensure that this libevent has the symbol

0 commit comments

Comments
 (0)