|
6 | 6 | # and Technology (RIST). All rights reserved.
|
7 | 7 | #
|
8 | 8 | # Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
|
| 9 | +# Copyright (c) 2020 IBM Corporation. All rights reserved. |
9 | 10 | # $COPYRIGHT$
|
10 | 11 | #
|
11 | 12 | # Additional copyrights may follow
|
@@ -107,20 +108,49 @@ AC_DEFUN([MCA_opal_event_external_CONFIG],[
|
107 | 108 |
|
108 | 109 | OPAL_CHECK_PACKAGE([opal_event_external],
|
109 | 110 | [event2/event.h],
|
110 |
| - [event], |
| 111 | + [event_core], |
111 | 112 | [event_config_new],
|
112 | 113 | [-levent_pthreads],
|
113 | 114 | [$opal_event_dir],
|
114 | 115 | [$opal_event_libdir],
|
115 | 116 | [opal_event_external_support=yes],
|
116 | 117 | [opal_event_external_support=no])
|
117 | 118 |
|
| 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 | + |
| 145 | + AS_IF([test "$opal_event_external_support" = "yes"], |
| 146 | + [LDFLAGS="$opal_event_external_LDFLAGS $LDFLAGS" |
| 147 | + CPPFLAGS="$opal_event_external_CPPFLAGS $CPPFLAGS"]) |
| 148 | + |
118 | 149 | AS_IF([test "$opal_event_external_support" = "yes"],
|
119 | 150 | [# Ensure that this libevent has the symbol
|
120 | 151 | # "evthread_set_lock_callbacks", which will only exist if
|
121 | 152 | # libevent was configured with thread support.
|
122 |
| - LIBS="$opal_event_external_LDFLAGS $LIBS" |
123 |
| - AC_CHECK_LIB([event], [evthread_set_lock_callbacks], |
| 153 | + AC_CHECK_LIB([event_core], [evthread_set_lock_callbacks], |
124 | 154 | [],
|
125 | 155 | [AC_MSG_WARN([External libevent does not have thread support])
|
126 | 156 | AC_MSG_WARN([Open MPI requires libevent to be compiled with])
|
|
0 commit comments