From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add hdf4 Date: Mon, 30 May 2016 00:07:41 +0200 Message-ID: <87shx0tt5e.fsf@gnu.org> References: <20160523181719.GA11083@jasmine> <20160527171933.GA29109@jasmine> <87k2iel0bo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b78sB-0000NK-SF for guix-devel@gnu.org; Sun, 29 May 2016 18:07:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b78s6-00056z-IO for guix-devel@gnu.org; Sun, 29 May 2016 18:07:50 -0400 In-Reply-To: (Jeremy Robst's message of "Sun, 29 May 2016 18:36:46 +0100 (BST)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jeremy Robst Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Jeremy Robst skribis: > Here's the patch as an attachment - sorry for the hassle. I will try > and work out what's going wrong so I can send proper patches in > future. No problem! I tried the attached patch, which includes mostly cosmetic changes compared to the one you posted. However, I stumble upon test failures (on x86_64, with Linux-libre 4.6.0): --8<---------------cut here---------------start------------->8--- ---------------------------- hdftest Test Log ---------------------------- Testing create/read/write compressed datasets (tcomp.c) PASS= ED Testing create/read/write chunked datasets (tchunk.c) PASS= ED Testing reading of netCDF file using the SDxxx inteface (tnetcdf.c) PASS= ED Testing functionality of dimensions (tdim.c) PASS= ED Testing functions involving empty data sets (temptySDSs.c) PASS= ED Testing various setting attribute features (tattributes.c) PASS= ED Testing getting data size of special data (tdatasizes.c) PASS= ED Testing getting location info of data (tdatainfo.c) PASS= ED Testing getting location info of attr and annot data (tattdatainfo.c) PASS= ED Testing a mix of SD, V, and VS functions (tmixed_apis.c) PASS= ED Testing miscellaneous file related functions (tfile.c) *** R= outine test_maxopenfiles: SDstart FAILED at line 285 *** *** Routine test_maxopenfiles: SDgetfilename FAILED at line 292 *** SDgetfilename: incorrect file being opened - expected , retrieved *** Routine test_maxopenfiles: SDend FAILED at line 305 *** Testing various SDS' properties (tsdsprops.c) PASS= ED Testing various coordinate variable features (tcoordvar.c) PASS= ED Testing szip compression for datasets (tszip.c) PASS= ED *** HDF-SD test fails *** Makefile:1169: recipe for target 'hdftest.chkexe_' failed make[5]: *** [hdftest.chkexe_] Error 1 make[5]: *** Waiting for unfinished jobs.... Finished testing testmfhdf.sh=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D testmfhdf.sh Test Log =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D Running mfhdf tests =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D HDF-SD C interface tests =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D Testing create/read/write compressed datasets (tcomp.c) PASS= ED Testing create/read/write chunked datasets (tchunk.c) PASS= ED Testing reading of netCDF file using the SDxxx inteface (tnetcdf.c) PASS= ED Testing functionality of dimensions (tdim.c) PASS= ED Testing functions involving empty data sets (temptySDSs.c) PASS= ED Testing various setting attribute features (tattributes.c) PASS= ED Testing getting data size of special data (tdatasizes.c) PASS= ED Testing getting location info of data (tdatainfo.c) PASS= ED Testing getting location info of attr and annot data (tattdatainfo.c) PASS= ED Testing a mix of SD, V, and VS functions (tmixed_apis.c) PASS= ED Testing miscellaneous file related functions (tfile.c) *** R= outine test_maxopenfiles: SDstart FAILED at line 285 *** *** Routine test_maxopenfiles: SDstart FAILED at line 285 *** *** Routine test_maxopenfiles: SDstart FAILED at line 285 *** [...] SDgetfilename: incorrect file being opened - expected , retrieved <= file57> *** Routine test_maxopenfiles: SDgetfilename FAILED at line 292 *** SDgetfilename: incorrect file being opened - expected , retrieved <= file57> *** Routine test_maxopenfiles: SDgetfilename FAILED at line 292 *** SDgetfilename: incorrect file being opened - expected , retrieved <= file57> *** Routine test_maxopenfiles: SDgetfilename FAILED at line 292 *** --8<---------------cut here---------------start------------->8--- Any ideas? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-hdf4.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch >From 77afb922f470ddc97819dd8bb623450585fb2e12 Mon Sep 17 00:00:00 2001 From: Jeremy Robst Date: Mon, 23 May 2016 17:59:00 +0100 Subject: [PATCH] gnu: Add hdf4. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (hdf4): New variable. * gnu/packages/patches/hdf4-config-settings.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Court=C3=A8s --- gnu/local.mk | 1 + gnu/packages/maths.scm | 42 +++++++++++++++++++ gnu/packages/patches/hdf4-config-settings.patch | 55 +++++++++++++++++++++= ++++ 3 files changed, 98 insertions(+) create mode 100644 gnu/packages/patches/hdf4-config-settings.patch diff --git a/gnu/local.mk b/gnu/local.mk index dade736..9d608e8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -533,6 +533,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/gtk2-theme-paths.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ + %D%/packages/patches/hdf4-config-settings.patch \ %D%/packages/patches/hdf5-config-date.patch \ %D%/packages/patches/hop-bigloo-4.0b.patch \ %D%/packages/patches/hop-linker-flags.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index e11208c..b6e15f9 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -13,6 +13,7 @@ ;;; Copyright =C2=A9 2016 Roel Janssen ;;; Copyright =C2=A9 2016 Kei Kebreau ;;; Copyright =C2=A9 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2016 Jeremy Robst ;;; ;;; This file is part of GNU Guix. ;;; @@ -408,6 +409,47 @@ plotting engine by third-party applications like Octav= e.") (license (license:fsf-free "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyrigh= t")))) =20 +(define-public hdf4 + (package + (name "hdf4") + (version "4.2.11") + (source + (origin + (method url-fetch) + (uri (string-append + "http://www.hdfgroup.org/ftp/HDF/releases/HDF" version + "/src/hdf-" version ".tar.bz2")) + (sha256 + (base32 + "16yr50j845zlfx20skmw3y75ww77akk9gg0affjqkg66ih5r03mv")) + (patches (search-patches "hdf4-config-settings.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("gfortran" ,gfortran) + ("bison" ,bison) + ("flex" ,flex))) + (inputs + `(("zlib" ,zlib) + ("libjpeg" ,libjpeg))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-configure + (lambda _ + (substitute* + '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.i= n") + (("/bin/rm") "rm") + (("/bin/mkdir") "mkdir")) + #t))))) + (home-page "https://www.hdfgroup.org/products/hdf4/") + (synopsis + "Library and multi-object file format for storing and managing data") + (description "HDF4 is a library and multi-object file format for stori= ng +and managing data between machines. HDF4 is an older hiearchical data for= mat, +incompatible with HDF5.") + (license (license:non-copyleft + "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/C= OPYING")))) + (define-public hdf5 (package (name "hdf5") diff --git a/gnu/packages/patches/hdf4-config-settings.patch b/gnu/packages= /patches/hdf4-config-settings.patch new file mode 100644 index 0000000..e79362e --- /dev/null +++ b/gnu/packages/patches/hdf4-config-settings.patch @@ -0,0 +1,55 @@ +Honor SOURCE_DATE_EPOCH when exporting configuraton date. +Remove unreproducible configuration data. + +--- a/configure ++++ b/configure +@@ -23169,7 +23169,14 @@ +=20 +=20 + ## Configuration date +- CONFIG_DATE=3D"`date`" ++ CONFIG_DATE=3D"`date -u`" ++if test -n "$SOURCE_DATE_EPOCH"; then ++ CONFIG_DATE=3D`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \ ++ || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null` ++ if test -z "$CONFIG_DATE"; then ++ as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5 ++ fi ++fi +=20 + ## User doing the configuration + CONFIG_USER=3D"`whoami`@`hostname`" + +--- a/libhdf4.settings.in ++++ b/libhdf4.settings.in +@@ -5,17 +5,17 @@ + ------------------- + HDF4 Version: @H4_VERSION@ + Configured on: @CONFIG_DATE@ +- Configured by: @CONFIG_USER@ ++ Configured by: guix + Configure mode: @CONFIG_MODE@ +- Host system: @host_cpu@-@host_vendor@-@host_os@ +- Uname information: @UNAME_INFO@ ++ Host system: guix ++ Uname information: guix + Libraries: @STATIC_SHARED@ + Installation point: @prefix@ +=20 + Compiling Options: + ------------------ + Compilation Mode: @CONFIG_MODE@ +- C compiler: @CC_VERSION@ ++ C compiler:=20 + CFLAGS: @CFLAGS@ + CPPFLAGS: @CPPFLAGS@ + Shared Libraries: @enable_shared@ +@@ -29,7 +29,7 @@ + Languages: + ---------- + Fortran: @BUILD_FORTRAN@ +-@HDF_BUILD_FORTRAN_TRUE@ Fortran Compiler: @F77_VERSION@ ++@HDF_BUILD_FORTRAN_TRUE@ Fortran Compiler:=20 + @HDF_BUILD_FORTRAN_TRUE@ FFLAGS: @FFLAGS@ +=20 + Features: --=20 2.7.4 --=-=-=--