1
1

wrappers: fix errant @{libdir} reference in pkg-config files

The RPATH support added a @{libdir} token into
<package>_WRAPPER_EXTRA_LDFLAGS.  However, these flags are also
substituted into the pkg-config data files, and they don't understand
the @{foo} notation.  So convert @{libdir} into ${libdir}, which
pkg-config *does* understand.

Thanks to Christoph Junghans (@junghans) for notifying us of the issue.

Fixes #406.
Этот коммит содержится в:
Jeff Squyres 2015-02-20 08:34:15 -08:00
родитель ae5424c18b
Коммит 9b716d946e
6 изменённых файлов: 30 добавлений и 6 удалений

Просмотреть файл

@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved.
dnl Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved. dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
@ -248,6 +248,12 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
[AC_MSG_WARN([RPATH support requested but not available]) [AC_MSG_WARN([RPATH support requested but not available])
AC_MSG_ERROR([Cannot continue])]) AC_MSG_ERROR([Cannot continue])])
# Note that we have to setup <package>_PKG_CONFIG_LDFLAGS for the
# pkg-config files to parallel the
# <package>_WRAPPER_EXTRA_LDFLAGS. This is because pkg-config
# will not understand the @{libdir} notation in
# *_WRAPPER_EXTRA_LDFLAGS; we have to translate it to ${libdir}.
# We now have all relevant flags. Substitute them in everywhere. # We now have all relevant flags. Substitute them in everywhere.
m4_ifdef([project_opal], [ m4_ifdef([project_opal], [
AC_MSG_CHECKING([for OPAL CPPFLAGS]) AC_MSG_CHECKING([for OPAL CPPFLAGS])
@ -284,6 +290,12 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
AC_SUBST([OPAL_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([OPAL_WRAPPER_EXTRA_LDFLAGS])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_LDFLAGS]) AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_LDFLAGS])
# Convert @{libdir} to ${libdir} for pkg-config
AC_MSG_CHECKING([for OPAL pkg-config LDFLAGS])
OPAL_PKG_CONFIG_LDFLAGS=`echo "$OPAL_WRAPPER_EXTRA_LDFLAGS" | sed -e 's/@{libdir}/\${libdir}/g'`
AC_SUBST([OPAL_PKG_CONFIG_LDFLAGS])
AC_MSG_RESULT([$OPAL_PKG_CONFIG_LDFLAGS])
# wrapper_extra_libs doesn't really get populated until after the mca system runs # wrapper_extra_libs doesn't really get populated until after the mca system runs
# since most of the libs come from libtool. So this is the first time we can # since most of the libs come from libtool. So this is the first time we can
# uniq them. ROMIO in particular adds lots of things already in wrapper_extra_libs, # uniq them. ROMIO in particular adds lots of things already in wrapper_extra_libs,
@ -322,6 +334,12 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
AC_SUBST([ORTE_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([ORTE_WRAPPER_EXTRA_LDFLAGS])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_LDFLAGS]) AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_LDFLAGS])
# Convert @{libdir} to ${libdir} for pkg-config
AC_MSG_CHECKING([for ORTE pkg-config LDFLAGS])
ORTE_PKG_CONFIG_LDFLAGS=`echo "$ORTE_WRAPPER_EXTRA_LDFLAGS" | sed -e 's/@{libdir}/\${libdir}/g'`
AC_SUBST([ORTE_PKG_CONFIG_LDFLAGS])
AC_MSG_RESULT([$ORTE_PKG_CONFIG_LDFLAGS])
AC_MSG_CHECKING([for ORTE LIBS]) AC_MSG_CHECKING([for ORTE LIBS])
ORTE_WRAPPER_EXTRA_LIBS="$orte_mca_wrapper_extra_libs" ORTE_WRAPPER_EXTRA_LIBS="$orte_mca_wrapper_extra_libs"
OPAL_FLAGS_APPEND_UNIQ([ORTE_WRAPPER_EXTRA_LIBS], [$wrapper_extra_libs]) OPAL_FLAGS_APPEND_UNIQ([ORTE_WRAPPER_EXTRA_LIBS], [$wrapper_extra_libs])
@ -390,6 +408,12 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS]) AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LDFLAGS]) AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LDFLAGS])
# Convert @{libdir} to ${libdir} for pkg-config
AC_MSG_CHECKING([for OMPI pkg-config LDFLAGS])
OMPI_PKG_CONFIG_LDFLAGS=`echo "$OMPI_WRAPPER_EXTRA_LDFLAGS" | sed -e 's/@{libdir}/\${libdir}/g'`
AC_SUBST([OMPI_PKG_CONFIG_LDFLAGS])
AC_MSG_RESULT([$OMPI_PKG_CONFIG_LDFLAGS])
AC_MSG_CHECKING([for OMPI LIBS]) AC_MSG_CHECKING([for OMPI LIBS])
OMPI_WRAPPER_EXTRA_LIBS="$ompi_mca_wrapper_extra_libs" OMPI_WRAPPER_EXTRA_LIBS="$ompi_mca_wrapper_extra_libs"
OPAL_FLAGS_APPEND_UNIQ([OMPI_WRAPPER_EXTRA_LIBS], [$wrapper_extra_libs]) OPAL_FLAGS_APPEND_UNIQ([OMPI_WRAPPER_EXTRA_LIBS], [$wrapper_extra_libs])

Просмотреть файл

@ -14,7 +14,7 @@ libdir=@libdir@
# static linking (they're pulled in by libopen-rte.so's implicit # static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private. # dependencies), so only list these in Libs.private.
# #
Libs: -L${libdir} @OMPI_WRAPPER_EXTRA_LDFLAGS@ -lmpi Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
# #
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@ Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@

Просмотреть файл

@ -14,7 +14,7 @@ libdir=@libdir@
# static linking (they're pulled in by libopen-rte.so's implicit # static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private. # dependencies), so only list these in Libs.private.
# #
Libs: -L${libdir} @OMPI_WRAPPER_EXTRA_LDFLAGS@ @OMPI_WRAPPER_CXX_LIB@ -lmpi Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_WRAPPER_CXX_LIB@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
# #
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CXXFLAGS@ Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CXXFLAGS@

Просмотреть файл

@ -14,6 +14,6 @@ libdir=@libdir@
# static linking (they're pulled in by libopen-rte.so's implicit # static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private. # dependencies), so only list these in Libs.private.
# #
Libs: -L${libdir} @OMPI_WRAPPER_EXTRA_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -lmpi Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@ Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@

Просмотреть файл

@ -14,7 +14,7 @@ libdir=@libdir@
# static linking (they're pulled in by libopen-rte.so's implicit # static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private. # dependencies), so only list these in Libs.private.
# #
Libs: -L${libdir} @OMPI_WRAPPER_EXTRA_LDFLAGS@ -lmpi Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ -lmpi
Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@
# #
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@ Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@

Просмотреть файл

@ -14,7 +14,7 @@ libdir=@libdir@
# static linking (they're pulled in by libopen-rte.so's implicit # static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private. # dependencies), so only list these in Libs.private.
# #
Libs: -L${libdir} @ORTE_WRAPPER_EXTRA_LDFLAGS@ -lopen-rte Libs: -L${libdir} @ORTE_PKG_CONFIG_LDFLAGS@ -lopen-rte
Libs.private: @ORTE_WRAPPER_EXTRA_LIBS@ Libs.private: @ORTE_WRAPPER_EXTRA_LIBS@
# #
# It is safe to hard-wire the -I before the EXTRA_INCLUDES because we # It is safe to hard-wire the -I before the EXTRA_INCLUDES because we