1
1

libtldl: remove libltdl from the tree

The libltdl interface has been completely replaced by the OPAL DL
framework (i.e., the opal_dl interface).

Fixes open-mpi/ompi#311
Этот коммит содержится в:
Jeff Squyres 2015-02-21 04:42:55 -08:00
родитель a026456bef
Коммит 914880a368
8 изменённых файлов: 5 добавлений и 265 удалений

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

@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved.
@ -1265,7 +1265,6 @@ verbose "\n$step. Running autotools on top-level tree\n\n";
verbose "==> Remove stale files\n";
find_and_delete(qw/config.guess config.sub depcomp compile install-sh ltconfig
ltmain.sh missing mkinstalldirs libtool/);
system("rm -rf opal/libltdl");
# Remove the old m4 file and write the new one
verbose "==> Writing m4 file with autogen.pl results\n";
@ -1292,26 +1291,6 @@ safe_system($cmd);
#---------------------------------------------------------------------------
# For FreeBSD (carried over from autogen.sh); apparently some versions
# of automake don't so this (prior to 1.9.7...?).
system("chmod u+w opal/libltdl/configure");
#---------------------------------------------------------------------------
++$step;
verbose "\n$step. Patching autotools output on top-level tree :-(\n\n";
# Patch preopen error in libltdl
if (-f "opal/libltdl/loaders/preopen.c") {
verbose "=== Patching preopen error masking in libltdl\n";
safe_system("$patch_prog -N -p0 < config/libltdl-preopen-error.diff");
unlink("opal/libltdl/loaders/preopen.c.rej");
}
patch_autotools_output(".");
#---------------------------------------------------------------------------
verbose "
================================================
Open MPI autogen: completed successfully. w00t!

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

@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
# reserved.
# Copyright (c) 2014 Intel, Inc. All rights reserved.
@ -23,7 +23,6 @@
EXTRA_DIST = \
distscript.csh \
opal_get_version.m4sh \
libltdl-preopen-error.diff \
ltmain_pgi_tp.diff \
opal_mca_priority_sort.pl

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

@ -1,27 +0,0 @@
--- opal/libltdl/loaders/preopen.c.~1~ 2010-03-03 14:13:28.000000000 -0500
+++ opal/libltdl/loaders/preopen.c 2010-03-05 17:57:11.000000000 -0500
@@ -185,7 +185,24 @@
}
}
+#if 0
+ /* Open MPI: This line is commented out because Open MPI does not
+ use the preopen functionality in libltdl at all -- so we never
+ need to see errors from this module. Additionally, this module
+ is usually invoked last in the sequence when trying to
+ lt_dlopenadvise() a DSO -- so if there was a real error when
+ opening that DSO (e.g., a symbol not found), setting the
+ FILE_NOT_FOUND error here will mask the real error.
+
+ This error has been reported upstream to the Libtool maintainers;
+ they acknowledge that it is a problem but no one has come up with
+ a good general solution yet. This Open MPI-specific solution is
+ workable for us, but not workable as a general solution. Hence,
+ we patch in this "if 0" block in autogen.pl after Libtool
+ installs libltdl in the opal/ tree.
+ */
LT__SETERROR (FILE_NOT_FOUND);
+#endif
done:
return module;

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

@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights

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

