From d78a9cdd773b3142fe42616dc4584be24f7b306e Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Fri, 20 Dec 2013 11:15:41 +0000 Subject: [PATCH] add rpath on mca_mtl_mxm.so to point to /path/to/mxm/lib/libmxm.so which was detected at configure time This *should* fix following situation: 1 mxm.rpm puts /etc/ld.so.conf.d/mxm.conf file during rpm install with libpath to /opt/mellanox/mxm/lib 2 some1 can extract mxm.rpm into $HOME/mxm and compile OMPI with new mxm location 3 during runtime, OMPI from prev step will pick MXM from step (1) instead of from step (2) cmr=v1.7.4:reviewer=ompi-rm1.7 This commit was SVN r30005. --- config/ompi_check_mxm.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/ompi_check_mxm.m4 b/config/ompi_check_mxm.m4 index 7dcc56f47e..7787ac5781 100644 --- a/config/ompi_check_mxm.m4 +++ b/config/ompi_check_mxm.m4 @@ -29,15 +29,20 @@ AC_DEFUN([OMPI_CHECK_MXM],[ AS_IF([test "$with_mxm" != "no"], [AS_IF([test ! -z "$with_mxm" -a "$with_mxm" != "yes"], - [ompi_check_mxm_dir="$with_mxm"]) + [ + ompi_check_mxm_dir="$with_mxm" + ompi_check_mxm_libdir="$with_mxm/lib" + ]) AS_IF([test ! -z "$with_mxm_libdir" -a "$with_mxm_libdir" != "yes"], [ompi_check_mxm_libdir="$with_mxm_libdir"]) + ompi_check_mxm_rpath="-Wl,-rpath=$ompi_check_mxm_libdir" + OMPI_CHECK_PACKAGE([$1], [mxm/api/mxm_api.h], [mxm], [mxm_cleanup], - [], + [$ompi_check_mxm_rpath], [$ompi_check_mxm_dir], [$ompi_check_mxm_libdir], [ompi_check_mxm_happy="yes"],