diff --git a/autogen.sh b/autogen.sh index bab0cc7eb5..124955ea7b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -440,6 +440,15 @@ EOF else echo " ==> your libtool doesn't need this! yay!" fi + + echo " -- RTLD_GLOBAL in libltdl" + if test -r opal/libltdl/loaders/dlopen.c && \ + test ! -z "`grep 'filename, LT_LAZY_OR_NOW' opal/libltdl/loaders/dlopen.c`"; then + patch -N -p0 < config/libltdl_dlopen_global.diff + else + echo " ==> your libltdl doesn't need this! yay!" + fi + echo " -- patching configure for broken -c/-o compiler test" sed -e 's/chmod -w \./#OMPI\/MPI FIX: chmod -w ./' \ configure > configure.new diff --git a/config/libltdl_dlopen_global.diff b/config/libltdl_dlopen_global.diff new file mode 100644 index 0000000000..16d72ae23c --- /dev/null +++ b/config/libltdl_dlopen_global.diff @@ -0,0 +1,29 @@ +--- opal/libltdl/loaders/dlopen.c 2007-03-05 08:56:11.000000000 -0800 ++++ opal/libltdl/loaders/dlopen_global.c 2007-03-05 08:54:46.000000000 -0800 +@@ -121,6 +121,17 @@ + # define LT_LAZY_OR_NOW 0 + #endif /* !LT_LAZY_OR_NOW */ + ++/* Open MPI */ ++#if !defined(LT_GLOBAL) ++# if defined(RTLD_GLOBAL) ++# define LT_GLOBAL RTLD_GLOBAL ++# else ++# if defined(DL_GLOBAL) ++# define LT_GLOBAL DL_GLOBAL ++# endif ++# endif /* !RTLD_GLOBAL */ ++#endif ++ + #if defined(HAVE_DLERROR) + # define DLERROR(arg) dlerror () + #else +@@ -136,7 +147,7 @@ + static lt_module + vm_open (lt_user_data LT__UNUSED loader_data, const char *filename) + { +- lt_module module = dlopen (filename, LT_LAZY_OR_NOW); ++ lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); + + if (!module) + {