From 684dc2f84916a8b70692cb62770ca34fc14d6fb4 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 13 Nov 2013 03:25:18 +0000 Subject: [PATCH] Don't use the hard-coded name libmpi.so -- instead, use libmpi., where OPAL_DYN_LIB_SUFFIX was determined by configure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Ă–mer Demirel for reporting the issue. Refs trac:3905. This commit was SVN r29676. The following Trac tickets were found above: Ticket 3905 --> https://svn.open-mpi.org/trac/ompi/ticket/3905 --- ompi/mpi/java/c/Makefile.am | 2 +- ompi/mpi/java/c/mpi_MPI.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/java/c/Makefile.am b/ompi/mpi/java/c/Makefile.am index 4030f7faf6..f101cb6c01 100644 --- a/ompi/mpi/java/c/Makefile.am +++ b/ompi/mpi/java/c/Makefile.am @@ -12,7 +12,7 @@ if OMPI_WANT_JAVA_BINDINGS # Get the include files that were generated from the .java source files -AM_CPPFLAGS = -I$(top_builddir)/ompi/mpi/java/java $(OPAL_JDK_CPPFLAGS) +AM_CPPFLAGS = -I$(top_builddir)/ompi/mpi/java/java $(OPAL_JDK_CPPFLAGS) -DOPAL_DYN_LIB_SUFFIX=\"$(OPAL_DYN_LIB_SUFFIX)\" headers = \ mpiJava.h diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index abaf66a0fa..7d273e3439 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -89,7 +89,8 @@ static void *mpilibhandle=NULL; */ JNIEXPORT jboolean JNICALL Java_mpi_MPI_loadGlobalLibraries(JNIEnv *env, jclass obj) { - if (NULL == (mpilibhandle = dlopen("libmpi.so", RTLD_NOW | RTLD_GLOBAL))) { + if (NULL == (mpilibhandle = dlopen("libmpi." OPAL_DYN_LIB_SUFFIX, + RTLD_NOW | RTLD_GLOBAL))) { return JNI_FALSE; } return JNI_TRUE;