From 0333b1ff03c9d2ed47604f48af1943a086ef307b Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 15 Oct 2015 23:14:57 -0500 Subject: [svn-r28096] Updated packaging scripts and moved them from bin to bin/pkgscrpts. Added shared library version numbers for each wrapper library file. Tested with h5committest.new. --- MANIFEST | 24 +- bin/build_and_package_hdf5_binaries.sh | 180 ------ bin/h5vers | 46 +- bin/make1814TarFiles.pl | 350 ----------- bin/makeInternal1814README.pl | 190 ------ bin/makeOuter1814README.pl | 173 ------ bin/pkgscrpts/build_and_package_hdf5_binaries.sh | 180 ++++++ bin/pkgscrpts/h5rmflags | 169 ++++++ bin/pkgscrpts/make1816TarFiles.pl | 321 +++++++++++ bin/pkgscrpts/makeInternal1816README.pl | 194 +++++++ bin/pkgscrpts/makeOuter1816README.pl | 169 ++++++ bin/pkgscrpts/testbinaries.sh | 706 +++++++++++++++++++++++ bin/testh51814binary.sh | 688 ---------------------- c++/src/Makefile.am | 2 +- c++/src/Makefile.in | 20 +- config/lt_vers.am | 28 +- configure | 2 +- fortran/src/Makefile.am | 2 +- fortran/src/Makefile.in | 20 +- hl/c++/src/Makefile.am | 2 +- hl/c++/src/Makefile.in | 20 +- hl/fortran/src/Makefile.am | 2 +- hl/fortran/src/Makefile.in | 20 +- hl/src/H5LTparse.c | 144 ++--- hl/src/H5LTparse.h | 4 +- hl/src/Makefile.am | 2 +- hl/src/Makefile.in | 20 +- src/Makefile.in | 18 + 28 files changed, 1996 insertions(+), 1700 deletions(-) delete mode 100644 bin/build_and_package_hdf5_binaries.sh delete mode 100755 bin/make1814TarFiles.pl delete mode 100755 bin/makeInternal1814README.pl delete mode 100755 bin/makeOuter1814README.pl create mode 100644 bin/pkgscrpts/build_and_package_hdf5_binaries.sh create mode 100755 bin/pkgscrpts/h5rmflags create mode 100755 bin/pkgscrpts/make1816TarFiles.pl create mode 100755 bin/pkgscrpts/makeInternal1816README.pl create mode 100755 bin/pkgscrpts/makeOuter1816README.pl create mode 100644 bin/pkgscrpts/testbinaries.sh delete mode 100644 bin/testh51814binary.sh diff --git a/MANIFEST b/MANIFEST index 4cf4991..214b454 100644 --- a/MANIFEST +++ b/MANIFEST @@ -44,7 +44,7 @@ ./bin/COPYING ./bin/bbrelease _DO_NOT_DISTRIBUTE_ ./bin/buildhdf5 -./bin/build_and_package_hdf5_binaries.sh _DO_NOT_DISTRIBUTE_ +./bin/pkgscrpts/build_and_package_hdf5_binaries.sh _DO_NOT_DISTRIBUTE_ ./bin/checkapi _DO_NOT_DISTRIBUTE_ ./bin/checkposix _DO_NOT_DISTRIBUTE_ ./bin/chkconfigure _DO_NOT_DISTRIBUTE_ @@ -54,14 +54,14 @@ ./bin/compile ./bin/config.guess ./bin/config.sub -./bin/debug-ohdr _DO_NOT_DISTRIBUTE_ +./bin/debug-ohdr _DO_NOT_DISTRIBUTE_ ./bin/dependencies ./bin/depcomp ./bin/deploy ./bin/distdep -./bin/errors _DO_NOT_DISTRIBUTE_ +./bin/errors _DO_NOT_DISTRIBUTE_ ./bin/gcov_script _DO_NOT_DISTRIBUTE_ -./bin/genltanalyze _DO_NOT_DISTRIBUTE_ +./bin/genltanalyze _DO_NOT_DISTRIBUTE_ ./bin/h5vers ./bin/install-sh ./bin/iostats @@ -71,22 +71,22 @@ ./bin/make_overflow ./bin/make_vers ./bin/makehelp -./bin/make1814TarFiles.pl _DO_NOT_DISTRIBUTE_ -./bin/makeInternal1814README.pl _DO_NOT_DISTRIBUTE_ -./bin/makeOuter1814README.pl _DO_NOT_DISTRIBUTE_ +./bin/pkgscrpts/make1814TarFiles.pl _DO_NOT_DISTRIBUTE_ +./bin/pkgscrpts/makeInternal1814README.pl _DO_NOT_DISTRIBUTE_ +./bin/pkgscrpts/makeOuter1814README.pl _DO_NOT_DISTRIBUTE_ ./bin/missing ./bin/mkdirs ./bin/mkinstalldirs ./bin/newer -./bin/reconfigure _DO_NOT_DISTRIBUTE_ +./bin/reconfigure _DO_NOT_DISTRIBUTE_ ./bin/output_filter.sh ./bin/release -./bin/runtest _DO_NOT_DISTRIBUTE_ +./bin/runtest _DO_NOT_DISTRIBUTE_ ./bin/snapshot -./bin/snapshot_version _DO_NOT_DISTRIBUTE_ +./bin/snapshot_version _DO_NOT_DISTRIBUTE_ ./bin/test-driver -./bin/testh51814binary.sh _DO_NOT_DISTRIBUTE_ -./bin/timekeeper _DO_NOT_DISTRIBUTE_ +./bin/pkgscrpts/testh51814binary.sh _DO_NOT_DISTRIBUTE_ +./bin/timekeeper _DO_NOT_DISTRIBUTE_ ./bin/trace ./bin/yodconfigure diff --git a/bin/build_and_package_hdf5_binaries.sh b/bin/build_and_package_hdf5_binaries.sh deleted file mode 100644 index b6f67b5..0000000 --- a/bin/build_and_package_hdf5_binaries.sh +++ /dev/null @@ -1,180 +0,0 @@ -#! /bin/sh -# (Use -e to abort at any unexpected error.) -# Submit daily tests of HDF5 base software -# Usauge: DailyHDFTests [-r] -# Example: DailyHDFTests # test the CVS current version -# DailyHDFTests -r1.2 # test version 1.2 -# DailyHDFTests -r1.4 # test version 1.4 - -# This script assumes we are building binaries for a release in -# a directory named $HOME/snapshots-bin-${sw}${SWVERSTR}, i.e. -# /home/hdftest/snapshots-bin-hdf5_1_8_14 for the HDF5 v1.8.14 release. - -# This script should be run from the $HOME/snapshots-bin-${sw}${SWVERSTR} -# directory with the command -# "sh current/bin/build_and_package_hdf5_binaries.sh -r -b" - -# general setup -PROGRAMNAME=`basename $0` -DEBUGMODE="" # change to -debug for debug mode - -# Setup -HOSTNAME=`hostname | cut -f1 -d.` # no domain part -TODAY=`date +%m%d%a` -SW=HDF5 # Name of Software. -sw=hdf5 # Name of Software in lower cases. -SWVER= # Software version, default to current CVS version. -SWVERSTR= # Software version string. -TITLE="${SW} Tests on $TODAY" -errcode=0 # error code so far - -# Parse command options -while [ $# -gt 0 ]; do - case "$1" in - -r*) - SWVER="$1" - SWVERSTR=_`echo $SWVER | sed -e s/-r// -e s/\\\./_/g` - ;; - -debug*) - DEBUGMODE="$1" - ;; - -b*) - BINARYDIR=`echo $1 | sed -e s/-b//` - ;; - *) - echo "Unknown option ($1)" - exit 1 - ;; - esac - shift -done - -# Mail addresses for reports -# TOWHOM_PASSED--normal report -# TOWHOM_FAILED--Failure Report -# If in debug mode, email output to myself; else to the "group". -if [ -n "$DEBUGMODE" ]; then - echo "******** DEBUGMODE is $DEBUGMODE ************" -# TOWHOM_PASSED=hdftest -# TOWHOM_FAILED=hdftest - TOWHOM_PASSED=lrknox - TOWHOM_FAILED=lrknox -else -# TOWHOM_PASSED="hdf5repo@lists.hdfgroup.org repo-all@lists.hdfgroup.org" -# TOWHOM_FAILED=hdf5lib@lists.hdfgroup.org -# TOWHOM_PASSED=hdftest -# TOWHOM_FAILED=hdftest - TOWHOM_PASSED=lrknox - TOWHOM_FAILED=lrknox -fi - -# Setup test directories -LOGDIR=$HOME/snapshots-bin-${sw}${SWVERSTR}/log -LOGDIRLOCK=${LOGDIR}/.lock-${HOSTNAME} -LOGFILE=${LOGDIR}/${PROGRAMNAME}-${HOSTNAME}_${TODAY} -FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY} -FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY} -INCOMPLETELOG=${LOGDIR}/INCOMPLETE_LOG_${TODAY} -PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY} -SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY} -TIMELOG=${LOGDIR}/TIME_LOG_${TODAY} -TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY} -REPORTED=${LOGDIR}/REPORTED_${TODAY} -REPOLOG=${LOGDIR}/REPO_LOG_${TODAY} -REPOLOG_LOCK=${LOGDIR}/REPO_LOG_LOCK_${TODAY} -SNAPSHOTLOG=${LOGDIR}/SNAPSHOT_LOG_${TODAY} -RELEASE_ASAP=${LOGDIR}/../release_asap # make a special release asap -RELEASE_ALWAYS=${LOGDIR}/../release_always # always release -RELEASE_NOT=${LOGDIR}/../release_not # Do not release -RELEASED=${LOGDIR}/RELEASED_${TODAY} -WATCHERFILE=${LOGDIR}/../watchers # List of platform watchers -CMD="bin/runtest $DEBUGMODE ${SWVER}" - -# Setup Mailing command and Report title -MAIL=mail -TEST_TITLE="$HOSTNAME ${SW}${SWVERSTR}_Daily_Tests_${TODAY}" - -# set up auto-cleanup -trap "rm -f $LOGDIRLOCK" 0 -trap "rm -f $LOGDIRLOCK" 1 2 3 4 5 6 7 8 9 10 12 13 14 15 - -# Clean up LOGDIR by moving all files that are not "of today" to OLD. -# Then go into OLD and move all files older than 7 days to OLDER. -# Then go into OLDer and remove all files older than 30 days. -# This procedure keeps old logfiles in two tiers. The first tier is OLD -# which should be in AFS space so that the files are available to most hosts. -# The second tier is OLDER which could be in HDF's own NFS space which has -# much bigger capacity but not as widely available. -# Do all these in a sub-shell with -e to abort the cleaning if any error is -# encountered. -(set -e -nold=6 -nolder=31 -echo cleaning $LOGDIR by moving all old logfiles to OLD -cd $LOGDIR -test -d OLD/. || mkdir OLD -#find . \( -name OLD -prune \) \ -# -o -type f ! -name '*'$TODAY'*' -exec mv '{}' OLD/. \; - -echo cleaning $LOGDIR/OLD by moving all files older than $nold days to OLDER -cd OLD -test -d OLDER/. || mkdir OLDER -find . \( -name OLDER -prune \) \ - -o -type f -mtime +$nold -exec mv '{}' OLDER/. \; - -echo cleaning $LOGDIR/OLDER by removing all files older than $nolder days. -cd OLDER -find . -type f -mtime +$nolder -exec rm -f '{}' \; - -if [ -f $LOGFILE ]; then - if [ -n "$DEBUGMODE" ]; then - echo "$LOGFILE exists. No more daily tests today" - fi - exit 1 -fi -) - -#(cd $HOME/snapshots-bin-${sw}${SWVERSTR}; touch $REPOLOG; $CMD -nodiff -norepo -all) > $LOGFILE 2>&1 - -# Verify test script did complete by checking the last lines -#(tail -4 $LOGFILE | grep -s "^*** finished .* in $HOSTNAME ***" > /dev/null 2>&1) || -# (echo "****snaptest launcher FAILED to complete in $HOSTNAME****" >> $FAILEDLOG) - -#CURRENT_DIR=`pwd` -#cd $HOME/snapshots-bin-${sw}${SWVERSTR}/current -#pwd -#SVN_URL=`svn info | grep URL` -#BRANCHNAME=`echo $SVN_URL | sed -e 's/URL:.*\///' | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -#REVISION=`svn info | grep Revision` -#LAST_INFO=`svn info | grep "Last Changed"` -#TEST_TITLE="$HOSTNAME ${BRANCHNAME}${SWVERSTR}_Daily_Tests_${TODAY}" -#TITLE="${BRANCHNAME} Tests on $TODAY" -#cd $CURRENT_DIR - -# Check result -if [ -f $FAILEDLOG ]; then - errcode=1 -elif [ -f $INCOMPLETELOG ]; then - errcode=1 - echo "Not all builds were completed!" -fi - -if [ $errcode -eq 0 ]; then - DEPLOYDIR=`grep "deploydir \/mnt" ./snaptest.cfg | sed "s/^.*deploydir //"` - echo "Make binary tar files from deployed files in $DEPLOYDIR in $BINARYDIR" - CURRENT_DIR=`pwd` - cd current/bin;perl ./make1814TarFiles.pl $DEPLOYDIR $BINARYDIR - cd $CURRENT_DIR -else - echo "errcode was $errcode; no tar files were created." -fi - -# remove lock -rm -f $LOGDIRLOCK - -# test binaries on 3 linux binary test machines. - - -# final exit -exit $errcode - diff --git a/bin/h5vers b/bin/h5vers index 2fe9105..169f89b 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -243,6 +243,14 @@ if ($set) { @newver = @curver; } +# Note if the new version is for an official release. +# if the fourth version field is empty or contains "patch", +# "currently under development" shouldn't be printed as +# part of the version string. +my $is_official_release=""; +if ($newver[3] eq "" || $newver[3] =~ /patch\d/) { + $is_official_release="true"; +} # Note if the version increased or decreased my $version_increased=""; # Print a warning if the version got smaller (don't check annot field) @@ -276,25 +284,29 @@ if ($LT_VERS && $version_increased) { close FILE; local($_) = $contentsy; - - my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m; - my $new_lt_revision = $lt_revision+1; - ($contentsy) =~ s/^(LT_VERS_REVISION\s*=\s*)\d+/$1$new_lt_revision/m; - - open FILE, ">$LT_VERS" or die "$LT_VERS: $!\n"; - print FILE $contentsy; - close FILE; + + # As of the HDF5 v1.8.16 release, h5vers should not increment + # the LT_VERS numbers, so the next 6 lines are commented out. + # A future version may copy the numbers to H5public.h, so this + # section is retained for future reference. + #my ($lt_revision) = /^LT_VERS_REVISION\s*=\s*(\d+)/m; + #my $new_lt_revision = $lt_revision+1; + #($contentsy) =~ s/^(LT_VERS_REVISION\s*=\s*)\d+/$1$new_lt_revision/m; + + #open FILE, ">$LT_VERS" or die "$LT_VERS: $!\n"; + #print FILE $contentsy; + #close FILE; } + # Update the README.txt file if ($README) { open FILE, $README or die "$README: $!\n"; my @contents = ; close FILE; - $contents[0] = sprintf("HDF5 version %d.%d.%d%s %s", + $contents[0] = sprintf("HDF5 version %d.%d.%d%s\n", @newver[0,1,2], - $newver[3] eq "" ? "" : "-".$newver[3], - "currently under development\n"); + $is_official_release ? $newver[3] eq "" ? "" : "-".$newver[3] : "-".$newver[3]." currently under development"); open FILE, ">$README" or die "$README: $!\n"; print FILE @contents; close FILE; @@ -305,10 +317,9 @@ if ($RELEASE) { open FILE, $RELEASE or die "$RELEASE: $!\n"; my @contents = ; close FILE; - $contents[0] = sprintf("HDF5 version %d.%d.%d%s %s", + $contents[0] = sprintf("HDF5 version %d.%d.%d%s\n", @newver[0,1,2], - $newver[3] eq "" ? "" : "-".$newver[3], - "currently under development\n"); + $is_official_release ? $newver[3] eq "" ? "" : "-".$newver[3] : "-".$newver[3]." currently under development"); open FILE, ">$RELEASE" or die "$RELEASE: $!\n"; print FILE @contents; close FILE; @@ -317,10 +328,9 @@ if ($RELEASE) { # Update the c++/src/cpp_doc_config file if ($CPP_DOC_CONFIG) { my $data = read_file($CPP_DOC_CONFIG); - my $version_string = sprintf("\"%d.%d.%d%s %s\"", - @newver[0,1,2], - $newver[3] eq "" ? "" : "-".$newver[3], - "currently under development"); + my $version_string = sprintf("\"%d.%d.%d%s\"", + @newver[0,1,2], + $is_official_release ? $newver[3] eq "" ? "" : "-".$newver[3] : "-".$newver[3]." currently under development"); $data =~ s/PROJECT_NUMBER\s*=.*/PROJECT_NUMBER = $version_string/; diff --git a/bin/make1814TarFiles.pl b/bin/make1814TarFiles.pl deleted file mode 100755 index 9ff3b91..0000000 --- a/bin/make1814TarFiles.pl +++ /dev/null @@ -1,350 +0,0 @@ -#!/usr/bin/perl - -# makeTarFiles.pl -use warnings; -use strict; -use Cwd; - - - -my %destsubdir = ('duck' => 'mac-lion-x86_64', - 'emu' => 'solaris', - 'emu64' => 'solaris64', - 'freedom' => 'freebsd-amd64', - 'jam' => 'linux', - 'jamgnu482' => 'linux-gnu482', - 'koala' => 'linux-x86_64', - 'koalagnu482' => 'linux-x86_64-gnu482', - 'loyalty' => 'freebsd', - 'ostrich' => 'linux-ppc64', - 'ostrichxl' => 'linux-ppc64xl', - 'platypus' => 'linux-centos6-x86_64', - 'hdf-duck' => 'mac-lion-x86_64', - 'kite' => 'mac-mountainlion-x86_64', - 'quail' => 'mac-mavericks-x86_64'); -#my %destsubdir = ('jam' => 'linux', -# 'jamgnu481' => 'linux-gnu481', -# 'koalagnu481' => 'linux-x86_64-gnu481', -# 'koala' => 'linux-x86_64'); - - -my %szipdir = ('duck' => '/mnt/hdf/packages/szip/shared/encoder/macOS-10.8', - 'duck-static' => '/mnt/hdf/packages/szip/static/encoder/mac-intel-x86_64', - 'emu' => '/mnt/hdf/packages/szip/shared/encoder/SunOS-5.10', - 'emu-static' => '/mnt/hdf/packages/szip/static/encoder/SunOS-5.10', - 'emu64' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64', - 'emu64-static' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64', - 'freedom' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD-64', - 'freedom-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD-64', - 'hdf-duck' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8', - 'hdf-duck-static' => '/mnt/hdf/packages/szip/static/encoder/mac-intel-x86_64', - 'jam' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc', - 'jamgnu482' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc', - 'jam-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc', - 'jamgnu482-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc', - 'kite' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8', - 'kite-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8', - 'koala' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', - 'koalagnu482' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', - 'koala-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', - 'koalagnu482-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', - 'jam-new' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc', - 'jam-new-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc', - 'koala-new' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', - 'koala-new-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', - 'loyalty' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD', - 'loyalty-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD', - 'ostrich32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc', - 'ostrich32-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc-32', - 'ostrich' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64', - 'ostrich-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc', - 'ostrichxl' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64', - 'ostrichxl-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc', - 'platypus' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', - 'platypus-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', - 'quail' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8', - 'quail-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8'); - -my %zlibdir = ('duck' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', - 'duck-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', - 'emu' => '/mnt/hdf/packages/zlib-125/shared/SunOS-5.10', - 'emu-static' => '/mnt/hdf/packages/zlib-125/static/SunOS-5.10', - 'emu64' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64', - 'emu64-static' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64', - 'fred' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', - 'fred-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', - 'freedom' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD-64', - 'freedom-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD-64', - 'hdf-duck' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', - 'hdf-duck-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', - 'jam' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc', - 'jamgnu482' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc', - 'jam-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc', - 'jamgnu482-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc', - 'kite' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', - 'kite-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', - 'koala' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', - 'koalagnu482' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', - 'koala-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', - 'koalagnu482-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', - 'jam-new' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc', - 'jam-new-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc', - 'koala-new' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', - 'koala-new-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', - 'loyalty' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD', - 'loyalty-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD', - 'ostrich32' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc', - 'ostrich32-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc', - 'ostrich' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', - 'ostrich-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', - 'ostrichxl' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', - 'ostrichxl-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', - 'platypus' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', - 'platypus-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', - 'quail' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', - 'quail-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64'); - -my $indirectory = "."; -$indirectory = shift; - -my $outdirectory = "."; -$outdirectory = shift; - -my $key = "."; -#$key = shift; - -unless (-d $outdirectory) { - print "$outdirectory not found. Create it or choose another one and try again.\n"; - exit 1; -} - -print "Subdirectories of $indirectory will be tarred and stored in $outdirectory.\n"; - - -my $tarfilename; -my $tardirname; -my $output; -my $cmd; - -# I'm currently copying system zlibs for at least solaris and FreeBSD machines. Since this script runs on jam it may require scp to get the libs. - -#For future reference -# command for getting szlib files and links for shared binaries: -# tar cvf - -C /lib . | tar xvf - -C . -# libz.so.1.2.3 and the static files should just be copied because they're in directories -# with other files. Then create the libz.so.1 and libz.so symbolic links. -sub addzandszlibs { - my $dir = shift; - my $indirectory = shift; - my $currentdir = getcwd(); - - if (-d "$indirectory/$dir" ) { - my $szdir = $szipdir{$dir}; - my $zldir = $zlibdir{$dir}; - if ($dir =~ /static/ || $dir =~ /ostrich/) { - $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - } elsif ($dir eq "freedom" || $dir eq "loyalty") { - $cmd = "cp $szdir/lib/libsz.so.2 $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - $cmd = "cp $zldir/lib/libz.so.5 $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - - chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; - $cmd = "ln -s libsz.so.2 libsz.so"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libz.so.5 libz.so"; - $output = `$cmd`; - print $output; - - chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; - } elsif ($dir eq "duck" || $dir eq "quail" || $dir eq "kite") { - #we've been using the static libraries for the macs - built with -fPIC -# $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib"; -# $output = `$cmd`; -# print $output; -# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; -# $output = `$cmd`; -# print $output; - $cmd = "cp $szdir/lib/libsz.so.2.0.0.dylib $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - $cmd = "cp $zldir/lib/libz.1.2.5.dylib $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - - chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; - $cmd = "ln -s libsz.so.2.0.0.dylib libsz.2.dylib"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libsz.so.2.0.0.dylib libsz.cylib"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libz.1.2.5.dylib libz.1.dylib"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libz.1.2.5.dylib libz.dylib"; - $output = `$cmd`; - print $output; - - chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; - - } elsif ($dir eq "emu64") { - $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - - chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; - $cmd = "ln -s libsz.so.2.0.0 libsz.so.2"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libsz.so.2.0.0 libsz.so"; - $output = `$cmd`; - print $output; - - chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; - - } else { - $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - $cmd = "cp $zldir/lib/libz.so.1.2.5 $indirectory/$dir/lib"; - $output = `$cmd`; - print $output; - - chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; - $cmd = "ln -s libsz.so.2.0.0 libsz.so.2"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libsz.so.2.0.0 libsz.so"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libz.so.1.2.5 libz.so.1"; - $output = `$cmd`; - print $output; - - $cmd = "ln -s libz.so.1.2.5 libz.so"; - $output = `$cmd`; - print $output; - - chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; - } - } -} - -sub makeTarFile { - my $directoryname = shift; - my $origdirname = shift; - my $tarfilename = shift; - my $tardirname = shift; - $cmd = "mv $indirectory/$origdirname $indirectory/$tardirname"; - $output = `$cmd`; - print $output; - if (-d $indirectory."/".$tardirname."/doc/hdf5/examples") { - $cmd = "mv $indirectory/$tardirname/doc/hdf5/examples $indirectory/$tardirname/examples"; - $output = `$cmd`; - print $output; - $cmd = "rm -rf $indirectory/$tardirname/doc"; - $output = `$cmd`; - print $output; - } - $cmd = "tar zcvf $outdirectory/$directoryname/$tarfilename -C $indirectory $tardirname"; - print "Need to run $cmd.\n"; - $output = `$cmd`; - sleep 10; - print "Create $tarfilename: $output\n"; - $cmd = "mv $indirectory/$tardirname $indirectory/$origdirname"; - $output = `$cmd`; - print $output; -} - -foreach $key (keys %destsubdir) { - print "Process ".$key."\n\n"; - #skip unless there's a directory by the name of $key or $key-static - next unless -d $indirectory.'/'.$key || -d $indirectory.'/'.$key."-static"; - my $version; - # This assumes a static directory. Probably the others should be checked if this - # doesn't exist. - $cmd = "grep \"HDF5 Version\" $indirectory/$key/lib/libhdf5.settings"; - $_ = `$cmd`; - #print OUTFILE $_, "\n"; - s/HDF5 Version://; - s/^\s+//; - chomp; - $version = $_; - #my $directoryname = substr $destsubdir{$key}, 0, rindex($destsubdir{$key}, '-'); - my $directoryname = $destsubdir{$key}; - mkdir $outdirectory."/".$directoryname, 0755 unless -d $outdirectory."/".$directoryname; - my $staticdir = $key."-static"; - print $indirectory."/$key tarfile will be put in " . $outdirectory."/".$directoryname."\n"; - if (-e $outdirectory."/".$destsubdir{$key}."/README") { - print $outdirectory."/".$destsubdir{$key}."/README" . " has already been created.\n"; - } - else { - print "Make the Outer README file: "; - $cmd = "perl ./makeOuter1814README.pl $indirectory/$key $outdirectory $directoryname"; - print $cmd, "\n"; - my $output = `$cmd`; - print $output; - } - my $file = ""; - my @dirnames = ""; - opendir(DIR, $indirectory) or die "can't open .: $!"; - while (defined($file = readdir(DIR))) { - next unless ($file eq $key || $file eq "$key-static") && -d $indirectory."/".$file; - push @dirnames, $file; - } - foreach my $dir (@dirnames) { - next if $dir eq ""; - print "Make the Inner README files.\n"; - $cmd = "perl ./makeInternal1814README.pl $indirectory/$dir"; - print $cmd, "\n"; - $output = `$cmd`; - print $output; - print "Add the zlib and szip files for $dir.\n"; - &addzandszlibs($dir, $indirectory); - my $currentdir = getcwd(); - - chdir "$indirectory/$dir/bin" or die "Couldn't change directory to $indirectory/$dir/bin, $!"; - $cmd = "/home/lrknox/hdf/release_scripts/h5rmflags -force"; - $output = `$cmd`; - print $output; - chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; - print "Tar up the files into the output directory.\n"; - if (-d $indirectory."/".$dir) { - if ($dir =~ /static/) { - $tarfilename = "hdf5-$version-$destsubdir{$key}-static.tar.gz"; - $tardirname = "hdf5-$version-$destsubdir{$key}-static"; - } else { - $tarfilename = "hdf5-$version-$destsubdir{$key}-shared.tar.gz"; - $tardirname = "hdf5-$version-$destsubdir{$key}-shared"; - } - &makeTarFile($directoryname, $dir, $tarfilename, $tardirname); - } - } - # If this copy is done after h5rmflags is run on all the directories the compile scripts - # in the utilities directory will already have the paths removed. - if (-d $indirectory."/".$staticdir) { - $cmd = "cp -prv $indirectory/$staticdir/bin $outdirectory/$directoryname/utilities"; - $output = `$cmd`; - print $output; - } -} - diff --git a/bin/makeInternal1814README.pl b/bin/makeInternal1814README.pl deleted file mode 100755 index 624f9cb..0000000 --- a/bin/makeInternal1814README.pl +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/perl -# makeInternalREADME.pl -use warnings; -use strict; - -my $section2="For information on compilers and settings used to build these HDF5 -libraries, please refer to: - - ./lib/libhdf5.settings - -The contents of this directory are: - - COPYING - Copyright notice - README - This file - RELEASE.txt - Detailed information regarding this release - bin/ - Directory containing HDF5 pre-compiled utilities - include/ - Directory containing HDF5 include files - lib/ - Directory containing HDF5 libraries and settings - share/ - Directory containing HDF5 C, C++ and Fortran example - program code and scripts to test compile scripts - h5cc, h5c++ and h5fc - -These binaries were built with the ZLIB and SZIP (version 2.1, Encoder -ENABLED) external libraries which are included in the lib directory for -convenience. - -We also provide the ZLIB and SZIP source code on our ftp server at: - - ftp://ftp.hdfgroup.org/lib-external/ - -The official ZLIB and SZIP pages are at: - - ZLIB: http://www.zlib.net/ - SZIP: http://hdfgroup.org/doc_resource/SZIP/ - -"; - -my $section3 = "If using the shared libraries, you must add the HDF5 library path -to the LD_LIBRARY_PATH variable. -"; - -my $section4 = "We provide scripts for compiling applications with the HDF5 libraries: - - bin/h5cc - for C - bin/h5fc - for F90 (if Fortran 90 is included with the binaries) - bin/h5c++ - for C++ (if C++ is included with the binaries) - -After you have installed the binaries to their final destination, -you can use these scripts (h5cc, h5fc, h5c++) to compile. However, -you must first: - - 1) Run ./h5redeploy in the bin directory to change site specific paths in the scripts. - - 2) Edit each script and update the paths for the external libraries - in LDFLAGS and CPPFLAGS. - -You may also need to change other variables in the scripts, depending -on how things are set up on your system. Here are some of the variables -to check: - - prefix - Path to the HDF5 top level installation directory - CCBASE - Name of the alternative C compiler - CLINKERBASE - Name of the alternative linker - LIBS - Libraries your application will link with - -For further details refer to the INSTALL files in the ./release_docs/ -directory of the HDF5 source code: - - ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/ - -Source code can be found on the THG ftp server in: - - ftp://ftp.hdfgroup.org/HDF5/current/src/ - -Please send questions, comments, and suggestions to: - - http://hdfgroup.org/about/contact.html - - -"; - -my $indirectory = "."; -$indirectory = shift; -my $linktype = "shared"; -if ($indirectory =~ /static/) { - $linktype = "static"; -} - -my $version; - -my $outfile = "$indirectory/README"; -open OUTFILE, ">$outfile" or die "$!Couldn't open $outfile - check permissions for $indirectory\n"; -my $hostname; -my $cmd = "grep \"HDF5 Version\" $indirectory/lib/libhdf5.settings"; -$_ = `$cmd`; -#print OUTFILE $_, "\n"; -s/HDF5 Version://; -s/^\s+//; -chomp; -$version = $_; -#print OUTFILE $_, "\n"; - -my $versionstring= "This directory contains the $linktype binary distribution of HDF5-".$version; - -$cmd = "grep \"Uname information:\" $indirectory/lib/libhdf5.settings"; -$_ = `$cmd`; -s/Uname information://; -s/^\s+//; -#print OUTFILE $_; -chomp; -#s/(^\w+)(\s)(\S+)/$1/; -#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/; -#my $platformstring = "\nthat was compiled on:" . $_ . " "; -my $platformstring = ""; -my $hostnamestring = $_; -my @hostnamestring = split / /, $hostnamestring; -#print OUTFILE "Size of hostnamestring is ", scalar @hostnamestring, "\n"; -#print OUTFILE $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n"; -$hostname = $hostnamestring[1]; -#my $size = scalar @hostnamestring; -if ($hostname =~ /loyalty/) { - $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " "; -} -elsif ($hostname =~ /freedom/) { - $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " "; -} elsif ($hostname =~ /emu/) { - $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-2] . " "; -} elsif ($hostname =~ /fred/) { - $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-1] . " "; -} else { - $_ = $hostnamestring[2]; - my $pos = index $_, '-'; - my $os = substr $_, 0, $pos; - $platformstring = "\nthat was compiled on: " . $hostnamestring[0] . " " . $os . " " . $hostnamestring[-2] . " "; -} - - -my $mappingstring = ""; -#no mappingstring for 1.6. Put it back for 1.8. -#$cmd = "grep \"Default API Mapping:\" $indirectory/lib/libhdf5.settings"; -#$_ = `$cmd`; -#s/Default API Mapping://; -#s/^\s+//; -#chomp; -#if (/v\d+/) { -# s/v//; -# s/(\d)(\d)/$1\.$2/g; -# $mappingstring = "using the default\nAPI mapping for VERSION ".$_."."; -# -#} -print OUTFILE $versionstring; -print OUTFILE $platformstring."\n\n"; -#print OUTFILE $mappingstring; - -#if ($hostname eq "loyalty.hdfgroup.uiuc.edu" || $hostname eq "freedom.hdfgroup.uiuc.edu") { -# print OUTFILE " It includes the C APIs,\nbuilt using the following "; -# print OUTFILE "compilers:\n\n"; -#} -#else { -print OUTFILE "\n\nIt includes the C, C++, and F90 APIs, built using the following\n"; -print OUTFILE "compilers:\n\n"; -#} - -# Only the gcc compiler version is in libhdf5.settings, so for now I looked -# up the versions and hardcoded them here. We will put them in libhdf5.settings -# for the next release. -if ($indirectory =~ /gnu482/) { - print OUTFILE "\tgcc, g++, and gfortran 4.8.2\n\n"; -} elsif ($hostname =~ /jam/ || $hostname =~ /koala/) { - print OUTFILE "\tgcc, g++, and gfortran 4.1.2\n\n"; -} elsif ($hostname =~ /platypus/) { - print OUTFILE "\tgcc, g++, and gfortran 4.4.7\n\n"; -} elsif ($hostname =~ /emu/) { - print OUTFILE "\tSun C and C++ 5.12, Sun Fortran 95 8.6\n\n"; -} elsif ($hostname =~ /loyalty/ || $hostname =~ /freedom/) { - print OUTFILE "\tgcc, g++, and gfortran 4.6.1\n\n"; -} elsif ($hostname =~ /duck/) { - print OUTFILE "\tApple clang/clang++ 3.0 from Xcode 4.6.1 and gfortran 4.8.2\n\n"; -} elsif ($hostname =~ /kite/) { - print OUTFILE "\tApple clang/clang++ 5.1 from Xcode 5.0.2 and gfortran 4.8.2\n\n"; -} elsif ($hostname =~ /quail/) { - print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n"; -} - -print OUTFILE $section2; - -print OUTFILE $section3; - -print OUTFILE $section4; - diff --git a/bin/makeOuter1814README.pl b/bin/makeOuter1814README.pl deleted file mode 100755 index 6218ecc..0000000 --- a/bin/makeOuter1814README.pl +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/perl -# makeOuterREADME.pl -use warnings; -use strict; - -my $indirectory = "."; -$indirectory = shift; - -my $outdirectory = "."; -$outdirectory = shift; - -my $outsubdir = shift; - -my $version; - -my $outfile = "$outdirectory/$outsubdir/README"; -open OUTFILE, ">$outfile"; -my $hostname=""; -my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings"; -$_ = `$cmd`; -#print OUTFILE $_, "\n"; -s/HDF5 Version://; -s/^\s+//; -chomp; -$version = $_; -#print OUTFILE $_, "\n"; -my $versionstring= "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for"; - -$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings"; -$_ = `$cmd`; -s/Uname information://; -s/^\s+//; -chomp; -print "String to work with is $_\n"; -my $platformstring = ""; -my $hostnamestring = $_; -my @hostnamestring = split / /, $hostnamestring; -$platformstring = "$hostnamestring[0] "; -if ($indirectory =~ /jam/ || $indirectory =~ /koala/) { - $hostnamestring = $hostnamestring[2]; - my $pos = index $hostnamestring, "-"; - if ($pos > 0) { - $platformstring .= substr $hostnamestring, 0, $pos; - } else { - $platformstring .= $hostnamestring[2]; - } - $platformstring .= " ".$hostnamestring[-3]; -} elsif ($indirectory =~ /linew/) { - $platformstring .= "$hostnamestring[2] $hostnamestring[-2]"; -} else { - $platformstring .= "$hostnamestring[2] $hostnamestring[-1]"; -} - -print OUTFILE $versionstring." ".$platformstring.":\n\n"; -my $line1; -my $line3; -my $line5; -my $compilerstring=""; - -print $indirectory, "\n"; - -if ($indirectory =~ /loyalty/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n"; - $compilerstring = " gcc, g++, and gfortran 4.6.1)\n"; -} -elsif ($indirectory =~ /freedom/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n"; - $compilerstring = " gcc, g++, and gfortran 4.6.1)\n"; -} -elsif ($indirectory =~ /ostrich/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " gcc, g++, and gfortran 4.4.7)\n"; -} -elsif ($indirectory =~ /platypus/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " gcc, g++, and gfortran 4.4.7)\n"; -} -elsif ($indirectory =~ /jam/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - if ($indirectory =~ /gnu482/) { - $compilerstring = " gcc, g++, and gfortran 4.8.2)\n"; - } else { - $compilerstring = " gcc, g++, and gfortran 4.1.2)\n"; - } -} -elsif ($indirectory =~ /koala/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - if ($indirectory =~ /gnu482/) { - $compilerstring = " gcc, g++, and gfortran 4.8.2)\n"; - } else { - $compilerstring = " gcc, g++, and gfortran 4.1.2)\n"; - } -} -elsif ($indirectory =~ /emu/) { -# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " Sun C and C++ 5.12, Sun Fortran 95 8.6)\n"; -} -elsif ($indirectory =~ /duck/) { - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " Apple clang/clang++ 3.0 from Xcode 4.6.1, - gfortran 4.6.2)\n"; -} -elsif ($indirectory =~ /kite/) { - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " Apple clang/clang++ 5.0 from Xcode 5.0.2, - gfortran 4.8.2)\n"; -} -elsif ($indirectory =~ /quail/) { - $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; - $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; - $compilerstring = " Apple clang/clang++ 5.1 from Xcode 5.1, - gfortran 4.8.2)\n"; -} - - print OUTFILE $line3; - print OUTFILE $compilerstring."\n"; -if ($line5 ne "") { - print OUTFILE $line5; - print OUTFILE $compilerstring."\n"; -} -#elsif ($indirectory =~ /-16API/) { -# print OUTFILE $line1; -# print OUTFILE $compilerstring; -# print OUTFILE " USES THE VERSION 1.6 DEFAULT API\n"; -# print OUTFILE " MAPPING.\n\n"; -#} - -print OUTFILE " utilities/ - Directory containing the compiled HDF5 utilities.\n"; -print OUTFILE " These utilities are STATICALLY linked and will run as is.\n\n"; -#print OUTFILE " The tools can be downloaded separately, or ALL in one\n"; -#print OUTFILE " compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n"; -print OUTFILE "\n"; -print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n"; -print OUTFILE "file:\n\n"; -print OUTFILE " gzip -cd | tar xvf -\n"; - - -#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings"; -#$_ = `$cmd`; -#s/Configured by://; -#s/^\s+//; -#print OUTFILE $_; -#chomp; -#my $hostnamestring = $_; -#s/(^\w+)(\s)(\S+)/$1/; -#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/; -#my $platformstring = $_ . ":\n\n"; -#my @hostnamestring = split /@/, $hostnamestring; -#print "Size of hostnamestring is ", scalar @hostnamestring, "\n"; -#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n"; -#my $platformstring = $hostnamestring[1].":\n\n"; -#$hostnamestring = $hostnamestring[1]; -#my $pos = index $hostnamestring, "."; -#if ($pos > 0) { -# @hostnamestring = split /\./, $hostnamestring; -# $platformstring = $hostnamestring[0].":\n\n"; -#} diff --git a/bin/pkgscrpts/build_and_package_hdf5_binaries.sh b/bin/pkgscrpts/build_and_package_hdf5_binaries.sh new file mode 100644 index 0000000..1f6699b --- /dev/null +++ b/bin/pkgscrpts/build_and_package_hdf5_binaries.sh @@ -0,0 +1,180 @@ +#! /bin/sh +# (Use -e to abort at any unexpected error.) +# Submit daily tests of HDF5 base software +# Usauge: DailyHDFTests [-r] +# Example: DailyHDFTests # test the CVS current version +# DailyHDFTests -r1.2 # test version 1.2 +# DailyHDFTests -r1.4 # test version 1.4 + +# This script assumes we are building binaries for a release in +# a directory named $HOME/snapshots-bin-${sw}${SWVERSTR}, i.e. +# /home/hdftest/snapshots-bin-hdf5_1_8_14 for the HDF5 v1.8.14 release. + +# This script should be run from the $HOME/snapshots-bin-${sw}${SWVERSTR} +# directory with the command +# "sh current/bin/build_and_package_hdf5_binaries.sh -r -b" + +# general setup +PROGRAMNAME=`basename $0` +DEBUGMODE="" # change to -debug for debug mode + +# Setup +HOSTNAME=`hostname | cut -f1 -d.` # no domain part +TODAY=`date +%m%d%a` +SW=HDF5 # Name of Software. +sw=hdf5 # Name of Software in lower cases. +SWVER= # Software version, default to current CVS version. +SWVERSTR= # Software version string. +TITLE="${SW} Tests on $TODAY" +errcode=0 # error code so far + +# Parse command options +while [ $# -gt 0 ]; do + case "$1" in + -r*) + SWVER="$1" + SWVERSTR=_`echo $SWVER | sed -e s/-r// -e s/\\\./_/g` + ;; + -debug*) + DEBUGMODE="$1" + ;; + -b*) + BINARYDIR=`echo $1 | sed -e s/-b//` + ;; + *) + echo "Unknown option ($1)" + exit 1 + ;; + esac + shift +done + +# Mail addresses for reports +# TOWHOM_PASSED--normal report +# TOWHOM_FAILED--Failure Report +# If in debug mode, email output to myself; else to the "group". +if [ -n "$DEBUGMODE" ]; then + echo "******** DEBUGMODE is $DEBUGMODE ************" +# TOWHOM_PASSED=hdftest +# TOWHOM_FAILED=hdftest + TOWHOM_PASSED=lrknox + TOWHOM_FAILED=lrknox +else +# TOWHOM_PASSED="hdf5repo@lists.hdfgroup.org repo-all@lists.hdfgroup.org" +# TOWHOM_FAILED=hdf5lib@lists.hdfgroup.org +# TOWHOM_PASSED=hdftest +# TOWHOM_FAILED=hdftest + TOWHOM_PASSED=lrknox + TOWHOM_FAILED=lrknox +fi + +# Setup test directories +LOGDIR=$HOME/snapshots-bin-${sw}${SWVERSTR}/log +LOGDIRLOCK=${LOGDIR}/.lock-${HOSTNAME} +LOGFILE=${LOGDIR}/${PROGRAMNAME}-${HOSTNAME}_${TODAY} +FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY} +FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY} +INCOMPLETELOG=${LOGDIR}/INCOMPLETE_LOG_${TODAY} +PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY} +SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY} +TIMELOG=${LOGDIR}/TIME_LOG_${TODAY} +TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY} +REPORTED=${LOGDIR}/REPORTED_${TODAY} +REPOLOG=${LOGDIR}/REPO_LOG_${TODAY} +REPOLOG_LOCK=${LOGDIR}/REPO_LOG_LOCK_${TODAY} +SNAPSHOTLOG=${LOGDIR}/SNAPSHOT_LOG_${TODAY} +RELEASE_ASAP=${LOGDIR}/../release_asap # make a special release asap +RELEASE_ALWAYS=${LOGDIR}/../release_always # always release +RELEASE_NOT=${LOGDIR}/../release_not # Do not release +RELEASED=${LOGDIR}/RELEASED_${TODAY} +WATCHERFILE=${LOGDIR}/../watchers # List of platform watchers +CMD="bin/runtest $DEBUGMODE ${SWVER}" + +# Setup Mailing command and Report title +MAIL=mail +TEST_TITLE="$HOSTNAME ${SW}${SWVERSTR}_Daily_Tests_${TODAY}" + +# set up auto-cleanup +trap "rm -f $LOGDIRLOCK" 0 +trap "rm -f $LOGDIRLOCK" 1 2 3 4 5 6 7 8 9 10 12 13 14 15 + +# Clean up LOGDIR by moving all files that are not "of today" to OLD. +# Then go into OLD and move all files older than 7 days to OLDER. +# Then go into OLDer and remove all files older than 30 days. +# This procedure keeps old logfiles in two tiers. The first tier is OLD +# which should be in AFS space so that the files are available to most hosts. +# The second tier is OLDER which could be in HDF's own NFS space which has +# much bigger capacity but not as widely available. +# Do all these in a sub-shell with -e to abort the cleaning if any error is +# encountered. +(set -e +nold=6 +nolder=31 +echo cleaning $LOGDIR by moving all old logfiles to OLD +cd $LOGDIR +test -d OLD/. || mkdir OLD +#find . \( -name OLD -prune \) \ +# -o -type f ! -name '*'$TODAY'*' -exec mv '{}' OLD/. \; + +echo cleaning $LOGDIR/OLD by moving all files older than $nold days to OLDER +cd OLD +test -d OLDER/. || mkdir OLDER +find . \( -name OLDER -prune \) \ + -o -type f -mtime +$nold -exec mv '{}' OLDER/. \; + +echo cleaning $LOGDIR/OLDER by removing all files older than $nolder days. +cd OLDER +find . -type f -mtime +$nolder -exec rm -f '{}' \; + +if [ -f $LOGFILE ]; then + if [ -n "$DEBUGMODE" ]; then + echo "$LOGFILE exists. No more daily tests today" + fi + exit 1 +fi +) + +(cd $HOME/snapshots-bin-${sw}${SWVERSTR}; touch $REPOLOG; $CMD -nodiff -norepo -all) > $LOGFILE 2>&1 + +# Verify test script did complete by checking the last lines +#(tail -4 $LOGFILE | grep -s "^*** finished .* in $HOSTNAME ***" > /dev/null 2>&1) || +# (echo "****snaptest launcher FAILED to complete in $HOSTNAME****" >> $FAILEDLOG) + +#CURRENT_DIR=`pwd` +#cd $HOME/snapshots-bin-${sw}${SWVERSTR}/current +#pwd +#SVN_URL=`svn info | grep URL` +#BRANCHNAME=`echo $SVN_URL | sed -e 's/URL:.*\///' | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +#REVISION=`svn info | grep Revision` +#LAST_INFO=`svn info | grep "Last Changed"` +#TEST_TITLE="$HOSTNAME ${BRANCHNAME}${SWVERSTR}_Daily_Tests_${TODAY}" +#TITLE="${BRANCHNAME} Tests on $TODAY" +#cd $CURRENT_DIR + +# Check result +if [ -f $FAILEDLOG ]; then + errcode=1 +elif [ -f $INCOMPLETELOG ]; then + errcode=1 + echo "Not all builds were completed!" +fi + +if [ $errcode -eq 0 ]; then + DEPLOYDIR=`grep "deploydir \/mnt" ./snaptest.cfg | sed "s/^.*deploydir //"` + echo "Make binary tar files from deployed files in $DEPLOYDIR in $BINARYDIR" + CURRENT_DIR=`pwd` + cd current/bin;perl ./make1816TarFiles.pl $DEPLOYDIR $BINARYDIR + cd $CURRENT_DIR +else + echo "errcode was $errcode; no tar files were created." +fi + +# remove lock +rm -f $LOGDIRLOCK + +# test binaries on 3 linux binary test machines. + + +# final exit +exit $errcode + diff --git a/bin/pkgscrpts/h5rmflags b/bin/pkgscrpts/h5rmflags new file mode 100755 index 0000000..8bb28d3 --- /dev/null +++ b/bin/pkgscrpts/h5rmflags @@ -0,0 +1,169 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +# + +## This script wasextracted from h5redeploy to find hdf5 compile scripts and +## remove build paths from hdf5 compile scripts. Script is intended to be +## called from the make18xxTarFiles.pl script, so it could be stripped of options. +## Actions are predetermined and written in this script instead of in a command +## file. + +# Constants definitions +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Function definitions + +# show help page +usage() { + # A wonderfully informative "usage" message. + echo "usage: $prog_name [OPTIONS]" + echo " OPTIONS:" + echo " -help|help This help message" + echo " -echo Show all the shell commands executed" + echo " -force No prompt, just do it" + echo " -prefix=DIR New directory to find HDF5 lib/ and include/" + echo " subdirectories [default: current directory]" + echo " -tool=TOOL Tool to update. TOOL must be in the current" + echo " directory and writable. [default: $h5tools]" + echo " -show Show the commands without executing them" + echo " " + exit $EXIT_FAILURE +} + +# display variable values +dump_vars(){ + echo "====Showing all variable values=====" + echo prefix=$prefix + echo h5tools=$h5tools + echo "====End Showing=====" +} + +# show actions to be taken +show_action() +{ + echo "Update the following tools because they are now installed at a new directory" + for t in $foundtools; do + echo "${t}:" + echo " current setting=`sed -e '/^prefix=/s/prefix=//p' -e d $t`" + echo " new setting="\""$prefix"\" + done +} + + +# Report Error message +ERROR() +{ + echo "***ERROR***" + echo "$1" +} + +# Main +# +# Initialization +h5tools="h5cc h5pcc h5fc h5pfc h5c++" # possible hdf5 tools +foundtools= # tools found and will be modified +fmode= # force mode, default is off +prefix=`(cd ..;pwd)` + +# Parse options +for arg in $@ ; do + case "$arg" in + -prefix=*) + prefix="`expr "$arg" : '-prefix=\(.*\)'`" + ;; + -echo) + set -x + ;; + -show) + SHOW="echo" + ;; + -tool=*) + h5tools="`expr "$arg" : '-tool=\(.*\)'`" + ;; + -help|help) + usage + ;; + -force) + fmode=yes + ;; + *) + ERROR "Unknown Option($arg)" + usage + exit $EXIT_FAILURE + ;; + esac +done + +# Sanity checks +#if [ ! -d $prefix ]; then +# ERROR "prefix($prefix) is not an existing directory" +# exit $EXIT_FAILURE +#fi + +for x in $h5tools; do + if [ -f $x ]; then + foundtools="$foundtools $x" + if [ ! -w $x ]; then + ERROR "h5tool($x) is not writable" + exit $EXIT_FAILURE + fi + fi +done + +if [ -z "$foundtools" ]; then + ERROR "found no tools to modify" + exit $EXIT_FAILURE +fi + +# Show actions to be taken and get consent +show_action + + +# Update them +if [ "$SHOW" = "echo" ]; then + echo "===Update commands are:====" +# cat $CMDFILE + echo "===End Update commands=====" +fi + +for t in $foundtools; do + echo Update $t ... +# COMMAND="ed - $t" +# if [ "$SHOW" = "echo" ]; then +# echo $COMMAND +# else +# $COMMAND < $CMDFILE + ed - $t << end + g/^H5BLD_CPPFLAGS/s/-I\/.*include //g + g/^H5BLD_LDFLAGS/s/-L\/.*lib //g + g/^H5BLD_LDFLAGS/s/-L\/.*lib64 //g + . + w +end +# fi +done + + +# Cleanup +#rm -f $CMDFILE +exit $EXIT_SUCCESS + +# Some possible future features to add +# CCBASE - Name of the alternative C compiler +# CLINKERBASE - Name of the alternative linker +# LDFLAGS - Path to different libraries your application will link with +# (this path should include the path to the zlib library) +# LIBS - Libraries your application will link with diff --git a/bin/pkgscrpts/make1816TarFiles.pl b/bin/pkgscrpts/make1816TarFiles.pl new file mode 100755 index 0000000..64cb7e0 --- /dev/null +++ b/bin/pkgscrpts/make1816TarFiles.pl @@ -0,0 +1,321 @@ +#!/usr/bin/perl + +# makeTarFiles.pl +use warnings; +use strict; +use Cwd; +use File::Basename; + +my %destsubdir = ('emu' => 'sunos-5.11-sparc-32-sunc512', + 'emu64' => 'sunos-5.11-sparc-64-sunc512', + 'freedom' => 'freebsd-8.2-amd64-gcc461', + 'loyalty' => 'freebsd-8.2-i386-gcc461', + 'ostrich' => 'linux-el6-ppc64-gcc447', + 'ostrichxl' => 'linux-el6-ppc64-xl13.1', + 'platypus' => 'linux-centos6-x86_64-gcc447', + 'moohan' => 'linux-centos7-x86_64-gcc483', + 'kite' => 'osx-10.8-x86_64-clang5.1', + 'quail' => 'osx-10.9-x86_64-clang6.0', + 'osx1010test' => 'osx-10.10-x86_64-clang6.0'); + + +my %szipdir = ('emu' => '/mnt/hdf/packages/szip/shared/encoder/SunOS-5.10', + 'emu-static' => '/mnt/hdf/packages/szip/static/encoder/SunOS-5.10', + 'emu64' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64', + 'emu64-static' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64', + 'freedom' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD-64', + 'freedom-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD-64', + 'kite' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8', + 'kite-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8', + 'loyalty' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD', + 'loyalty-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD', + 'ostrich32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc', + 'ostrich32-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc-32', + 'ostrich' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64', + 'ostrich-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc', + 'ostrichxl' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64', + 'ostrichxl-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc', + 'platypus' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', + 'platypus-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', + 'moohan' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc', + 'moohan-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc', + 'quail' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8', + 'quail-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8'); + +my %zlibdir = ('emu' => '/mnt/hdf/packages/zlib-125/shared/SunOS-5.10', + 'emu-static' => '/mnt/hdf/packages/zlib-125/static/SunOS-5.10', + 'emu64' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64', + 'emu64-static' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64', + 'freedom' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD-64', + 'freedom-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD-64', + 'kite' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', + 'kite-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', + 'loyalty' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD', + 'loyalty-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD', + 'ostrich32' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc', + 'ostrich32-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc', + 'ostrich' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', + 'ostrich-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', + 'ostrichxl' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', + 'ostrichxl-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64', + 'platypus' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', + 'platypus-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', + 'moohan' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc', + 'moohan-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc', + 'quail' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', + 'quail-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64', + 'osx1010test' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64', + 'osx1010test-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64'); + +my $indirectory = "."; +$indirectory = shift; + +my $outdirectory = "."; +$outdirectory = shift; + +my $key = "."; +#$key = shift; + +my $scriptdirname = dirname(__FILE__); + +unless (-d $outdirectory) { + print "$outdirectory not found. Create it or choose another one and try again.\n"; + exit 1; +} + +print "Subdirectories of $indirectory will be tarred and stored in $outdirectory.\n"; + + +my $tarfilename; +my $tardirname; +my $output; +my $cmd; + +# I'm currently copying system zlibs for at least solaris and FreeBSD machines. Since this script runs on jam it may require scp to get the libs. + +#For future reference +# command for getting szlib files and links for shared binaries: +# tar cvf - -C /lib . | tar xvf - -C . +# libz.so.1.2.3 and the static files should just be copied because they're in directories +# with other files. Then create the libz.so.1 and libz.so symbolic links. +sub addzandszlibs { + my $dir = shift; + my $indirectory = shift; + my $currentdir = getcwd(); + + if (-d "$indirectory/$dir" ) { + my $szdir = $szipdir{$dir}; + my $zldir = $zlibdir{$dir}; + if ($dir =~ /static/ || $dir =~ /ostrich/) { + $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + } elsif ($dir eq "freedom" || $dir eq "loyalty") { + $cmd = "cp $szdir/lib/libsz.so.2 $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + $cmd = "cp $zldir/lib/libz.so.5 $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + + chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; + $cmd = "ln -s libsz.so.2 libsz.so"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libz.so.5 libz.so"; + $output = `$cmd`; + print $output; + + chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; + } elsif ($dir eq "osx1010test" || $dir eq "quail" || $dir eq "kite") { + #we've been using the static libraries for the macs - built with -fPIC +# $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib"; +# $output = `$cmd`; +# print $output; +# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; +# $output = `$cmd`; +# print $output; + $cmd = "cp $szdir/lib/libsz.so.2.0.0.dylib $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + $cmd = "cp $zldir/lib/libz.1.2.5.dylib $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + + chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; + $cmd = "ln -s libsz.so.2.0.0.dylib libsz.2.dylib"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libsz.so.2.0.0.dylib libsz.cylib"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libz.1.2.5.dylib libz.1.dylib"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libz.1.2.5.dylib libz.dylib"; + $output = `$cmd`; + print $output; + + chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; + + } elsif ($dir eq "emu64") { + $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + + chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; + $cmd = "ln -s libsz.so.2.0.0 libsz.so.2"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libsz.so.2.0.0 libsz.so"; + $output = `$cmd`; + print $output; + + chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; + + } else { + $cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + $cmd = "cp $zldir/lib/libz.so.1.2.5 $indirectory/$dir/lib"; + $output = `$cmd`; + print $output; + + chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!"; + $cmd = "ln -s libsz.so.2.0.0 libsz.so.2"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libsz.so.2.0.0 libsz.so"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libz.so.1.2.5 libz.so.1"; + $output = `$cmd`; + print $output; + + $cmd = "ln -s libz.so.1.2.5 libz.so"; + $output = `$cmd`; + print $output; + + chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; + } + } +} + +sub makeTarFile { + my $directoryname = shift; + my $origdirname = shift; + my $tarfilename = shift; + my $tardirname = shift; + $cmd = "mv $indirectory/$origdirname $indirectory/$tardirname"; + $output = `$cmd`; + print $output; + if (-d $indirectory."/".$tardirname."/doc/hdf5/examples") { + $cmd = "mv $indirectory/$tardirname/doc/hdf5/examples $indirectory/$tardirname/examples"; + $output = `$cmd`; + print $output; + $cmd = "rm -rf $indirectory/$tardirname/doc"; + $output = `$cmd`; + print $output; + } + $cmd = "tar zcvf $outdirectory/$directoryname/$tarfilename -C $indirectory $tardirname"; + print "Need to run $cmd.\n"; + $output = `$cmd`; + sleep 10; + print "Create $tarfilename: $output\n"; + $cmd = "mv $indirectory/$tardirname $indirectory/$origdirname"; + $output = `$cmd`; + print $output; +} + +foreach $key (keys %destsubdir) { + print "Process ".$key."\n\n"; + #skip unless there's a directory by the name of $key or $key-static + next unless -d $indirectory.'/'.$key || -d $indirectory.'/'.$key."-static"; + my $version; + # This assumes a static directory. Probably the others should be checked if this + # doesn't exist. + $cmd = "grep \"HDF5 Version\" $indirectory/$key/lib/libhdf5.settings"; + $_ = `$cmd`; + #print OUTFILE $_, "\n"; + s/HDF5 Version://; + s/^\s+//; + chomp; + $version = $_; + #my $directoryname = substr $destsubdir{$key}, 0, rindex($destsubdir{$key}, '-'); + my $directoryname = $destsubdir{$key}; + mkdir $outdirectory."/".$directoryname, 0755 unless -d $outdirectory."/".$directoryname; + my $staticdir = $key."-static"; + print $indirectory."/$key tarfile will be put in " . $outdirectory."/".$directoryname."\n"; + if (-e $outdirectory."/".$destsubdir{$key}."/README") { + print $outdirectory."/".$destsubdir{$key}."/README" . " has already been created.\n"; + } + else { + print "Make the Outer README file: "; + $cmd = "perl ./makeOuter1816README.pl $indirectory/$key $outdirectory $directoryname"; + print $cmd, "\n"; + my $output = `$cmd`; + print $output; + } + my $file = ""; + my @dirnames = ""; + opendir(DIR, $indirectory) or die "can't open .: $!"; + while (defined($file = readdir(DIR))) { + next unless ($file eq $key || $file eq "$key-static") && -d $indirectory."/".$file; + push @dirnames, $file; + } + foreach my $dir (@dirnames) { + next if $dir eq ""; + print "Make the Inner README files.\n"; + $cmd = "perl ./makeInternal1816README.pl $indirectory/$dir"; + print $cmd, "\n"; + $output = `$cmd`; + print $output; + print "Add the zlib and szip files for $dir.\n"; + &addzandszlibs($dir, $indirectory); + my $currentdir = getcwd(); + + print "Remove all lib*.la files from $dir/lib*.\n"; + $cmd = "rm $indirectory/$dir/lib*/lib*.la"; + print $cmd, "\n"; + $output = `$cmd`; + print $output; + + chdir "$indirectory/$dir/bin" or die "Couldn't change directory to $indirectory/$dir/bin, $!"; + $cmd = "$scriptdirname/h5rmflags -force"; + $output = `$cmd`; + print $output; + chdir $currentdir or die "Couldn't change directory back to $currentdir, $!"; + print "Tar up the files into the output directory.\n"; + if (-d $indirectory."/".$dir) { + if ($dir =~ /static/) { + $tarfilename = "hdf5-$version-$destsubdir{$key}-static.tar.gz"; + $tardirname = "hdf5-$version-$destsubdir{$key}-static"; + } else { + $tarfilename = "hdf5-$version-$destsubdir{$key}-shared.tar.gz"; + $tardirname = "hdf5-$version-$destsubdir{$key}-shared"; + } + &makeTarFile($directoryname, $dir, $tarfilename, $tardirname); + } + } + # If this copy is done after h5rmflags is run on all the directories the compile scripts + # in the utilities directory will already have the paths removed. + if (-d $indirectory."/".$staticdir) { + $cmd = "cp -prv $indirectory/$staticdir/bin $outdirectory/$directoryname/utilities"; + $output = `$cmd`; + print $output; + } +} + diff --git a/bin/pkgscrpts/makeInternal1816README.pl b/bin/pkgscrpts/makeInternal1816README.pl new file mode 100755 index 0000000..1171218 --- /dev/null +++ b/bin/pkgscrpts/makeInternal1816README.pl @@ -0,0 +1,194 @@ +#!/usr/bin/perl +# makeInternalREADME.pl +use warnings; +use strict; + +my $section2="For information on compilers and settings used to build these HDF5 +libraries, please refer to: + + ./lib/libhdf5.settings + +The contents of this directory are: + + COPYING - Copyright notice + README - This file + RELEASE.txt - Detailed information regarding this release + bin/ - Directory containing HDF5 pre-compiled utilities + include/ - Directory containing HDF5 include files + lib/ - Directory containing HDF5 libraries and settings + share/ - Directory containing HDF5 C, C++ and Fortran example + program code and scripts to test compile scripts + h5cc, h5c++ and h5fc + +These binaries were built with the ZLIB and SZIP (version 2.1, Encoder +ENABLED) external libraries which are included in the lib directory for +convenience. + +We also provide the ZLIB and SZIP source code on our ftp server at: + + ftp://ftp.hdfgroup.org/lib-external/ + +The official ZLIB and SZIP pages are at: + + ZLIB: http://www.zlib.net/ + SZIP: http://hdfgroup.org/doc_resource/SZIP/ + +"; + +my $section3 = "If using the shared libraries, you must add the HDF5 library path +to the LD_LIBRARY_PATH variable. +"; + +my $section4 = "We provide scripts for compiling applications with the HDF5 libraries: + + bin/h5cc - for C + bin/h5fc - for F90 (if Fortran 90 is included with the binaries) + bin/h5c++ - for C++ (if C++ is included with the binaries) + +After you have installed the binaries to their final destination, +you can use these scripts (h5cc, h5fc, h5c++) to compile. However, +you must first: + + 1) Run ./h5redeploy in the bin directory to change site specific paths in the scripts. + + 2) Edit each script and update the paths for the external libraries + in LDFLAGS and CPPFLAGS. + +You may also need to change other variables in the scripts, depending +on how things are set up on your system. Here are some of the variables +to check: + + prefix - Path to the HDF5 top level installation directory + CCBASE - Name of the alternative C compiler + CLINKERBASE - Name of the alternative linker + LIBS - Libraries your application will link with + +For further details refer to the INSTALL files in the ./release_docs/ +directory of the HDF5 source code: + + ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/ + +Source code can be found on the THG ftp server in: + + ftp://ftp.hdfgroup.org/HDF5/current/src/ + +Please send questions, comments, and suggestions to: + + http://hdfgroup.org/about/contact.html + + +"; + +my $indirectory = "."; +$indirectory = shift; +my $linktype = "shared"; +if ($indirectory =~ /static/) { + $linktype = "static"; +} + +my $version; + +my $outfile = "$indirectory/README"; +open OUTFILE, ">$outfile" or die "$!Couldn't open $outfile - check permissions for $indirectory\n"; +my $hostname; +my $cmd = "grep \"HDF5 Version\" $indirectory/lib/libhdf5.settings"; +$_ = `$cmd`; +#print OUTFILE $_, "\n"; +s/HDF5 Version://; +s/^\s+//; +chomp; +$version = $_; +#print OUTFILE $_, "\n"; + +my $versionstring= "This directory contains the $linktype binary distribution of HDF5-".$version; + +$cmd = "grep \"Uname information:\" $indirectory/lib/libhdf5.settings"; +$_ = `$cmd`; +s/Uname information://; +s/^\s+//; +#print OUTFILE $_; +chomp; +#s/(^\w+)(\s)(\S+)/$1/; +#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/; +#my $platformstring = "\nthat was compiled on:" . $_ . " "; +my $platformstring = ""; +my $hostnamestring = $_; +my @hostnamestring = split / /, $hostnamestring; +#print OUTFILE "Size of hostnamestring is ", scalar @hostnamestring, "\n"; +#print OUTFILE $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n"; +$hostname = $hostnamestring[1]; +#my $size = scalar @hostnamestring; +if ($hostname =~ /loyalty/) { + $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " "; +} +elsif ($hostname =~ /freedom/) { + $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " "; +} elsif ($hostname =~ /emu/) { + $platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-2] . " "; +} else { + $_ = $hostnamestring[2]; + my $pos = index $_, '-'; + my $os = substr $_, 0, $pos; + $platformstring = "\nthat was compiled on: " . $hostnamestring[0] . " " . $os . " " . $hostnamestring[-2] . " "; +} + + +my $mappingstring = ""; +#no mappingstring for 1.6. Put it back for 1.8. +#$cmd = "grep \"Default API Mapping:\" $indirectory/lib/libhdf5.settings"; +#$_ = `$cmd`; +#s/Default API Mapping://; +#s/^\s+//; +#chomp; +#if (/v\d+/) { +# s/v//; +# s/(\d)(\d)/$1\.$2/g; +# $mappingstring = "using the default\nAPI mapping for VERSION ".$_."."; +# +#} +print OUTFILE $versionstring; +print OUTFILE $platformstring."\n\n"; +#print OUTFILE $mappingstring; + +#if ($hostname eq "loyalty.hdfgroup.uiuc.edu" || $hostname eq "freedom.hdfgroup.uiuc.edu") { +# print OUTFILE " It includes the C APIs,\nbuilt using the following "; +# print OUTFILE "compilers:\n\n"; +#} +#else { +print OUTFILE "\n\nIt includes the C, C++, and F90 APIs, built using the following\n"; +print OUTFILE "compilers:\n\n"; +#} + +# Only the gcc compiler version is in libhdf5.settings, so for now I looked +# up the versions and hardcoded them here. We will put them in libhdf5.settings +# for the next release. +if ($indirectory =~ /gcc482/) { + print OUTFILE "\tgcc, g++, and gfortran 4.8.2\n\n"; + print OUTFILE "\tWarning!\n"; + print OUTFILE "\tIf the 4.8.2 version is not the system default, the scripts listed below\n"; + print OUTFILE "\tfor compiling applications will not work unless either the environment\n"; + print OUTFILE "\tis modified or the full path to the 4.8.2 compiler version is added to\n"; + print OUTFILE "\tthe scripts in variables CCBASE, CCLINKERBASE for h5cc and corresponding\n"; + print OUTFILE "\tvariables for other compilers.\n\n"; +} elsif ($hostname =~ /platypus/ || $hostname =~ /ostrich/) { + print OUTFILE "\tgcc, g++, and gfortran 4.4.7\n\n"; +} elsif ($hostname =~ /moohan/) { + print OUTFILE "\tgcc, g++, and gfortran 4.8.3\n\n"; +} elsif ($hostname =~ /emu/) { + print OUTFILE "\tSun C and C++ 5.12, Sun Fortran 95 8.6\n\n"; +} elsif ($hostname =~ /loyalty/ || $hostname =~ /freedom/) { + print OUTFILE "\tgcc, g++, and gfortran 4.6.1\n\n"; +} elsif ($hostname =~ /kite/) { + print OUTFILE "\tApple clang/clang++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n"; +} elsif ($hostname =~ /quail/) { + print OUTFILE "\tgcc, g++ 6.0 from Xcode 6.2.0 and gfortran 4.9.2\n\n"; +} elsif ($hostname =~ /osx1010test/) { + print OUTFILE "\tgcc, g++ 6.0 from Xcode 7.0.0 and gfortran 4.9.2\n\n"; +} + +print OUTFILE $section2; + +print OUTFILE $section3; + +print OUTFILE $section4; + diff --git a/bin/pkgscrpts/makeOuter1816README.pl b/bin/pkgscrpts/makeOuter1816README.pl new file mode 100755 index 0000000..0c03a4e --- /dev/null +++ b/bin/pkgscrpts/makeOuter1816README.pl @@ -0,0 +1,169 @@ +#!/usr/bin/perl +# makeOuterREADME.pl +use warnings; +use strict; + +my $indirectory = "."; +$indirectory = shift; + +my $outdirectory = "."; +$outdirectory = shift; + +my $outsubdir = shift; + +my $version; + +my $outfile = "$outdirectory/$outsubdir/README"; +open OUTFILE, ">$outfile"; +my $hostname=""; +my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings"; +$_ = `$cmd`; +#print OUTFILE $_, "\n"; +s/HDF5 Version://; +s/^\s+//; +chomp; +$version = $_; +#print OUTFILE $_, "\n"; +my $versionstring= "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for"; + +$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings"; +$_ = `$cmd`; +s/Uname information://; +s/^\s+//; +chomp; +print "String to work with is $_\n"; +my $platformstring = ""; +my $hostnamestring = $_; +my @hostnamestring = split / /, $hostnamestring; +$platformstring = "$hostnamestring[0] "; +if ($indirectory =~ /jam/ || $indirectory =~ /koala/) { + $hostnamestring = $hostnamestring[2]; + my $pos = index $hostnamestring, "-"; + if ($pos > 0) { + $platformstring .= substr $hostnamestring, 0, $pos; + } else { + $platformstring .= $hostnamestring[2]; + } + $platformstring .= " ".$hostnamestring[-3]; +} elsif ($indirectory =~ /linew/) { + $platformstring .= "$hostnamestring[2] $hostnamestring[-2]"; +} else { + $platformstring .= "$hostnamestring[2] $hostnamestring[-1]"; +} + +print OUTFILE $versionstring." ".$platformstring.":\n\n"; +my $line1; +my $line3; +my $line5; +my $compilerstring=""; + +print $indirectory, "\n"; + +if ($indirectory =~ /loyalty/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n"; + $compilerstring = " gcc, g++, and gfortran 4.6.1)\n"; +} +elsif ($indirectory =~ /freedom/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n"; + $compilerstring = " gcc, g++, and gfortran 4.6.1)\n"; +} +elsif ($indirectory =~ /ostrich/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " gcc, g++, and gfortran 4.4.7)\n"; +} +elsif ($indirectory =~ /platypus/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + if ($indirectory =~ /gcc482/) { + my $cs1 = " gcc, g++, and gfortran 4.8.2)\n"; + my $cs2 = "\tWarning!"; + my $cs3 = "\tIf the 4.8.2 version is not the system default, the scripts listed provided for compiling"; + my $cs4 = "\tapplications (h5cc, hf5c, etc.) will not work unless either the environment is modified"; + my $cs5 = "\tor the full path to the 4.8.2 compiler versions is added to the scripts.\n\n"; + $compilerstring = join "\n", $cs1, $cs2, $cs3, $cs4, $cs5; + } else { + $compilerstring = " gcc, g++, and gfortran 4.4.7)\n"; + } +} +elsif ($indirectory =~ /moohan/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " gcc, g++, and gfortran 4.8.3)\n"; + } +} +elsif ($indirectory =~ /emu/) { +# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " Sun C and C++ 5.12, Sun Fortran 95 8.6)\n"; +} +elsif ($indirectory =~ /kite/) { + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " Apple clang/clang++ 5.1 from Xcode 5.1, + gfortran 4.8.2)\n"; +} +elsif ($indirectory =~ /quail/) { + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " Apple clang/clang++ 6.0 from Xcode 6.2, + gfortran 4.9.2)\n"; +} +elsif ($indirectory =~ /osx1010test/) { + $line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n"; + $line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n"; + $compilerstring = " Apple clang/clang++ 6.0 from Xcode 7.0, + gfortran 4.9.2)\n"; +} + + print OUTFILE $line3; + print OUTFILE $compilerstring."\n"; +if ($line5 ne "") { + print OUTFILE $line5; + print OUTFILE $compilerstring."\n"; +} +#elsif ($indirectory =~ /-16API/) { +# print OUTFILE $line1; +# print OUTFILE $compilerstring; +# print OUTFILE " USES THE VERSION 1.6 DEFAULT API\n"; +# print OUTFILE " MAPPING.\n\n"; +#} + +print OUTFILE " utilities/ - Directory containing the compiled HDF5 utilities.\n"; +print OUTFILE " These utilities are STATICALLY linked and will run as is.\n\n"; +#print OUTFILE " The tools can be downloaded separately, or ALL in one\n"; +#print OUTFILE " compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n"; +print OUTFILE "\n"; +print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n"; +print OUTFILE "file:\n\n"; +print OUTFILE " gzip -cd | tar xvf -\n"; + + +#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings"; +#$_ = `$cmd`; +#s/Configured by://; +#s/^\s+//; +#print OUTFILE $_; +#chomp; +#my $hostnamestring = $_; +#s/(^\w+)(\s)(\S+)/$1/; +#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/; +#my $platformstring = $_ . ":\n\n"; +#my @hostnamestring = split /@/, $hostnamestring; +#print "Size of hostnamestring is ", scalar @hostnamestring, "\n"; +#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n"; +#my $platformstring = $hostnamestring[1].":\n\n"; +#$hostnamestring = $hostnamestring[1]; +#my $pos = index $hostnamestring, "."; +#if ($pos > 0) { +# @hostnamestring = split /\./, $hostnamestring; +# $platformstring = $hostnamestring[0].":\n\n"; +#} diff --git a/bin/pkgscrpts/testbinaries.sh b/bin/pkgscrpts/testbinaries.sh new file mode 100644 index 0000000..eb6279f --- /dev/null +++ b/bin/pkgscrpts/testbinaries.sh @@ -0,0 +1,706 @@ +#! /bin/sh + +FORTRAN=yes +ARG=$1 +if [ -n "${ARG}" ] && [ "${ARG}" = "-nofortran" ]; then + FORTRAN=no +fi + +echo "Fortran: ${FORTRAN}" + +THIS_DIR=`pwd` + +THIS_TEST_RESULT=0 +TEST_RESULT=0 +FILE_LIST=`ls` +RESULTSLOG="" +SUMMARYLOG="" +EXAMPLE1LOG="" +EXAMPLE2LOG="" +FAILED_TEST_LOGS="" + +# for the 1.8.14 release, binaries built with gcc 4.8.2 need the compiler +# directory added to the front of the PATH. +USING_482="" +USING_482=`ls | grep 482` +if [ -n "$USING_482" ] ; then + PATH=/opt/gcc/4.8.2/bin:$PATH + export PATH + check_gfortran=`file /opt/gcc/4.8.2/bin/gfortran | grep 32-bit` + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + LD_LIBRARY_PATH=/opt/gcc/4.8.2/lib + else + LD_LIBRARY_PATH=/opt/gcc/4.8.2/lib64 + fi + export LD_LIBRARY_PATH +fi + +# step 0: Check presence of top-level README file +STEP0RESULT=0 +README_FILE="" +README_FILE=`ls README` + +echo "Check for presence of top-level README file" +if test -z "$README_FILE"; then + echo "Missing Outer README file." + STEP0RESULT=1 +else + echo "Present" +fi + +for f in $FILE_LIST ; do + #be sure to start in the "top level" directory + cd $THIS_DIR + IS_TARFILE="" + UTILTEST="" + THIS_TEST_RESULT=0 + + IS_TARFILE=`ls $f | grep tar.gz` + + if [ "$f" = "utilities" ]; then + UTILTEST="yes" + cd utilities + RESULTSLOG=$THIS_DIR/utilities_Results.log + SUMMARYLOG=$THIS_DIR/utilities_Summary + echo " SUMMARY" > $SUMMARYLOG + echo "" + echo "Testing $f" + echo "" + elif [ -n "$IS_TARFILE" ] ; then + UTILTEST="" + EXTRACTED=`echo $f | sed 's/\.tar\.gz//'` + STORSH=`echo $EXTRACTED | awk -F- '{ print $NF }'` + + if [ "$STORSH" = "shared" ]; then + SHAREDLIBS=yes + else + SHAREDLIBS="" + fi + echo "" + echo "Testing $f" + + echo + echo "Unpack and install $f." + echo + EXTRACTLOG=extract_$f.log + RESULTSLOG=$THIS_DIR/${STORSH}_Results.log + SUMMARYLOG=$THIS_DIR/${STORSH}_Summary + EXAMPLE1LOG=$THIS_DIR/${STORSH}_hdf5-examples.log + EXAMPLE2LOG=$THIS_DIR/${STORSH}_share_examples.log + echo " SUMMARY" > $SUMMARYLOG + + + # Step 1: unpack binary and run h5redeploy + # Extraction not needed when testing the utilities directory ($UTILTEST = "yes") + echo "Executing step 1: Extracting $f" + tar zxvf $f > $EXTRACTLOG + cd $EXTRACTED/bin + # Check for internal README file in $EXTRACTED + echo "Check for presence of top-level README file" + STEP1RESULT=0 + README_FILE="" + README_FILE=`ls ../README` + + if test -z "$README_FILE"; then + echo "Missing Internal README file." + STEP1RESULT=1 + else + echo "Present" + fi + + else + continue + fi + + ./h5redeploy -force > ${RESULTSLOG} + + # Steps 2 & 3 don't apply for testing the utilities directory ($UTILTEST = "yes") + if [ -z "$UTILTEST" ]; then + # For testing tar files, go back up to the test directory + cd $THIS_DIR + + # Step 2 + STEP2RESULT=0 + echo "Executing step 2: Check and verify contents of the lib/libhdf5.settings file." + + # 2.1 Check Platform + # The platform information won't match exactly and is somewhat irregular. We + # can write a script with awk and sed to match enough information to determine + # a match, but it will take some thought and research to determine which parts + # to check. For now, present the output of "uname -a" and the "Uname information" + # line from libhdf5.settings and let the developer decide. + + MACH_UNAME=`uname -a` + BIN_UNAME=`grep "Uname information" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*Uname information://'` + + IS_SOLARIS=`echo $BIN_UNAME | grep SunOS` + IS_PPC64=`echo$BIN_UNAME | grep ppc64` + IS_MAC=`echo $BIN_UNAME | grep Darwin` +# if [ -n "$IS_MAC" ]; then +# IS_MAC32=`echo $BIN_UNAME | grep tejeda` +# IS_MAC64=`echo $BIN_UNAME | grep fred` +# fi + # at present we only need to know if the binary is for mac or not, so if + +# echo "The output of \"uname -a\" for this machine is:" +# echo "" +# echo " $MACH_UNAME" +# echo "" +# echo "The \"Uname information\" line from the libhdf5.settings in this binary is:" +# echo "" +# echo " $BIN_UNAME" +# echo "" + + # Probably we won't ask, just print the results in the summary + #echo "Is this the correct binary to install on this machine? (yes/no - yes to continue, no to exit)" + #read CORRECT + #if [ "$CORRECT" = "yes" ]; then + # echo "Continuing with binary tests." + #else + # echo "Exiting - Try downloading another binary for this machine." + #fi + + # 2.2 Check compiler versions in libhdf5.settings against RELEASE.txt + # Need to compare both files in detail to find unique string to compare +# grep -A 70 "^Platforms Tested$" $EXTRACTED/RELEASE.txt +# echo "" +# echo "We need to check that the compilers listed in" +# echo "$EXTRACTED/lib/libhdf5.settings are also listed" +# echo "in the \"Platforms Tested\" section of $EXTRACTED/RELEASE.txt, displayed above." +# echo "Please find the compiler version information for the following compilers" +# echo "and for this platform, $BIN_UNAME, in the \"Platforms Tested\" section (printed above)" +# echo "and enter it below." +# echo "" +# echo "For multiple lines copy a line at a time separated by a space." +# echo "" +# echo "If the compiler cannot in the \"Platforms Tested\" section above please check the RELEASE.txt file." +# echo "If no match is found there, please enter \"NO MATCH\"" +# + C_COMPILER=`grep "C Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` + F_COMPILER=`grep "Fortran Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` + CXX_COMPILER=`grep "C++ Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` +# echo "" +# echo $C_COMPILER +# echo "" +# echo $F_COMPILER +# echo "" +# echo $CXX_COMPILER +# echo "" +# echo "Enter info from RELEASE.txt for C Compiler:" +# read C_COMP_INFO +# echo "Enter info for Fortran Compiler:" +# read F_COMP_INFO +# echo "Enter info for C++ Compiler:" +# read CXX_COMP_INFO + + # 2.3 Check libhdf5.settings for Shared and Static (Static Executables?) + STATIC=`grep Static $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes` + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + #echo "Static Libraries PASSED." + echo "Static Libraries PASSED." >> $RESULTSLOG + + else + #echo "No static libraries: FAILED." + STEP2RESULT=1 + echo "No static libraries: FAILED." >> $RESULTSLOG + fi + + if [ -n "$SHAREDLIBS" ]; then + SHARED=`grep Shared $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes` + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + # echo "Shared Libraries present: PASSED." + # echo $SHARED + echo "Shared Libraries present: PASSED." >> $RESULTSLOG + else + # echo "Shared libraries are missing: FAILED." + STEP2RESULT=1 + echo "Shared libraries are missing: FAILED." >> $RESULTSLOG + fi + fi + + #2.4 Check for Fortran support + SUPPORT=`grep "Fortran: yes" $EXTRACTED/lib/libhdf5.settings` + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + # echo "Fortran supported: PASSED" + echo "Fortran supported: PASSED" >> $RESULTSLOG + else + # echo "Fortran not supported: FAILED" + STEP2RESULT=1 + echo "Fortran not supported: FAILED" >> $RESULTSLOG + fi + + #2.5 Check for C++ support + SUPPORT=`grep "C++: yes" $EXTRACTED/lib/libhdf5.settings` + if [ "$RETVAL" = "0" ]; then + # echo "C++ supported: PASSED" + echo "C++ supported: PASSED" >> $RESULTSLOG + else + # echo "C++ not supported: FAILED" + STEP2RESULT=1 + echo "C++ not supported: FAILED" >> $RESULTSLOG + fi + + #2.6 Check that zlib and szip are enabled + SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "deflate(zlib)"` + if [ "$RETVAL" = "0" ]; then + echo "zlib supported: PASSED" >> $RESULTSLOG + else + STEP2RESULT=1 + echo "zlib not supported: FAILED" >> $RESULTSLOG + fi + SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "szip(encoder)"` + if [ "$RETVAL" = "0" ]; then + # echo "szip with encoder supported: PASSED" + echo "szip with encoder supported: PASSED" >> $RESULTSLOG + else + # echo "szip with encoder not supported: FAILED" + STEP2RESULT=1 + echo "szip with encoder not supported: FAILED" >> $RESULTSLOG + fi + + #2.7 Check for Compilation Mode = production + PRODUCTION=`grep "Compilation Mode: production" $EXTRACTED/lib/libhdf5.settings` + if [ "$RETVAL" = "0" ]; then + #echo "Compilation Mode is production: PASSED" + echo "Compilation Mode is production: PASSED" >> $RESULTSLOG + else + #echo "Compilation Mode is development: FAILED" + STEP2RESULT=1 + echo "Compilation Mode is development: FAILED" >> $RESULTSLOG + fi + + #2.8 Check for optimization flag + OPTIMIZED=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep "\-O"` + if [ "$RETVAL" = "0" ]; then + # echo "Optimization is on: PASSED" + echo "Optimization is on: PASSED" >> $RESULTSLOG + else + # echo "No optimization found in FLAGS: FAILED" + STEP2RESULT=1 + echo "No optimization found in FLAGS: FAILED" >> $RESULTSLOG + fi + + #2.9 Check for no "-g" flags + DEBUG=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep " \-g "` + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + #echo "-g flag is present: $DEBUG FAILED" + echo "-g flag is present: $DEBUG FAILED" >> $RESULTSLOG + else + #echo "-g flag is not present: PASSED" + echo "-g flag is not present: PASSED" >> $RESULTSLOG + fi + + if [ "$STEP2RESULT" = "0" ]; then + echo "PASSED" + echo "Step 2 PASSED" >> $SUMMARYLOG + else + echo "**** FAILED" + echo "**** Step 2 FAILED ****" >> $RESULTSLOG + echo "**** Step 2 FAILED ****" >> $SUMMARYLOG + fi + + # Step 3 + echo "Executing step 3: Check and verify included libraries." + STEP3RESULT=0 + + RETVAL=0 + THIS_DIR=`pwd` + cd $EXTRACTED/lib + STATIC_LIBFILES="libhdf5.a libhdf5_cpp.a libhdf5_fortran.a libhdf5_hl.a libhdf5_hl_cpp.a libhdf5hl_fortran.a libhdf5_cpp.a" + for s in $STATIC_LIBFILES ; do + if test -f $s; then + echo "found $s" >> $RESULTSLOG + else + echo "$s not found." >> $RESULTSLOG + RETVAL=1 + fi + done + if [ -n "$IS_MAC" ]; then + # Currently no shared libraries for Fortran are produced on the mac-intel machines + SHARED_LIBFILES="libhdf5_cpp.11.dylib libhdf5_hl_cpp.10.dylib libhdf5_hl.10.dylib libhdf5.10.dylib libsz.a" + elif [ -n "$IS_PPC64" ]; then + SHARED_LIBFILES="libhdf5_cpp.so.11.0.0 libhdf5_fortran.so.10.0.2 libhdf5_hl_cpp.so.10.0.2 libhdf5hl_fortran.so.10.0.2 libhdf5_hl.so.10.0.2 libhdf5.so.10.1.0" + else + SHARED_LIBFILES="libhdf5_cpp.so.9.0.0 libhdf5_fortran.so.9.0.0 libhdf5_hl_cpp.so.9.0.0 libhdf5hl_fortran.so.9.0.0 libhdf5_hl.so.9.0.0 libhdf5.so.9.0.0 libsz.so.2.0.0 libz.so.1.2.5" + fi + if [ -n "${SHAREDLIBS}" ]; then + for s in $SHARED_LIBFILES ; do + if test -f $s; then + echo "found $s" >> $RESULTSLOG + else + echo "$s not found." >> $RESULTSLOG + RETVAL=1 + fi + done + if [ "$RETVAL" = "0" ]; then + #echo "All shared and static library files are included: PASSED" + echo "All shared and static library files are included: PASSED" >> $RESULTSLOG + else + #echo "Expected library files are missing: FAILED" + STEP3RESULT=1 + echo "Expected library files are missing: FAILED" >> $RESULTSLOG + fi + else + EXTLIBS="libsz.a libz.a" + for l in $EXTLIBS ; do + if test -f $l; then + echo "found $l" >> $RESULTSLOG + else + echo "$l not found." >> $RESULTSLOG + RETVAL=1 + fi + done + if [ "$RETVAL" = "0" ]; then + # check to see if any shared library files are in the directory + # 'ls' returns 0 if it finds a match, non-zero if no match is found. + ls *.so* >& /dev/null + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + #echo "Unexpected shared library files are present: FAILED" + STEP3RESULT=1 + echo "Unexpected shared library files are present: FAILED" >> $RESULTSLOG + else + #echo "Static library files are included and no shared libraries are present: PASSED" + echo "Static library files are included and no shared libraries are present: PASSED" >> $RESULTSLOG + fi + else + #echo "Expected library files are missing: FAILED" + STEP3RESULT=1 + echo "Expected library files are missing: FAILED" >> $RESULTSLOG + fi + fi + if [ "$STEP3RESULT" = "0" ]; then + echo "PASSED" + echo "Step 3 PASSED" >> $SUMMARYLOG + else + echo "**** FAILED ****" + echo "**** Step 3 FAILED ****" >> $RESULTSLOG + echo "**** Step 3 FAILED ****" >> $SUMMARYLOG + fi + # change to the $EXTRACTED/bin directory. + # For utilities testing we should already be in the utilities directory + cd ../bin + fi + + # Step 4 + echo "Executing step 4: Verify binary platform type." + STEP4RESULT=0 + + # This step is included to check that the binaries built with --enable-static-exec + # aren't dynamically linked to any libraries. --enable-static-exec doesn't work on + # solaris, and our macs and ppc64 only have dynamic zlib libraries, so we skip this step for + # those machines. + if [ -z "$IS_SOLARIS" ] && [ -z "$IS_MAC" ] && [ -z "$IS_PPC64" ]; then + RETVAL=0 + EXEC_BINFILES="gif2h5 h52gif h5copy h5debug h5diff h5dump h5import h5jam h5ls h5mkgrp h5perf_serial h5repack h5repart h5stat h5unjam" + for e in $EXEC_BINFILES ; do + if [ -n "$IS_MAC" ]; then + OUTPUT=`otool -L $e` + else + OUTPUT=`ldd $e` + fi + match_number=`expr "$OUTPUT" : '\s*not a dynamic executable'` + + if [ "$match_number" = "25" ]; then + #echo "$e $OUTPUT PASSED" + echo "$e $OUTPUT PASSED" >> $RESULTSLOG + else + #echo "$e $OUTPUT Please report whether this output is acceptable" + STEP4RESULT=1 + echo "$e $OUTPUT Please report whether this output is acceptable" >> $RESULTSLOG + fi + done + if [ "$STEP4RESULT" = "0" ]; then + #echo "Executable files ran successfully on this platform" + echo "PASSED" + echo "Step 4 PASSED" >> $SUMMARYLOG + else + #echo "Not all executable files ran successfully on this platform" + echo "**** FAILED ****" + echo "**** Step 4 FAILED ****" >> $RESULTSLOG + echo "**** Step 4 FAILED. See $RESULTSLOG for details ****" >> $SUMMARYLOG + fi + fi + + if [ -z "$UTILTEST" ]; then + # Step 5 + echo "Executing step 5: Compile and test examples in hdf5-examples repository with the tar file's h5cc, h5fc and h5c++." + + #return to the top level test directory (the starting directory) + cd $THIS_DIR + STEP5RESULT=0 + + # For the macs, we need DYLD_LIBRARY_PATH set to the lib directory of the hdf5 to be tested. + if [ -n "${IS_MAC}" ] && [ "${SHAREDLIBS}" = "yes" ]; then + DYLD_LIBRARY_PATH=$THIS_DIR/$EXTRACTED/lib + export DYLD_LIBRARY_PATH + fi + + if test -d hdf5-examples ; then + rm -rf hdf5-examples + fi + svn co https://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/ hdf5-examples > checkout.log + + CC=$THIS_DIR/$EXTRACTED/bin/h5cc + export CC + FC=$THIS_DIR/$EXTRACTED/bin/h5fc + export FC + # hdf5-examples/1_8/FORTRAN fails with -O2 or higher + if [ -n "$IS_MAC" ]; then + FCFLAGS=-O1 + export FCFLAGS + fi + CXX=$THIS_DIR/$EXTRACTED/bin/h5c++ + export CXX + H5EX_16=yes + export H5EX_16 + H5EX_18=yes + export H5EX_18 + cd hdf5-examples + ./configure > ${EXAMPLE1LOG} + if [ "${FORTRAN}" = "yes" ]; then + make check > ${EXAMPLE1LOG} + else + cd 1_6 + make check > ${EXAMPLE1LOG} + cd ../1_8/C + make check >> ${EXAMPLE1LOG} + cd ../.. + fi + RETVAL=`echo $?` + NUMFAILED=`grep -c FAILED ${EXAMPLE1LOG}` + NUMFAILED0=`grep -c "# FAIL: 0" ${EXAMPLE1LOG}` + NUMPASSED=`grep -c "# PASS: 1" ${EXAMPLE1LOG}` + NUMTOTAL=`grep -c "# TOTAL: 1" ${EXAMPLE1LOG}` + NUMERR=`grep -i error ${EXAMPLE1LOG} | grep -v "# ERROR: 0" | grep -ic error` + NUMERR0=`grep -c "# ERROR: 0" ${EXAMPLE1LOG}` +# NUMPASSREQ=120 +# if [ "${FORTRAN}" = "no" ]; then +# NUMPASSREQ=102 +# fi + + if test "$RETVAL" = "0" -a "$NUMFAILED" = "0" ; then + if test "$NUMERR" = "0" -a "$NUMPASSED" = "$NUMTOTAL" -a "$NUMERR0" = "$NUMTOTAL" -a "$NUMFAILED0" = "$NUMTOTAL" ; then + echo "PASSED" + echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${RESULTSLOG} + echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${SUMMARYLOG} + else + STEP5RESULT=1 + if test $NUMERR -gt 0 -o $NUMFAILED -gt 0 ; then + echo "**** FAILED ****" + echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} + echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} + else + echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} + echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} + fi + fi + else + STEP5RESULT=1 + echo "**** FAILED ****" + echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} + echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} + fi + + cd $THIS_DIR + + # Step 6 NA for utilities + + # Step 6 + echo "Executing step 6: Use run-all-ex.sh to compile and run installed examples." + STEP6RESULT=0 + + cd $EXTRACTED/share/hdf5_examples + if [ "${FORTRAN}" = "no" ]; then + echo "Run c examples" + if ((cd c; sh ./run-c-ex.sh) && \ + (if test -d c++; then + echo "Run c++ examples" + cd c++; sh ./run-c++-ex.sh + fi) && \ + (if test -d hl; then + echo "Run hl examples." + cd hl && \ + (cd c; sh ./run-hlc-ex.sh) && \ + (if test -d c++; then + echo "Run hl c++ examples" + cd c++; sh ./run-hlc++-ex.sh + fi) + fi)) > $EXAMPLE2LOG; then + echo "Done" + RETVAL=0 + else + RETVAL=1 + fi + else + sh ./run-all-ex.sh > $EXAMPLE2LOG + RETVAL=$? + fi + + + if [ "$RETVAL" = "0" ]; then + echo "PASSED" + echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${RESULTSLOG} + echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${SUMMARYLOG} + else + echo "**** FAILED ****" + STEP6RESULT=1 + "**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${RESULTSLOG} + "**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${SUMMARYLOG} + fi + fi + + + # Step 7 + echo "Executing step 7: Run command -V with executables to be sure that they will run." + + STEP7PASS=0 + STEP7FAIL=0 + STEP7RESULT=0 + # h5debug and h5perf_serial don't return 0 with -V, so they aren't in this list. -h would be another + # option, but even more bin files don't return 0. h5redeploy is tested as part of install, and doesn't + # support -V. + EXEC_BINFILES="gif2h5 h52gif h5copy h5diff h5dump h5import h5jam h5ls h5mkgrp h5repack h5repart h5stat h5unjam" + for e in $EXEC_BINFILES ; do + OUTPUT=`$THIS_DIR/$EXTRACTED/bin/$e -V` + RETVAL=$? + + if [ "$RETVAL" = "0" ]; then + echo "$e $OUTPUT PASSED" >> $RESULTSLOG + STEP7PASS=`expr $STEP7PASS + 1` + else + echo "$e $OUTPUT FAILED" >> $RESULTSLOG + STEP7FAIL=`expr $STEP7FAIL + 1` + fi + done + if [ $STEP7PASS -gt 12 ] && [ $STEP7FAIL -eq 0 ]; then + echo "PASSED" + echo "Step 7 PASSED: $STEP7PASS executable files in bin ran with -V on this machine." >> $SUMMARYLOG + else + STEP7RESULT=1 + echo "**** FAILED ****" + echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $RESULTSLOG + echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $SUMMARYLOG + fi + +# echo "" +# echo "SUMMARY:" +# echo "" +# echo "Uname information:" +# echo " Machine: $MACH_UNAME" +# echo " Binary: $BIN_UNAME" +# echo "" + + +# if [ "$C_COMP_INFO" = "NO MATCH" ]; then +# echo "$C_COMPILER not found in RELEASE.txt" +# else +# echo "C Compiler: $C_COMPILER - $C_COMP_INFO" +# fi +# if [ "$F_COMP_INFO" = "NO MATCH" ]; then +# echo "$F_COMPILER not found in RELEASE.txt" +# else +# echo "Fortran Compiler: $F_COMPILER - $F_COMP_INFO" +# fi +# if [ "$CXX_COMP_INFO" = "NO MATCH" ]; then +# echo "$CXX_COMPILER not found in RELEASE.txt" +# else +# echo "C++ Compiler: $CXX_COMPILER - $CXX_COMP_INFO" +# fi +# echo "" + + + + + if [ "$STEP0RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 0 failed" + STEP0RESULT=0 + fi + + if [ "$STEP1RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 1 failed" + STEP1RESULT=0 + fi + + if [ "$STEP2RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 2 failed" + STEP2RESULT=0 + fi + + if [ "$STEP3RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 3 failed" + STEP3RESULT=0 + fi + + if [ "$STEP4RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 4 failed" + STEP4RESULT=0 + fi + + if [ "$STEP5RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 5 failed" + STEP5RESULT=0 + fi + + if [ "$STEP6RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 6 failed" + STEP6RESULT=0 + fi + + if [ "$STEP7RESULT" != "0" ]; then + THIS_TEST_RESULT=1 + echo "Step 7 failed" + STEP7RESULT=0 + fi + + echo "Done testing $f" + + if [ "$THIS_TEST_RESULT" != "0" ]; then + TEST_RESULT=1 + FAILED_TEST_LOGS="$FAILED_TEST_LOGS $RESULTSLOG" + fi + +done + + +echo "" +if [ "$TEST_RESULT" = "0" ]; then + echo "**** FINAL RESULT: All tests PASSED ****" +else + echo "**** FINAL RESULT: TESTS FAILED! See FAILED details in $FAILED_TEST_LOGS ****" +fi + echo "" + echo "For this version we need to perform the two following checks manually. We hope that for future versions these can also be automated, and any suggestions for accomplishing that are most welcome." + echo "" + echo "The output of \"uname -a\" for this machine is:" + echo "" + echo " $MACH_UNAME" + echo "" + echo "The \"Uname information\" line from the libhdf5.settings in this binary is:" + echo "" + echo " $BIN_UNAME" + echo "" + echo "Please verify that the above information for this machine is compatible with that from the binary." + echo "" + echo $C_COMPILER + echo "" + echo $F_COMPILER + echo "" + echo $CXX_COMPILER + echo "" + echo "Please check that these compiler versions are listed for this platform in the \"Platforms Tested\" section of the binary's RELEASE.txt file." + +#cat $THIS_DIR/*Summary + diff --git a/bin/testh51814binary.sh b/bin/testh51814binary.sh deleted file mode 100644 index 531ef8f..0000000 --- a/bin/testh51814binary.sh +++ /dev/null @@ -1,688 +0,0 @@ -#! /bin/sh - -FORTRAN=yes -ARG=$1 -if [ -n "${ARG}" ] && [ "${ARG}" = "-nofortran" ]; then - FORTRAN=no -fi - -echo "Fortran: ${FORTRAN}" - -THIS_DIR=`pwd` - -THIS_TEST_RESULT=0 -TEST_RESULT=0 -FILE_LIST=`ls` -RESULTSLOG="" -SUMMARYLOG="" -EXAMPLE1LOG="" -EXAMPLE2LOG="" -FAILED_TEST_LOGS="" - -# step 0: Check presence of top-level README file -STEP0RESULT=0 -README_FILE="" -README_FILE=`ls README` - -echo "Check for presence of top-level README file" -if test -z "$README_FILE"; then - echo "Missing Outer README file." - STEP0RESULT=1 -else - echo "Present" -fi - -for f in $FILE_LIST ; do - #be sure to start in the "top level" directory - cd $THIS_DIR - IS_TARFILE="" - UTILTEST="" - THIS_TEST_RESULT=0 - - IS_TARFILE=`ls $f | grep tar.gz` - - if [ "$f" = "utilities" ]; then - UTILTEST="yes" - cd utilities - RESULTSLOG=$THIS_DIR/utilities_Results.log - SUMMARYLOG=$THIS_DIR/utilities_Summary - echo " SUMMARY" > $SUMMARYLOG - echo "" - echo "Testing $f" - echo "" - elif [ -n "$IS_TARFILE" ] ; then - UTILTEST="" - EXTRACTED=`echo $f | sed 's/\.tar\.gz//'` - STORSH=`echo $EXTRACTED | awk -F- '{ print $NF }'` - - if [ "$STORSH" = "shared" ]; then - SHAREDLIBS=yes - else - SHAREDLIBS="" - fi - echo "" - echo "Testing $f" - - echo - echo "Unpack and install $f." - echo - EXTRACTLOG=extract_$f.log - RESULTSLOG=$THIS_DIR/${STORSH}_Results.log - SUMMARYLOG=$THIS_DIR/${STORSH}_Summary - EXAMPLE1LOG=$THIS_DIR/${STORSH}_hdf5-examples.log - EXAMPLE2LOG=$THIS_DIR/${STORSH}_share_examples.log - echo " SUMMARY" > $SUMMARYLOG - - - # Step 1: unpack binary and run h5redeploy - # Extraction not needed when testing the utilities directory ($UTILTEST = "yes") - echo "Executing step 1: Extracting $f" - tar zxvf $f > $EXTRACTLOG - cd $EXTRACTED/bin - # Check for internal README file in $EXTRACTED - echo "Check for presence of top-level README file" - STEP1RESULT=0 - README_FILE="" - README_FILE=`ls ../README` - - if test -z "$README_FILE"; then - echo "Missing Internal README file." - STEP1RESULT=1 - else - echo "Present" - fi - - else - continue - fi - - ./h5redeploy -force > ${RESULTSLOG} - - # Steps 2 & 3 don't apply for testing the utilities directory ($UTILTEST = "yes") - if [ -z "$UTILTEST" ]; then - # For testing tar files, go back up to the test directory - cd $THIS_DIR - - # Step 2 - STEP2RESULT=0 - echo "Executing step 2: Check and verify contents of the lib/libhdf5.settings file." - - # 2.1 Check Platform - # The platform information won't match exactly and is somewhat irregular. We - # can write a script with awk and sed to match enough information to determine - # a match, but it will take some thought and research to determine which parts - # to check. For now, present the output of "uname -a" and the "Uname information" - # line from libhdf5.settings and let the developer decide. - - MACH_UNAME=`uname -a` - BIN_UNAME=`grep "Uname information" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*Uname information://'` - - IS_SOLARIS=`echo $BIN_UNAME | grep SunOS` - IS_PPC64=`echo$BIN_UNAME | grep ppc64` - IS_MAC=`echo $BIN_UNAME | grep Darwin` -# if [ -n "$IS_MAC" ]; then -# IS_MAC32=`echo $BIN_UNAME | grep tejeda` -# IS_MAC64=`echo $BIN_UNAME | grep fred` -# fi - # at present we only need to know if the binary is for mac or not, so if - -# echo "The output of \"uname -a\" for this machine is:" -# echo "" -# echo " $MACH_UNAME" -# echo "" -# echo "The \"Uname information\" line from the libhdf5.settings in this binary is:" -# echo "" -# echo " $BIN_UNAME" -# echo "" - - # Probably we won't ask, just print the results in the summary - #echo "Is this the correct binary to install on this machine? (yes/no - yes to continue, no to exit)" - #read CORRECT - #if [ "$CORRECT" = "yes" ]; then - # echo "Continuing with binary tests." - #else - # echo "Exiting - Try downloading another binary for this machine." - #fi - - # 2.2 Check compiler versions in libhdf5.settings against RELEASE.txt - # Need to compare both files in detail to find unique string to compare -# grep -A 70 "^Platforms Tested$" $EXTRACTED/RELEASE.txt -# echo "" -# echo "We need to check that the compilers listed in" -# echo "$EXTRACTED/lib/libhdf5.settings are also listed" -# echo "in the \"Platforms Tested\" section of $EXTRACTED/RELEASE.txt, displayed above." -# echo "Please find the compiler version information for the following compilers" -# echo "and for this platform, $BIN_UNAME, in the \"Platforms Tested\" section (printed above)" -# echo "and enter it below." -# echo "" -# echo "For multiple lines copy a line at a time separated by a space." -# echo "" -# echo "If the compiler cannot in the \"Platforms Tested\" section above please check the RELEASE.txt file." -# echo "If no match is found there, please enter \"NO MATCH\"" -# - C_COMPILER=`grep "C Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` - F_COMPILER=`grep "Fortran Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` - CXX_COMPILER=`grep "C++ Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'` -# echo "" -# echo $C_COMPILER -# echo "" -# echo $F_COMPILER -# echo "" -# echo $CXX_COMPILER -# echo "" -# echo "Enter info from RELEASE.txt for C Compiler:" -# read C_COMP_INFO -# echo "Enter info for Fortran Compiler:" -# read F_COMP_INFO -# echo "Enter info for C++ Compiler:" -# read CXX_COMP_INFO - - # 2.3 Check libhdf5.settings for Shared and Static (Static Executables?) - STATIC=`grep Static $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes` - RETVAL=$? - if [ "$RETVAL" = "0" ]; then - #echo "Static Libraries PASSED." - echo "Static Libraries PASSED." >> $RESULTSLOG - - else - #echo "No static libraries: FAILED." - STEP2RESULT=1 - echo "No static libraries: FAILED." >> $RESULTSLOG - fi - - if [ -n "$SHAREDLIBS" ]; then - SHARED=`grep Shared $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes` - RETVAL=$? - if [ "$RETVAL" = "0" ]; then - # echo "Shared Libraries present: PASSED." - # echo $SHARED - echo "Shared Libraries present: PASSED." >> $RESULTSLOG - else - # echo "Shared libraries are missing: FAILED." - STEP2RESULT=1 - echo "Shared libraries are missing: FAILED." >> $RESULTSLOG - fi - fi - - #2.4 Check for Fortran support - SUPPORT=`grep "Fortran: yes" $EXTRACTED/lib/libhdf5.settings` - RETVAL=$? - if [ "$RETVAL" = "0" ]; then - # echo "Fortran supported: PASSED" - echo "Fortran supported: PASSED" >> $RESULTSLOG - else - # echo "Fortran not supported: FAILED" - STEP2RESULT=1 - echo "Fortran not supported: FAILED" >> $RESULTSLOG - fi - - #2.5 Check for C++ support - SUPPORT=`grep "C++: yes" $EXTRACTED/lib/libhdf5.settings` - if [ "$RETVAL" = "0" ]; then - # echo "C++ supported: PASSED" - echo "C++ supported: PASSED" >> $RESULTSLOG - else - # echo "C++ not supported: FAILED" - STEP2RESULT=1 - echo "C++ not supported: FAILED" >> $RESULTSLOG - fi - - #2.6 Check that zlib and szip are enabled - SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "deflate(zlib)"` - if [ "$RETVAL" = "0" ]; then - echo "zlib supported: PASSED" >> $RESULTSLOG - else - STEP2RESULT=1 - echo "zlib not supported: FAILED" >> $RESULTSLOG - fi - SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "szip(encoder)"` - if [ "$RETVAL" = "0" ]; then - # echo "szip with encoder supported: PASSED" - echo "szip with encoder supported: PASSED" >> $RESULTSLOG - else - # echo "szip with encoder not supported: FAILED" - STEP2RESULT=1 - echo "szip with encoder not supported: FAILED" >> $RESULTSLOG - fi - - #2.7 Check for Compilation Mode = production - PRODUCTION=`grep "Compilation Mode: production" $EXTRACTED/lib/libhdf5.settings` - if [ "$RETVAL" = "0" ]; then - #echo "Compilation Mode is production: PASSED" - echo "Compilation Mode is production: PASSED" >> $RESULTSLOG - else - #echo "Compilation Mode is development: FAILED" - STEP2RESULT=1 - echo "Compilation Mode is development: FAILED" >> $RESULTSLOG - fi - - #2.8 Check for optimization flag - OPTIMIZED=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep "\-O"` - if [ "$RETVAL" = "0" ]; then - # echo "Optimization is on: PASSED" - echo "Optimization is on: PASSED" >> $RESULTSLOG - else - # echo "No optimization found in FLAGS: FAILED" - STEP2RESULT=1 - echo "No optimization found in FLAGS: FAILED" >> $RESULTSLOG - fi - - #2.9 Check for no "-g" flags - DEBUG=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep " \-g "` - RETVAL=$? - if [ "$RETVAL" = "0" ]; then - #echo "-g flag is present: $DEBUG FAILED" - echo "-g flag is present: $DEBUG FAILED" >> $RESULTSLOG - else - #echo "-g flag is not present: PASSED" - echo "-g flag is not present: PASSED" >> $RESULTSLOG - fi - - if [ "$STEP2RESULT" = "0" ]; then - echo "PASSED" - echo "Step 2 PASSED" >> $SUMMARYLOG - else - echo "**** FAILED" - echo "**** Step 2 FAILED ****" >> $RESULTSLOG - echo "**** Step 2 FAILED ****" >> $SUMMARYLOG - fi - - # Step 3 - echo "Executing step 3: Check and verify included libraries." - STEP3RESULT=0 - - RETVAL=0 - THIS_DIR=`pwd` - cd $EXTRACTED/lib - STATIC_LIBFILES="libhdf5.a libhdf5_cpp.a libhdf5_fortran.a libhdf5_hl.a libhdf5_hl_cpp.a libhdf5hl_fortran.a libhdf5_cpp.a" - for s in $STATIC_LIBFILES ; do - if test -f $s; then - echo "found $s" >> $RESULTSLOG - else - echo "$s not found." >> $RESULTSLOG - RETVAL=1 - fi - done - if [ -n "$IS_MAC" ]; then - # Currently no shared libraries for Fortran are produced on the mac-intel machines - SHARED_LIBFILES="libhdf5_cpp.9.dylib libhdf5_hl_cpp.9.dylib libhdf5_hl.9.dylib libhdf5.9.dylib libsz.a" - elif [ -n "$IS_PPC64" ]; then - SHARED_LIBFILES="libhdf5_cpp.so.9.0.0 libhdf5_fortran.so.9.0.0 libhdf5_hl_cpp.so.9.0.0 libhdf5hl_fortran.so.9.0.0 libhdf5_hl.so.9.0.0 libhdf5.so.9.0.0" - else - SHARED_LIBFILES="libhdf5_cpp.so.9.0.0 libhdf5_fortran.so.9.0.0 libhdf5_hl_cpp.so.9.0.0 libhdf5hl_fortran.so.9.0.0 libhdf5_hl.so.9.0.0 libhdf5.so.9.0.0 libsz.so.2.0.0 libz.so.1.2.5" - fi - if [ -n "${SHAREDLIBS}" ]; then - for s in $SHARED_LIBFILES ; do - if test -f $s; then - echo "found $s" >> $RESULTSLOG - else - echo "$s not found." >> $RESULTSLOG - RETVAL=1 - fi - done - if [ "$RETVAL" = "0" ]; then - #echo "All shared and static library files are included: PASSED" - echo "All shared and static library files are included: PASSED" >> $RESULTSLOG - else - #echo "Expected library files are missing: FAILED" - STEP3RESULT=1 - echo "Expected library files are missing: FAILED" >> $RESULTSLOG - fi - else - EXTLIBS="libsz.a libz.a" - for l in $EXTLIBS ; do - if test -f $l; then - echo "found $l" >> $RESULTSLOG - else - echo "$l not found." >> $RESULTSLOG - RETVAL=1 - fi - done - if [ "$RETVAL" = "0" ]; then - # check to see if any shared library files are in the directory - # 'ls' returns 0 if it finds a match, non-zero if no match is found. - ls *.so* >& /dev/null - RETVAL=$? - if [ "$RETVAL" = "0" ]; then - #echo "Unexpected shared library files are present: FAILED" - STEP3RESULT=1 - echo "Unexpected shared library files are present: FAILED" >> $RESULTSLOG - else - #echo "Static library files are included and no shared libraries are present: PASSED" - echo "Static library files are included and no shared libraries are present: PASSED" >> $RESULTSLOG - fi - else - #echo "Expected library files are missing: FAILED" - STEP3RESULT=1 - echo "Expected library files are missing: FAILED" >> $RESULTSLOG - fi - fi - if [ "$STEP3RESULT" = "0" ]; then - echo "PASSED" - echo "Step 3 PASSED" >> $SUMMARYLOG - else - echo "**** FAILED ****" - echo "**** Step 3 FAILED ****" >> $RESULTSLOG - echo "**** Step 3 FAILED ****" >> $SUMMARYLOG - fi - # change to the $EXTRACTED/bin directory. - # For utilities testing we should already be in the utilities directory - cd ../bin - fi - - # Step 4 - echo "Executing step 4: Verify binary platform type." - STEP4RESULT=0 - - # This step is included to check that the binaries built with --enable-static-exec - # aren't dynamically linked to any libraries. --enable-static-exec doesn't work on - # solaris, and our macs and ppc64 only have dynamic zlib libraries, so we skip this step for - # those machines. - if [ -z "$IS_SOLARIS" ] && [ -z "$IS_MAC" ] && [ -z "$IS_PPC64" ]; then - RETVAL=0 - EXEC_BINFILES="gif2h5 h52gif h5copy h5debug h5diff h5dump h5import h5jam h5ls h5mkgrp h5perf_serial h5repack h5repart h5stat h5unjam" - for e in $EXEC_BINFILES ; do - if [ -n "$IS_MAC" ]; then - OUTPUT=`otool -L $e` - else - OUTPUT=`ldd $e` - fi - match_number=`expr "$OUTPUT" : '\s*not a dynamic executable'` - - if [ "$match_number" = "25" ]; then - #echo "$e $OUTPUT PASSED" - echo "$e $OUTPUT PASSED" >> $RESULTSLOG - else - #echo "$e $OUTPUT Please report whether this output is acceptable" - STEP4RESULT=1 - echo "$e $OUTPUT Please report whether this output is acceptable" >> $RESULTSLOG - fi - done - if [ "$STEP4RESULT" = "0" ]; then - #echo "Executable files ran successfully on this platform" - echo "PASSED" - echo "Step 4 PASSED" >> $SUMMARYLOG - else - #echo "Not all executable files ran successfully on this platform" - echo "**** FAILED ****" - echo "**** Step 4 FAILED ****" >> $RESULTSLOG - echo "**** Step 4 FAILED. See $RESULTSLOG for details ****" >> $SUMMARYLOG - fi - fi - - if [ -z "$UTILTEST" ]; then - # Step 5 - echo "Executing step 5: Compile and test examples in hdf5-examples repository with the tar file's h5cc, h5fc and h5c++." - - #return to the top level test directory (the starting directory) - cd $THIS_DIR - STEP5RESULT=0 - - # For the macs, we need DYLD_LIBRARY_PATH set to the lib directory of the hdf5 to be tested. - if [ -n "${IS_MAC}" ] && [ "${SHAREDLIBS}" = "yes" ]; then - DYLD_LIBRARY_PATH=$THIS_DIR/$EXTRACTED/lib - export DYLD_LIBRARY_PATH - fi - - if test -d hdf5-examples ; then - rm -rf hdf5-examples - fi - svn co https://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/ hdf5-examples > checkout.log - CC=$THIS_DIR/$EXTRACTED/bin/h5cc - export CC - FC=$THIS_DIR/$EXTRACTED/bin/h5fc - export FC - # hdf5-examples/1_8/FORTRAN fails with -O2 or higher - if [ -n "$IS_MAC" ]; then - FCFLAGS=-O1 - export FCFLAGS - fi - CXX=$THIS_DIR/$EXTRACTED/bin/h5c++ - export CXX - H5EX_16=yes - export H5EX_16 - H5EX_18=yes - export H5EX_18 - cd hdf5-examples - ./configure > ${EXAMPLE1LOG} - if [ "${FORTRAN}" = "yes" ]; then - make check > ${EXAMPLE1LOG} - else - cd 1_6 - make check > ${EXAMPLE1LOG} - cd ../1_8/C - make check >> ${EXAMPLE1LOG} - cd ../.. - fi - RETVAL=`echo $?` - NUMFAILED=`grep -c FAILED ${EXAMPLE1LOG}` - NUMFAILED0=`grep -c "# FAIL: 0" ${EXAMPLE1LOG}` - NUMPASSED=`grep -c "# PASS: 1" ${EXAMPLE1LOG}` - NUMTOTAL=`grep -c "# TOTAL: 1" ${EXAMPLE1LOG}` - NUMERR=`grep -i error ${EXAMPLE1LOG} | grep -v "# ERROR: 0" | grep -ic error` - NUMERR0=`grep -c "# ERROR: 0" ${EXAMPLE1LOG}` -# NUMPASSREQ=120 -# if [ "${FORTRAN}" = "no" ]; then -# NUMPASSREQ=102 -# fi - - if test "$RETVAL" = "0" -a "$NUMFAILED" = "0" ; then - if test "$NUMERR" = "0" -a "$NUMPASSED" = "$NUMTOTAL" -a "$NUMERR0" = "$NUMTOTAL" -a "$NUMFAILED0" = "$NUMTOTAL" ; then - echo "PASSED" - echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${RESULTSLOG} - echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${SUMMARYLOG} - else - STEP5RESULT=1 - if test $NUMERR -gt 0 -o $NUMFAILED -gt 0 ; then - echo "**** FAILED ****" - echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} - echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} - else - echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} - echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} - fi - fi - else - STEP5RESULT=1 - echo "**** FAILED ****" - echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG} - echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG} - fi - - cd $THIS_DIR - - # Step 6 NA for utilities - - # Step 6 - echo "Executing step 6: Use run-all-ex.sh to compile and run installed examples." - STEP6RESULT=0 - - cd $EXTRACTED/share/hdf5_examples - if [ "${FORTRAN}" = "no" ]; then - echo "Run c examples" - if ((cd c; sh ./run-c-ex.sh) && \ - (if test -d c++; then - echo "Run c++ examples" - cd c++; sh ./run-c++-ex.sh - fi) && \ - (if test -d hl; then - echo "Run hl examples." - cd hl && \ - (cd c; sh ./run-hlc-ex.sh) && \ - (if test -d c++; then - echo "Run hl c++ examples" - cd c++; sh ./run-hlc++-ex.sh - fi) - fi)) > $EXAMPLE2LOG; then - echo "Done" - RETVAL=0 - else - RETVAL=1 - fi - else - sh ./run-all-ex.sh > $EXAMPLE2LOG - RETVAL=$? - fi - - - if [ "$RETVAL" = "0" ]; then - echo "PASSED" - echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${RESULTSLOG} - echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${SUMMARYLOG} - else - echo "**** FAILED ****" - STEP6RESULT=1 - "**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${RESULTSLOG} - "**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${SUMMARYLOG} - fi - fi - - - # Step 7 - echo "Executing step 7: Run command -V with executables to be sure that they will run." - - STEP7PASS=0 - STEP7FAIL=0 - STEP7RESULT=0 - # h5debug and h5perf_serial don't return 0 with -V, so they aren't in this list. -h would be another - # option, but even more bin files don't return 0. h5redeploy is tested as part of install, and doesn't - # support -V. - EXEC_BINFILES="gif2h5 h52gif h5copy h5diff h5dump h5import h5jam h5ls h5mkgrp h5repack h5repart h5stat h5unjam" - for e in $EXEC_BINFILES ; do - OUTPUT=`$THIS_DIR/$EXTRACTED/bin/$e -V` - RETVAL=$? - - if [ "$RETVAL" = "0" ]; then - echo "$e $OUTPUT PASSED" >> $RESULTSLOG - STEP7PASS=`expr $STEP7PASS + 1` - else - echo "$e $OUTPUT FAILED" >> $RESULTSLOG - STEP7FAIL=`expr $STEP7FAIL + 1` - fi - done - if [ $STEP7PASS -gt 12 ] && [ $STEP7FAIL -eq 0 ]; then - echo "PASSED" - echo "Step 7 PASSED: $STEP7PASS executable files in bin ran with -V on this machine." >> $SUMMARYLOG - else - STEP7RESULT=1 - echo "**** FAILED ****" - echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $RESULTSLOG - echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $SUMMARYLOG - fi - -# echo "" -# echo "SUMMARY:" -# echo "" -# echo "Uname information:" -# echo " Machine: $MACH_UNAME" -# echo " Binary: $BIN_UNAME" -# echo "" - - -# if [ "$C_COMP_INFO" = "NO MATCH" ]; then -# echo "$C_COMPILER not found in RELEASE.txt" -# else -# echo "C Compiler: $C_COMPILER - $C_COMP_INFO" -# fi -# if [ "$F_COMP_INFO" = "NO MATCH" ]; then -# echo "$F_COMPILER not found in RELEASE.txt" -# else -# echo "Fortran Compiler: $F_COMPILER - $F_COMP_INFO" -# fi -# if [ "$CXX_COMP_INFO" = "NO MATCH" ]; then -# echo "$CXX_COMPILER not found in RELEASE.txt" -# else -# echo "C++ Compiler: $CXX_COMPILER - $CXX_COMP_INFO" -# fi -# echo "" - - - - - if [ "$STEP0RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 0 failed" - STEP0RESULT=0 - fi - - if [ "$STEP1RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 1 failed" - STEP1RESULT=0 - fi - - if [ "$STEP2RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 2 failed" - STEP2RESULT=0 - fi - - if [ "$STEP3RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 3 failed" - STEP3RESULT=0 - fi - - if [ "$STEP4RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 4 failed" - STEP4RESULT=0 - fi - - if [ "$STEP5RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 5 failed" - STEP5RESULT=0 - fi - - if [ "$STEP6RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 6 failed" - STEP6RESULT=0 - fi - - if [ "$STEP7RESULT" != "0" ]; then - THIS_TEST_RESULT=1 - echo "Step 7 failed" - STEP7RESULT=0 - fi - - echo "Done testing $f" - - if [ "$THIS_TEST_RESULT" != "0" ]; then - TEST_RESULT=1 - FAILED_TEST_LOGS="$FAILED_TEST_LOGS $RESULTSLOG" - fi - -done - - -echo "" -if [ "$TEST_RESULT" = "0" ]; then - echo "**** FINAL RESULT: All tests PASSED ****" -else - echo "**** FINAL RESULT: TESTS FAILED! See FAILED details in $FAILED_TEST_LOGS ****" -fi - echo "" - echo "For this version we need to perform the two following checks manually. We hope that for future versions these can also be automated, and any suggestions for accomplishing that are most welcome." - echo "" - echo "The output of \"uname -a\" for this machine is:" - echo "" - echo " $MACH_UNAME" - echo "" - echo "The \"Uname information\" line from the libhdf5.settings in this binary is:" - echo "" - echo " $BIN_UNAME" - echo "" - echo "Please verify that the above information for this machine is compatible with that from the binary." - echo "" - echo $C_COMPILER - echo "" - echo $F_COMPILER - echo "" - echo $CXX_COMPILER - echo "" - echo "Please check that these compiler versions are listed for this platform in the \"Platforms Tested\" section of the binary's RELEASE.txt file." - -#cat $THIS_DIR/*Summary - diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index 84af348..6cd4768 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -28,7 +28,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src lib_LTLIBRARIES=libhdf5_cpp.la # Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am) -libhdf5_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_cpp_la_LDFLAGS= -version-info $(LT_CXX_VERS_INTERFACE):$(LT_CXX_VERS_REVISION):$(LT_CXX_VERS_AGE) $(AM_LDFLAGS) bin_SCRIPTS=h5c++ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 2acaf12..f1491ea 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -673,12 +673,30 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # This is our main target lib_LTLIBRARIES = libhdf5_cpp.la # Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am) -libhdf5_cpp_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_cpp_la_LDFLAGS = -version-info $(LT_CXX_VERS_INTERFACE):$(LT_CXX_VERS_REVISION):$(LT_CXX_VERS_AGE) $(AM_LDFLAGS) bin_SCRIPTS = h5c++ # Source files for the library diff --git a/config/lt_vers.am b/config/lt_vers.am index ed7de1b..c1d11cc 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -39,11 +39,31 @@ LT_VERS_AGE = 1 ## ## Note that this versioning system doesn't attempt to handle ## the effects of the H5_V1_x_COMPAT flag. -## -## Since the revision number is automatically incremented by -## bin/h5vers, don't move LT_VERS_REVISION from the fourth line -## without also editing the script! +## Version numbers for wrapper shared library files. +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 + +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 + +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 + +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 + +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 + +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. diff --git a/configure b/configure index b023405..c8f138f 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 28012 2015-10-08 21:47:38Z lrknox . +# From configure.ac Id: configure.ac 28033 2015-10-11 13:51:41Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for HDF5 1.8.17-snap1. # diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index a4b3843..b199bce 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -32,7 +32,7 @@ AM_FCLIBS=$(LIBHDF5) lib_LTLIBRARIES=libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) -libhdf5_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_fortran_la_LDFLAGS= -version-info $(LT_F_VERS_INTERFACE):$(LT_F_VERS_REVISION):$(LT_F_VERS_AGE) $(AM_LDFLAGS) # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index e23aab7..749e76b 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -726,13 +726,31 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 AM_FCLIBS = $(LIBHDF5) # This is our main target, the fortran library lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) -libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_fortran_la_LDFLAGS = -version-info $(LT_F_VERS_INTERFACE):$(LT_F_VERS_REVISION):$(LT_F_VERS_AGE) $(AM_LDFLAGS) @BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 # Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled diff --git a/hl/c++/src/Makefile.am b/hl/c++/src/Makefile.am index b268948..c78f5fa 100644 --- a/hl/c++/src/Makefile.am +++ b/hl/c++/src/Makefile.am @@ -28,7 +28,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src lib_LTLIBRARIES=libhdf5_hl_cpp.la # Add libtool numbers to the HDF5 HL C++ library (from config/lt_vers.am) -libhdf5_hl_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_hl_cpp_la_LDFLAGS= -version-info $(LT_HL_CXX_VERS_INTERFACE):$(LT_HL_CXX_VERS_REVISION):$(LT_HL_CXX_VERS_AGE) $(AM_LDFLAGS) # Source files for the library # At the moment, only the H5PT Packet Table has a C++ API. diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 7ff2405..4617d79 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -664,12 +664,30 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # This is our main target lib_LTLIBRARIES = libhdf5_hl_cpp.la # Add libtool numbers to the HDF5 HL C++ library (from config/lt_vers.am) -libhdf5_hl_cpp_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_hl_cpp_la_LDFLAGS = -version-info $(LT_HL_CXX_VERS_INTERFACE):$(LT_HL_CXX_VERS_REVISION):$(LT_HL_CXX_VERS_AGE) $(AM_LDFLAGS) # Source files for the library # At the moment, only the H5PT Packet Table has a C++ API. diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index 512c2c8..f4d39e3 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -30,7 +30,7 @@ AM_FCFLAGS+=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/s lib_LTLIBRARIES=libhdf5hl_fortran.la # Add libtool numbers to the HDF5 HL Fortran library (from config/lt_vers.am) -libhdf5hl_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5hl_fortran_la_LDFLAGS= -version-info $(LT_HL_F_VERS_INTERFACE):$(LT_HL_F_VERS_REVISION):$(LT_HL_F_VERS_AGE) $(AM_LDFLAGS) # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index ade1ead..25240f0 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -682,12 +682,30 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # Our main target, the high-level fortran library lib_LTLIBRARIES = libhdf5hl_fortran.la # Add libtool numbers to the HDF5 HL Fortran library (from config/lt_vers.am) -libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5hl_fortran_la_LDFLAGS = -version-info $(LT_HL_F_VERS_INTERFACE):$(LT_HL_F_VERS_REVISION):$(LT_HL_F_VERS_AGE) $(AM_LDFLAGS) # Source files for the library #if BUILD_PARALLEL_CONDITIONAL diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 6ca95c54..36591d3 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -1641,229 +1641,229 @@ yyreduce: switch (yyn) { case 2: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 101 "H5LTparse.y" { memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ } break; case 3: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 102 "H5LTparse.y" { return (yyval.hid);} break; case 13: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 116 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I8BE); } break; case 14: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 117 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I8LE); } break; case 15: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 118 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I16BE); } break; case 16: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 119 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I16LE); } break; case 17: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 120 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I32BE); } break; case 18: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 121 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I32LE); } break; case 19: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 122 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I64BE); } break; case 20: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 123 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_I64LE); } break; case 21: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 124 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U8BE); } break; case 22: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 125 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U8LE); } break; case 23: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 126 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U16BE); } break; case 24: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 127 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U16LE); } break; case 25: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 128 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U32BE); } break; case 26: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 129 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U32LE); } break; case 27: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 130 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U64BE); } break; case 28: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 131 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_STD_U64LE); } break; case 29: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 132 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); } break; case 30: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 133 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); } break; case 31: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 134 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); } break; case 32: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 135 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); } break; case 33: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 136 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); } break; case 34: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 137 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); } break; case 35: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 138 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); } break; case 36: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 139 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); } break; case 37: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 140 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); } break; case 38: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 141 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); } break; case 39: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 142 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); } break; case 40: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 145 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); } break; case 41: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 146 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); } break; case 42: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 147 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); } break; case 43: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 148 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); } break; case 44: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 149 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); } break; case 45: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 150 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); } break; case 46: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 151 "H5LTparse.y" { (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); } break; case 47: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 155 "H5LTparse.y" { csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ } break; case 48: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 157 "H5LTparse.y" { (yyval.hid) = cmpd_stack[csindex].id; cmpd_stack[csindex].id = 0; @@ -1873,13 +1873,13 @@ yyreduce: break; case 51: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 166 "H5LTparse.y" { cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ } break; case 52: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 168 "H5LTparse.y" { size_t origin_size, new_size; @@ -1915,7 +1915,7 @@ yyreduce: break; case 53: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 201 "H5LTparse.y" { (yyval.sval) = yylval.sval; @@ -1923,25 +1923,25 @@ yyreduce: break; case 54: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 206 "H5LTparse.y" { (yyval.ival) = 0; } break; case 55: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 208 "H5LTparse.y" { (yyval.ival) = yylval.ival; } break; case 57: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 212 "H5LTparse.y" { asindex++; /*pushd onto the stack*/ } break; case 58: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 214 "H5LTparse.y" { (yyval.hid) = H5Tarray_create2((yyvsp[(5) - (6)].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims); @@ -1952,13 +1952,13 @@ yyreduce: break; case 61: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 224 "H5LTparse.y" { arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ } break; case 62: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 225 "H5LTparse.y" { unsigned ndims = arr_stack[asindex].ndims; arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; @@ -1968,19 +1968,19 @@ yyreduce: break; case 65: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 236 "H5LTparse.y" { (yyval.hid) = H5Tvlen_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); } break; case 66: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 241 "H5LTparse.y" { is_opq_size = 1; } break; case 67: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 242 "H5LTparse.y" { size_t size = (size_t)yylval.ival; @@ -1990,13 +1990,13 @@ yyreduce: break; case 68: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 247 "H5LTparse.y" { is_opq_tag = 1; } break; case 69: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 248 "H5LTparse.y" { H5Tset_tag((yyvsp[(7) - (13)].hid), yylval.sval); @@ -2005,19 +2005,19 @@ yyreduce: break; case 70: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 252 "H5LTparse.y" { (yyval.hid) = (yyvsp[(7) - (15)].hid); } break; case 73: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 260 "H5LTparse.y" { is_str_size = 1; } break; case 74: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 261 "H5LTparse.y" { if((yyvsp[(5) - (6)].ival) == H5T_VARIABLE_TOKEN) @@ -2029,7 +2029,7 @@ yyreduce: break; case 75: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 269 "H5LTparse.y" { if((yyvsp[(9) - (10)].ival) == H5T_STR_NULLTERM_TOKEN) @@ -2042,7 +2042,7 @@ yyreduce: break; case 76: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 278 "H5LTparse.y" { if((yyvsp[(13) - (14)].ival) == H5T_CSET_ASCII_TOKEN) @@ -2053,7 +2053,7 @@ yyreduce: break; case 77: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 285 "H5LTparse.y" { if((yyvsp[(17) - (18)].hid) == H5T_C_S1_TOKEN) @@ -2064,7 +2064,7 @@ yyreduce: break; case 78: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 292 "H5LTparse.y" { hid_t str_id = (yyvsp[(19) - (20)].hid); @@ -2085,67 +2085,67 @@ yyreduce: break; case 79: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 309 "H5LTparse.y" {(yyval.ival) = H5T_VARIABLE_TOKEN;} break; case 81: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 312 "H5LTparse.y" {(yyval.ival) = H5T_STR_NULLTERM_TOKEN;} break; case 82: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 313 "H5LTparse.y" {(yyval.ival) = H5T_STR_NULLPAD_TOKEN;} break; case 83: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 314 "H5LTparse.y" {(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;} break; case 84: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 316 "H5LTparse.y" {(yyval.ival) = H5T_CSET_ASCII_TOKEN;} break; case 85: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 317 "H5LTparse.y" {(yyval.ival) = H5T_CSET_UTF8_TOKEN;} break; case 86: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 319 "H5LTparse.y" {(yyval.hid) = H5T_C_S1_TOKEN;} break; case 87: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 320 "H5LTparse.y" {(yyval.hid) = H5T_FORTRAN_S1_TOKEN;} break; case 88: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 324 "H5LTparse.y" { is_enum = 1; enum_id = H5Tenum_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); } break; case 89: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 326 "H5LTparse.y" { is_enum = 0; /*reset*/ (yyval.hid) = enum_id; } break; case 92: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 331 "H5LTparse.y" { is_enum_memb = 1; /*indicate member of enum*/ @@ -2158,7 +2158,7 @@ yyreduce: break; case 93: -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 340 "H5LTparse.y" { char char_val=(char)yylval.ival; @@ -2205,7 +2205,7 @@ yyreduce: break; -/* Line 1807 of yacc.c */ +/* Line 1792 of yacc.c */ #line 2191 "H5LTparse.c" default: break; } diff --git a/hl/src/H5LTparse.h b/hl/src/H5LTparse.h index 621dacd..1461830 100644 --- a/hl/src/H5LTparse.h +++ b/hl/src/H5LTparse.h @@ -109,7 +109,7 @@ extern int H5LTyydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 2065 of yacc.c */ +/* Line 2058 of yacc.c */ #line 68 "H5LTparse.y" int ival; /*for integer token*/ @@ -117,7 +117,7 @@ typedef union YYSTYPE hid_t hid; /*for hid_t token*/ -/* Line 2065 of yacc.c */ +/* Line 2058 of yacc.c */ #line 122 "H5LTparse.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am index 09c24dc..f2b90d0 100644 --- a/hl/src/Makefile.am +++ b/hl/src/Makefile.am @@ -28,7 +28,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src lib_LTLIBRARIES=libhdf5_hl.la # Add libtool numbers to the HDF5 hl library (from config/lt_vers.am) -libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_hl_la_LDFLAGS= -version-info $(LT_HL_VERS_INTERFACE):$(LT_HL_VERS_REVISION):$(LT_HL_VERS_AGE) $(AM_LDFLAGS) # List sources to include in the HDF5 HL Library. libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index a1cbcc7..d350979 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -663,12 +663,30 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # This library is our main target. lib_LTLIBRARIES = libhdf5_hl.la # Add libtool numbers to the HDF5 hl library (from config/lt_vers.am) -libhdf5_hl_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) +libhdf5_hl_la_LDFLAGS = -version-info $(LT_HL_VERS_INTERFACE):$(LT_HL_VERS_REVISION):$(LT_HL_VERS_AGE) $(AM_LDFLAGS) # List sources to include in the HDF5 HL Library. libhdf5_hl_la_SOURCES = H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c diff --git a/src/Makefile.in b/src/Makefile.in index fdbbc8e..65eaf02 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -721,6 +721,24 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 LT_VERS_INTERFACE = 11 LT_VERS_REVISION = 0 LT_VERS_AGE = 1 +LT_CXX_VERS_INTERFACE = 11 +LT_CXX_VERS_REVISION = 0 +LT_CXX_VERS_AGE = 0 +LT_F_VERS_INTERFACE = 10 +LT_F_VERS_REVISION = 2 +LT_F_VERS_AGE = 0 +LT_HL_VERS_INTERFACE = 10 +LT_HL_VERS_REVISION = 2 +LT_HL_VERS_AGE = 0 +LT_HL_CXX_VERS_INTERFACE = 10 +LT_HL_CXX_VERS_REVISION = 2 +LT_HL_CXX_VERS_AGE = 0 +LT_HL_F_VERS_INTERFACE = 10 +LT_HL_F_VERS_REVISION = 2 +LT_HL_F_VERS_AGE = 0 +LT_TOOLS_VERS_INTERFACE = 10 +LT_TOOLS_VERS_REVISION = 2 +LT_TOOLS_VERS_AGE = 0 # Our main target, the HDF5 library lib_LTLIBRARIES = libhdf5.la -- cgit v0.12