@ -1,195 +0,0 @@
dnl
dnl Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OPAL_SETUP_LIBLTDL],[
OPAL_VAR_SCOPE_PUSH([HAPPY])
opal_show_subtitle "GNU libltdl setup"
# AC_CONFIG_SUBDIRS appears to be broken for non-gcc compilers (i.e.,
# passing precious variables down to the sub-configure).
#
# Finally, make ltdl follow the same shared/static convention that was
# user for the main OMPI libraries. So manually examine
# $enable_shared and $enable_static and pass down the corresponding
# flags.
LIBLTDL_SUBDIR=
OPAL_HAVE_LTDL_ADVISE=0
OPAL_LIBLTDL_INTERNAL=0
AS_IF([test "$OPAL_ENABLE_DLOPEN_SUPPORT" = "0"],
[AC_MSG_WARN([libltdl support disabled (by --disable-dlopen)])
LIBLTDL=
LDTLINCL=
OPAL_WRAPPER_FLAGS_ADD(LIBS, "$LIBS")],
[
# Default to building the internal copy. After this,
# paffinity_hwloc_location is guaranteed to be set to one of:
# "internal", a directory name (i.e., whatever the user
# supplied), or "no".
libltdl_location=$with_libltdl
AS_IF([test -z "$libltdl_location" -o "$libltdl_location" = "yes"],
[libltdl_location=internal])
AC_MSG_CHECKING([location of libltdl])
case $libltdl_location in
no)
AC_MSG_WARN([--without-libltdl specified in conjunction with])
AC_MSG_WARN([--enable-dlopen (or --disable-dlopen was not specified)])
AC_MSG_WARN([Cannot have dlopen without libltdl])
AC_MSG_ERROR([Cannot continue])
;;
internal)
AC_MSG_RESULT([internal copy])
_OPAL_SETUP_LIBLTDL_INTERNAL
;;
external)
AC_MSG_RESULT([external copy (unspecified)])
# If we're using an extern libltdl, then reset the
# LTDLINCL that was set earlier (ie., there's no need to
# -I into our internal libltdl tree).
LIBLTDL=
LDTLINCL=
libltdl_location=
libltdl_need_external=1
;;
*)
AC_MSG_RESULT([external copy ($libltdl_location)])
OPAL_CHECK_WITHDIR([libltdl], [$libltdl_location],
[include/ltdl.h])
# If we're using an extern libltdl, then reset the
# LTDLINCL that was set earlier (ie., there's no need to
# -I into our internal libltdl tree).
LIBLTDL=
LDTLINCL=
libltdl_need_external=1
;;
esac
AS_IF([test "$libltdl_need_external" = "1"],
[OPAL_CHECK_PACKAGE([libltdl],
[ltdl.h],
[ltdl],
[lt_dlopen],
[],
[$libltdl_location],
[],
[],
[AC_MSG_WARN([External libltdl installation not found])
AC_MSG_WARN([or not usable.])
AC_MSG_ERROR([Cannot continue.])])
CPPFLAGS="$CPPFLAGS $libltdl_CPPFLAGS"
LDFLAGS="$LDFLAGS $libltdl_LDFLAGS"
LIBS="$LIBS $libltdl_LIBS"
# Check for lt_dladvise_init; warn if we don't have
# it
AC_CHECK_FUNC([lt_dladvise_init],
[OPAL_HAVE_LTDL_ADVISE=1],
[AC_MSG_WARN([*********************************************])
AC_MSG_WARN([Could not find lt_dladvise_init in the])
AC_MSG_WARN([external libltdl installation.])
AC_MSG_WARN([This could mean that your libltdl version])
AC_MSG_WARN([is old. We recommend that you re-configure])
AC_MSG_WARN([Open MPI with --with-libltdl=internal to])
AC_MSG_WARN([use the internal libltdl copy in Open MPI.])
AC_MSG_WARN([])
AC_MSG_WARN([Sleeping 10 seconds to give you a])
AC_MSG_WARN([chance to read this message.])
AC_MSG_WARN([*********************************************])
sleep 10
])
])
])
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
AC_SUBST(LIBLTDL_SUBDIR)
AC_MSG_CHECKING([for lt_dladvise])
AS_IF([test $OPAL_HAVE_LTDL_ADVISE -eq 1],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_DEFINE_UNQUOTED(OPAL_HAVE_LTDL_ADVISE, $OPAL_HAVE_LTDL_ADVISE,
[Whether libltdl appears to have the lt_dladvise interface])
AC_DEFINE_UNQUOTED(OPAL_WANT_LIBLTDL, $OPAL_ENABLE_DLOPEN_SUPPORT,
[Whether to include support for libltdl or not])
AC_DEFINE_UNQUOTED(OPAL_LIBLTDL_INTERNAL, $OPAL_LIBLTDL_INTERNAL,
[Whether we are using the internal libltdl or not])
AM_CONDITIONAL(OPAL_HAVE_DLOPEN,
[test "$OPAL_ENABLE_DLOPEN_SUPPORT" = "1"])
OPAL_VAR_SCOPE_POP([HAPPY])
])dnl
#
# Setup to build the internal copy of libltdl
#
AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[
OPAL_VAR_SCOPE_PUSH([CFLAGS_save CPPFLAGS_save])
opal_subdir_args="$opal_subdir_args --enable-ltdl-convenience --disable-ltdl-install"
if test "$enable_shared" = "yes"; then
opal_subdir_args="$opal_subdir_args --enable-shared"
else
opal_subdir_args="$opal_subdir_args --disable-shared"
fi
if test "$enable_static" = "yes"; then
opal_subdir_args="$opal_subdir_args --enable-static"
else
opal_subdir_args="$opal_subdir_args --disable-static"
fi
CFLAGS_save=$CFLAGS
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"
# VPATH support will be included by default in CONFIG_SUBDIR
OPAL_CONFIG_SUBDIR(opal/libltdl, [$opal_subdir_args],
[HAPPY=1], [HAPPY=0])
if test $HAPPY -eq 1; then
LIBLTDL_SUBDIR=libltdl
OPAL_LIBLTDL_INTERNAL=1
CPPFLAGS_save=$CPPFLAGS
CPPFLAGS="-I$srcdir -I$srcdir/opal/libltdl"
AC_EGREP_HEADER([lt_dladvise_init], [opal/libltdl/ltdl.h],
[OPAL_HAVE_LTDL_ADVISE=1])
CPPFLAGS=$CPPFLAGS_save
# --export-dynamic allows exported symbols to be resolved via
# --dlsym and friends.
LDFLAGS="-export-dynamic $LDFLAGS"
else
AC_MSG_WARN([Failed to build GNU libltdl. This usually means that something])
AC_MSG_WARN([is incorrectly setup with your environment. There may be useful information in])
AC_MSG_WARN([opal/libltdl/config.log. You can also disable GNU libltdl, which will disable])
AC_MSG_WARN([dynamic shared object loading, by configuring with --disable-dlopen.])
AC_MSG_ERROR([Cannot continue])
fi
CFLAGS=$CFLAGS_save
OPAL_VAR_SCOPE_POP
])dnl

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

@ -1230,8 +1230,6 @@ fi
# a C++ compiler.
AS_IF([test "$OMPI_WANT_FORTRAN_BINDINGS" != "1"],[F77=no FC=no])
LT_CONFIG_LTDL_DIR([opal/libltdl], [subproject])
LTDL_CONVENIENCE
LT_INIT([dlopen win32-dll])
# What's the suffix of shared libraries? Inspired by generated
@ -1268,8 +1266,6 @@ esac
AC_SUBST(OPAL_DYN_LIB_PREFIX)
AC_SUBST(OPAL_DYN_LIB_SUFFIX)
OPAL_SETUP_LIBLTDL
# Need the libtool binary before the rpathify stuff
LT_OUTPUT

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

@ -10,6 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -90,11 +91,6 @@ sub wanted {
elsif ($parts[0] eq "ompi" && $parts[1] eq "mpi" && $parts[2] eq "f90") {
return;
}
# The only file we want in opal/libltdl is ltdl.h
elsif ($parts[0] eq "opal" && $parts[1] eq "libltdl" &&
$name ne "ltdl.h") {
return;
}
# The only file we want in opal/event is event.h
elsif ($parts[0] eq "opal" && $parts[1] eq "event" &&
$name ne "event.h") {

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

@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -19,7 +19,6 @@
SUBDIRS = \
include \
$(LIBLTDL_SUBDIR) \
asm \
datatype \
etc \
@ -35,7 +34,6 @@ SUBDIRS = \
# therefore make distclean will fail).
DIST_SUBDIRS = \
include \
$(LIBLTDL_SUBDIR) \
asm \
datatype \
etc \
@ -49,7 +47,6 @@ DIST_SUBDIRS = \
lib_LTLIBRARIES = lib@OPAL_LIB_PREFIX@open-pal.la
lib@OPAL_LIB_PREFIX@open_pal_la_SOURCES =
lib@OPAL_LIB_PREFIX@open_pal_la_LIBADD = \
$(LIBLTDL) \
asm/libasm.la \
datatype/libdatatype.la \
mca/base/libmca_base.la \
@ -69,11 +66,6 @@ lib@OPAL_LIB_PREFIX@open_pal_la_SOURCES += $(headers)
if WANT_INSTALL_HEADERS
opaldir = $(opalincludedir)/$(subdir)
nobase_opal_HEADERS = $(headers)
# This is somewhat of a hack -- libltdl is installed by libtoolize,
# and us installing the header here is slightly less kludgey than
# hacking their Makefile.am.
nobase_opal_HEADERS += libltdl/ltdl.h
endif
include class/Makefile.am