From 319fb12504fd5c80d85976d937efe8dca15abc38 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 26 Mar 2010 21:03:50 +0000 Subject: [PATCH] Per RFC initially started here: http://www.open-mpi.org/community/lists/devel/2010/02/7496.php Increase the required versions of AM, AC, and LT: * Autoconf: 2.65 * Automake: 1.11.1 * Libtool: 2.2.6b And therefore removed a bunch of patches that we used to apply to make older versions of these tools work. Also updated the HACKING document to match these version numbers, specifically mentioned Mercurial in a few places, and removed some outdated language about running autogen.sh in subdirectories. This commit was SVN r22896. --- HACKING | 52 +++-------- autogen.sh | 150 +----------------------------- config/libltdl_dlopen_global.diff | 29 ------ config/lt-sun-fortran.diff | 26 ------ config/lt1522-pathCC.diff | 11 --- config/lt21a-pathCC.diff | 11 --- config/lt224-icc.diff | 20 ---- config/ltmain_otool.diff | 13 --- 8 files changed, 16 insertions(+), 296 deletions(-) delete mode 100644 config/libltdl_dlopen_global.diff delete mode 100644 config/lt-sun-fortran.diff delete mode 100644 config/lt1522-pathCC.diff delete mode 100644 config/lt21a-pathCC.diff delete mode 100644 config/lt224-icc.diff delete mode 100644 config/ltmain_otool.diff diff --git a/HACKING b/HACKING index a804a38cd6..adff387b55 100644 --- a/HACKING +++ b/HACKING @@ -20,7 +20,7 @@ Overview This file is here for those who are building/exploring OMPI in its source code form, most likely through a developer's tree (i.e., a -Subversion checkout). +Subversion or Mercurial checkout). Debugging vs. Optimized Builds @@ -31,8 +31,10 @@ build includes a lot of debugging features. This happens automatically when when configure detects the hidden ".svn" Subversion meta directory (that is present in all Subversion checkouts) in your source tree, and therefore activates a number of developer-only -debugging features in the Open MPI code base. The same is true if you -have a Mercurial checkout (with the hidden .hg meta directory). +debugging features in the Open MPI code base. + +The same debugging features are activated if you build in a Mercurial +clone (with the hidden ".hg" meta directory). By definition, debugging builds will perform [much] slower than optimized builds of Open MPI. You should *NOT* conduct timing tests @@ -105,10 +107,11 @@ shell$ automake --version shell$ libtoolize --version To strengthen the above point: the core Open MPI developers typically -use very, very recent versions of the GNU tools. Little checking is -done to ensure that the code base is compatible with older versions of -these tools. If you have a problem, try upgrading your GNU tools to -the latest versions and try again. +use very, very recent versions of the GNU tools. There are known bugs +in older versions of the GNU tools that Open MPI no longer compensates +for (it seemed senseless to indefinitely support patches for ancient +versions of Autoconf, for example). You *WILL* have problems if you +do not use recent versions of the GNU tools. If you need newer versions, you are *strongly* encouraged to heed the following advice: @@ -157,7 +160,7 @@ NOTE: On MacOS/X, the default "libtool" program is different than the 4. All four packages require two simple commands to build and install (where PREFIX is the prefix discussed in 3, above). - shell$ cd m4-1.4.11 + shell$ cd m4-1.4.13 shell$ ./configure --prefix=PREFIX shell$ make; make install @@ -167,14 +170,14 @@ NOTE: On MacOS/X, the default "libtool" program is different than the --> If you are using the csh or tcsh shells, be sure to run the "rehash" command after you install each package. - shell$ cd ../autoconf-2.63 + shell$ cd ../autoconf-2.65 shell$ ./configure --prefix=PREFIX shell$ make; make install --> If you are using the csh or tcsh shells, be sure to run the "rehash" command after you install each package. - shell$ cd ../automake-1.10.1 + shell$ cd ../automake-1.11.1 shell$ ./configure --prefix=PREFIX shell$ make; make install @@ -218,35 +221,6 @@ NOTE: On MacOS/X, the default "libtool" program is different than the 5b. You do *NOT* need to re-run autogen.sh if you modify a Makefile.am. - 5c. Note that "autogen.sh" automatically traverses the entire OMPI - tree, running the GNU tools in all MCA component directories. - This is not always necessary. As you become more familiar with - the OMPI sources, you will come to understand the when you only - need to re-generate the top-level configure script, and when - you need to re-generate *all* configure scripts (it's - complicated -- not described here -- when in doubt, do them - all). - - If you only need to re-generate the top-level configure script, - you can run: - - shell$ autogen.sh -l - - (i.e., "local" mode) which will prevent autogen.sh from - traversing all the MCA component directories. - - 5d. Similarly, if you only need to regenerate the configure script - in a single MCA component directory (and that component has a - "configure.stub" file), cd into that component's directory and - run autogen.sh in there directly: - - shell$ cd src/mca/pml/teg - shell$ ../../../../autogen.sh - - This does *not* work if the component has a "configure.m4" - file. If a component's configure.m4 file changes, you will - need to run "autogen.sh" from the top-level directory. - Use of Flex =========== diff --git a/autogen.sh b/autogen.sh index d3f7c214ce..6164995f86 100755 --- a/autogen.sh +++ b/autogen.sh @@ -59,9 +59,9 @@ if test ! -z "$AUTOMAKE"; then ompi_automake_search="$AUTOMAKE" fi -ompi_automake_version="1.9.6" -ompi_autoconf_version="2.59" -ompi_libtool_version="1.5.22" +ompi_automake_version="1.11.1" +ompi_autoconf_version="2.65" +ompi_libtool_version="2.2.6b" ############################################################################## @@ -442,89 +442,11 @@ EOF echo "** Adjusting libltdl for OMPI :-(" - echo " ++ patching for argz bugfix in libtool 1.5" - cd opal/libltdl - if test "`grep 'while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR))' ltdl.c`" != ""; then - patch -N -p0 <= *pargz) && (before[-1] != LT_EOS_CHAR)) -+ while ((before > *pargz) && (before[-1] != LT_EOS_CHAR)) - --before; - - { -EOF -#' - rm -f ltdl.c.orig - rm -f ltdl.c.rej - else - echo " -- your libtool doesn't need this! yay!" - fi - cd ../.. - echo " ++ patching 64-bit OS X bug in ltmain.sh" - if test ! -z "`grep otool config/ltmain.sh`" -a \ - -z "`grep otool64 config/ltmain.sh`"; then - patch -N -p0 < config/ltmain_otool.diff - rm -f config/ltmain.sh.orig - rm -f config/ltmain.sh.rej - 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 - rm -f opal/libltdl/loaders/dlopen.c.rej - else - echo " -- your libltdl doesn't need this! yay!" - fi - if grep 'chmod -w \.' configure ; then - echo " ++ patching configure for broken -c/-o compiler test" - sed -e 's/chmod -w \./#OMPI\/MPI FIX: chmod -w ./' \ - configure > configure.new - mv configure.new configure - chmod a+x configure - fi echo " ++ preopen error masking ib libltdl" if test -r opal/libltdl/loaders/preopen.c; then patch -N -p0 < config/libltdl-preopen-error.diff rm -f opal/libltdl/loaders/preopen.c.rej fi - - # See - # http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00045.html. - # Note that this issue was fixed in LT 2.2.6, so don't patch if - # you have a version after that (because this patch changes - # the timestamp on opal/libltdl/m4/libtool.m4, which should be - # avoided if possible...). - echo " ++ patching for ifort (LT 2.2.0-4)" - patched=0 - if check_version "2.1.9999" $ompi_libtoolize_found_version; then - if ! check_version "2.2.6" $ompi_libtoolize_found_version; then - cd opal/libltdl/m4 - patch -N -p0 < ../../../config/lt224-icc.diff > /dev/null 2>&1 - rm -f libtool.m4.orig - rm -f libtool.m4.rej - - # We must touch aclocal.m4 here, because it must be - # newer than libtool.m4, otherwise a whole bunch of - # Automake-mandated timestamps may be off (depending - # on the resolution of timestamps on your - # filesystem). - touch -r ../aclocal.m4 libtool.m4 - - cd ../../.. - patched=1 - fi - fi - if test "$patched" != "1"; then - echo " -- your libltdl doesn't need this! yay!" - fi else run_and_check $ompi_libtoolize --automake --copy fi @@ -547,72 +469,6 @@ EOF run_and_check $ompi_autoheader fi - # We only need to patch the top-level aclocal.m4 for libtool stuff - # because this only affects creating C++ libraries (with pathCC). - # This must be done before we run autoconf. - - if test -f $topdir_file; then - echo "** Adjusting libtool for OMPI :-(" - if ! check_version "2.0.0" $ompi_libtoolize_found_version ; then - echo " ++ patching for pathscale multi-line output (LT 1.5.x)" - patch -N -p0 < config/lt1522-pathCC.diff > /dev/null 2>&1 - else - echo " ++ patching for pathscale multi-line output (LT 2.x)" - patch -N -p0 < config/lt21a-pathCC.diff > /dev/null 2>&1 - fi - rm -f aclocal.m4.orig - rm -f aclocal.m4.rej - - # See note above about lt224-icc.diff - echo " ++ patching for ifort (LT 2.2.0-4)" - patched=0 - if check_version "2.1.9999" $ompi_libtoolize_found_version; then - if ! check_version "2.2.6" $ompi_libtoolize_found_version; then - cd config - patch -N -p0 < lt224-icc.diff > /dev/null 2>&1 - rm -f libtool.m4.orig - rm -f libtool.m4.rej - # We'll touch aclocal.m4 below (see comment below). - cd .. - patched=1 - fi - fi - if test "$patched" != "1"; then - echo " -- your libltdl doesn't need this! yay!" - fi - - # Libtool 1.5.2x and 2.1x automatically link in the "Cstd" STL library - # when using the Sun compilers on Linux or Solaris, even if the - # application does not use the STL (as of Feb 2008, Open MPI does not - # use any C++ STL). The problem is that Solaris has two different STL - # libraries: Cstd and stlport. Having Libtool choose that OMPI (and its - # wrapper compilers) use Cstd is problematic for users who want to - # compile their MPI applications with the other STL library. So we - # currently hack aclocal's LT macros to *not* add the Cstd library to - # any of OMPI's CXXFLAGS; the OMPI wrapper compilers can then therefore - # be used with any STL library -- it's the user's choice. - - echo " ++ patching to remove solaris Cstd" - sed -e 's/-lCstd -lCrun//' \ - -e 's/-library=Cstd -library=Crun//' \ - aclocal.m4 > aclocal.m4.new - cp aclocal.m4.new aclocal.m4 - rm -f aclocal.m4.new - - # This patch fixes a bug in Libtool's detection of the Sun Studio - # Fortran compiler. See the below e-mail thread for more details: - # http://www.open-mpi.org/community/lists/devel/2008/11/4920.php - echo " ++ patching for Sun Studio Fortran compilers" - patch -N -p0 < config/lt-sun-fortran.diff > /dev/null 2>&1 - rm -f libtool.m4.orig - rm -f libtool.m4.rej - # We must touch aclocal.m4 here, because it must be newer than - # libtool.m4, otherwise a whole bunch of Automake-mandated - # timestamps may be off (depending on the resolution of - # timestamps on your filesystem). - touch -r aclocal.m4 config/libtool.m4 - fi - run_and_check $ompi_autoconf run_and_check $ompi_automake --foreign -a --copy --include-deps diff --git a/config/libltdl_dlopen_global.diff b/config/libltdl_dlopen_global.diff deleted file mode 100644 index 16d72ae23c..0000000000 --- a/config/libltdl_dlopen_global.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- 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) - { diff --git a/config/lt-sun-fortran.diff b/config/lt-sun-fortran.diff deleted file mode 100644 index 9faba10dc2..0000000000 --- a/config/lt-sun-fortran.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- config/libtool.m4.orig -+++ config/libtool.m4 -@@ -3947,17 +3947,17 @@ m4_if([$1], [CXX], [ - ;; - *) - case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C 5.9 -+ *Sun\ F* | *Sun*Fortran*) -+ # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; -- *Sun\ F*) -- # Sun Fortran 8.3 passes all unrecognized flags to the linker -+ *Sun\ C*) -+ # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='' -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; diff --git a/config/lt1522-pathCC.diff b/config/lt1522-pathCC.diff deleted file mode 100644 index b28e2295fe..0000000000 --- a/config/lt1522-pathCC.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- aclocal.m4.old 2007-04-20 14:54:50.000000000 -0700 -+++ aclocal.m4 2007-04-20 13:03:19.000000000 -0700 -@@ -2855,7 +2855,7 @@ - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L" | tail -n 1' - - else - GXX=no diff --git a/config/lt21a-pathCC.diff b/config/lt21a-pathCC.diff deleted file mode 100644 index daa6db1dd2..0000000000 --- a/config/lt21a-pathCC.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- aclocal.m4.old 2007-04-20 15:18:48.000000000 -0700 -+++ aclocal.m4 2007-04-20 15:18:59.000000000 -0700 -@@ -5311,7 +5311,7 @@ - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L" | tail -n 1' - - else - GXX=no diff --git a/config/lt224-icc.diff b/config/lt224-icc.diff deleted file mode 100644 index 88dcf9f6fc..0000000000 --- a/config/lt224-icc.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- /users/jsquyres/svn/ompi2/config/libtool.m4 2008-05-21 07:48:07.000000000 -0700 -+++ libtool.m4 2008-05-25 05:12:37.000000000 -0700 -@@ -3962,12 +3962,17 @@ - - linux* | k*bsd*-gnu) - case $cc_basename in -- icc* | ecc* | ifort*) -+ icc* | ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; -+ ifort*) -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) diff --git a/config/ltmain_otool.diff b/config/ltmain_otool.diff deleted file mode 100644 index 8ab8a4193e..0000000000 --- a/config/ltmain_otool.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- config/ltmain.sh.old 2007-01-22 11:34:19.000000000 -0500 -+++ config/ltmain.sh 2007-01-22 11:34:43.000000000 -0500 -@@ -4428,6 +4428,10 @@ - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` - darwin_install_name=`$ECHO $darwin_install_name` -+ if test -z "$darwin_install_name"; then -+ darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` -+ darwin_install_name=`$ECHO $darwin_install_name` -+ fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path=