Commit 40bacc4a authored by Kenneth Raffenetti's avatar Kenneth Raffenetti Committed by Sangmin Seo
Browse files

remove mpl/opa libs from external flags when embedded



We were incorrectly adding the build directories for mpl and opa to
external_ldflags in Makefile.am, causing them to be listed in the
installed libmpi.la libtool file. If a linker does not handle this
potentially non-existant build directory gracefully, it could cause
an issue. Since the mpl and opa libraries are now embedded in libmpi
by default, we simply eliminate the flags unless we are using
pre-built, external libraries. Fixes #2208

Thanks to Markus Geimer for the bug report and suggested solution.
Signed-off-by: Sangmin Seo's avatarSangmin Seo <sseo@anl.gov>
parent ef1cf141
......@@ -48,7 +48,7 @@ pkgconfigdir = @pkgconfigdir@
errnames_txt_files =
external_subdirs = @mplsrcdir@ @opasrcdir@
external_ldflags = -L@mpllibdir@ -L@opalibdir@
external_ldflags = @mpllibdir@ @opalibdir@
external_libs = @EXTERNAL_LIBS@
mpi_convenience_libs =
pmpi_convenience_libs = @mpllib@ @opalib@
......
......@@ -1167,7 +1167,6 @@ if test "$with_mpl_prefix" = "embedded" ; then
PAC_APPEND_FLAG([-I${master_top_builddir}/src/mpl/include], [CPPFLAGS])
PAC_APPEND_FLAG([-I${use_top_srcdir}/src/mpl/include], [CPPFLAGS])
mpllibdir="${master_top_builddir}/src/mpl"
mplsrcdir="${master_top_builddir}/src/mpl"
mpllib="src/mpl/lib${MPLLIBNAME}.la"
else
......@@ -1178,7 +1177,7 @@ else
PAC_APPEND_FLAG([-I${with_mpl_prefix}/include],[CPPFLAGS])
PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[EXTERNAL_LIBS])
PAC_APPEND_FLAG([-L${with_mpl_prefix}/lib],[WRAPPER_LDFLAGS])
mpllibdir="${with_mpl_prefix}/lib"
mpllibdir="-L${with_mpl_prefix}/lib"
fi
# OpenPA
......@@ -1218,7 +1217,6 @@ AC_SUBST([opalib])
if test "$with_openpa_prefix" = "embedded" ; then
if test -e "${use_top_srcdir}/src/openpa" ; then
opasrcdir="${master_top_builddir}/src/openpa"
opalibdir="${master_top_builddir}/src/openpa/src"
opalib="${master_top_builddir}/src/openpa/src/lib${OPALIBNAME}.la"
PAC_APPEND_FLAG([-I${use_top_srcdir}/src/openpa/src],[CPPFLAGS])
PAC_APPEND_FLAG([-I${master_top_builddir}/src/openpa/src],[CPPFLAGS])
......@@ -1254,9 +1252,9 @@ else
PAC_PREPEND_FLAG([-l${OPALIBNAME}],[EXTERNAL_LIBS])
if test -d ${with_openpa_prefix}/lib64 ; then
PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib64],[WRAPPER_LDFLAGS])
opalibdir="${with_openpa_prefix}/lib64"
opalibdir="-L${with_openpa_prefix}/lib64"
else
opalibdir="${with_openpa_prefix}/lib"
opalibdir="-L${with_openpa_prefix}/lib"
fi
PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib],[WRAPPER_LDFLAGS])
fi
......
......@@ -36,14 +36,14 @@ cpi_DEPENDENCIES =
# the make-time instances of libpmpi.la and libmpi.la live here
AM_LDFLAGS += -L../lib
# the make-time instances of libmpl.la and libopa.la live here
AM_LDFLAGS += -L@mpllibdir@ -L@opalibdir@
AM_LDFLAGS += @mpllibdir@ @opalibdir@
# Wrapper LDFLAGS need to be added at the end to make sure we link
# with the libraries we just built, and not any previously installed
# libraries.
AM_LDFLAGS += $(WRAPPER_LDFLAGS)
external_libs = -l@MPLLIBNAME@ -l@OPALIBNAME@ $(WRAPPER_LIBS)
external_libs = $(WRAPPER_LIBS)
if BUILD_PROFILING_LIB
LIBS += -l@PMPILIBNAME@
cpi_DEPENDENCIES += ../lib/lib@PMPILIBNAME@.la
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment