[R] Building hdf5 on Windows

Philippe Grosjean phgrosje at ulb.ac.be
Fri Mar 1 12:48:34 CET 2002


Hi all,

I try to use the hdf5 package. I downloaded the Windows binary version, and
it claims it requires hdf5dll.dll library, so I download the whole hdf5
1.4.3 package from NCSA. Unfortunatelly, it crashes R. I suspect it is
because the package was probably compiled against version 1.2 of hdf5 (as
evoked in the help file?) or any other previous version, so I downloaded the
source of the package and tried to recompile it,... but I can't get trough
the configure phase. I put the path of hdf5 lib in configure.in (tried both
/xtra/hdf5 and /xtra/hdf5/lib), but sh configure always end up with "can't
find zlig", which is provided however with hdf5). What do I do wrong? Can
someone help me?

Alternatively, can someone send me the correct Windows version of
hdf5dll.dll and zlib.dll that does not crash R...
Best,

Philippe Grosjean


...........]<(({°<...............<°}))><...............................
 ) ) ) ) )	 __               	 __
( ( ( ( ( 	|__)              	|  _
 ) ) ) ) )	|   hilippe       	|__)rosjean
( ( ( ( ( 	Marine Biol. Lab., ULB, Belgium
 ) ) ) ) )	                  	 __
( ( ( ( ( 	|\  /|            	|__)
 ) ) ) ) )	| \/ |ariculture &	|__)iostatistics
( ( ( ( (
 ) ) ) ) )	e-mail: phgrosje at ulb.ac.be or phgrosjean at sciviews.org
( ( ( ( ( 	SciViews project coordinator (http://www.sciviews.org)
 ) ) ) ) )      tel: 00-32-2-650.29.70 (lab), 00-32-2-673.31.33 (home)
( ( ( ( (
 ) ) ) ) )      "I'm 100% confident that p is between 0 and 1"
( ( ( ( (                                  L. Gonick & W. Smith (1993)
 ) ) ) ) )
.......................................................................



=== my configure.in =================
AC_INIT(DESCRIPTION)
AC_PROG_CC

AC_ARG_WITH(zlib,  --with-zlib=/XTRA/hdf5)

if test -n "$with_zlib"; then
  ZLIBLDFLAGS=-L${with_zlib}/lib
  ZLIBCPPFLAGS=-I${with_zlib}/include
fi

AC_ARG_WITH(hdf5,  --with-hdf5=/XTRA/hdf5)

if test -n "$with_hdf5"; then
  HDF5LDFLAGS=-L${with_hdf5}/lib
  HDF5CPPFLAGS=-I${with_hdf5}/include
fi

LIBS=-lm
CPPFLAGS="$ZLIBCPPFLAGS $HDF5CPPFLAGS $CPPFLAGS"
LDFLAGS="$HDF5LDFLAGS $ZLIBLDFLAGS $LDFLAGS"

AC_SEARCH_LIBS(inflate, z, have_zlib=yes, have_zlib=no)
AC_SEARCH_LIBS(H5open, hdf5, have_hdf5=yes, have_hdf5=no)

if test $have_zlib = no; then
  AC_MSG_ERROR(Can't find zlib)
fi

if test "$have_hdf5" = yes; then
  AC_MSG_CHECKING(for sufficiently new HDF5)
  AC_TRY_LINK([#include <hdf5.h>],
    [ H5T_pers_t convtype = H5T_PERS_SOFT;
      H5Tclose ((hid_t) 0);],
      have_hdf5=yes,
      have_hdf5=no)
   AC_MSG_RESULT($have_hdf5)
fi

if test $have_hdf5 = no; then
  AC_MSG_ERROR(Can't find HDF5)
fi

AC_SUBST(ZLIBCPPFLAGS)
AC_SUBST(ZLIBLDFLAGS)
AC_SUBST(HDF5CPPFLAGS)
AC_SUBST(HDF5LDFLAGS)

AC_OUTPUT(src/Makevars)
======================================================

==== my config.log after running "sh configure" =======
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.52.  Invocation command line was

  $ configure

## ---------- ##
## Platform.  ##
## ---------- ##

hostname = NEMO
uname -m = unknown
uname -r = unknown
uname -s = unknown
uname -v = unknown

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH =
/cygdrive/d/Perl/bin/:/xtra/Tcl/bin:/XTRA:/PROGRA~1/OX/BIN:/WINDOWS:/WINDOWS
/system32:/WINDOWS/system32/WBEM:/Xtra/ResKit:/Xtra/ResKit/Perl:/xtra/matlab
_sv12/bin/win32:/progra~1/ggobi:/Program Files/Fichiers communs/Adaptec
Shared/System:/bin:/xtra/R/rw1041/bin:/xtra/R/compile/bin:/Program
Files/HTML Help Workshop:/Program Files/Microsoft Visual
Studio/Common/Tools/WinNT

## ------------ ##
## Core tests.  ##
## ------------ ##

configure:910: PATH=".;."; conftest.sh
conftest.sh: not found
configure:913: $? = 127
configure:965: checking for gcc
configure:980: found /xtra/R/compile/bin/gcc
configure:988: result: gcc
configure:1216: checking for C compiler version
configure:1219: gcc --version </dev/null >&5
2.95.3-6
configure:1222: $? = 0
configure:1224: gcc -v </dev/null >&5
Reading specs from
C:/xtra/R/compile/bin/../lib/gcc-lib/mingw32/2.95.3-6/specs
gcc version 2.95.3-6 (mingw special)
configure:1227: $? = 0
configure:1229: gcc -V </dev/null >&5
gcc.exe: argument to `-V' is missing
configure:1232: $? = 1
configure:1252: checking for C compiler default output
configure:1255: gcc    conftest.c  >&5
configure:1258: $? = 0
configure:1287: result: C:\XTRA\R\compile\libsrc\hdf5\a.exe
configure:1292: checking whether the C compiler works
configure:1298: ./C:\XTRA\R\compile\libsrc\hdf5\a.exe
configure:1301: $? = 0
configure:1316: result: yes
configure:1323: checking whether we are cross compiling
configure:1325: result: no
configure:1328: checking for executable suffix
configure:1330: gcc -o conftest.exe    conftest.c  >&5
configure:1333: $? = 0
configure:1355: result: .exe
configure:1361: checking for object suffix
configure:1379: gcc -c   conftest.c >&5
configure:1382: $? = 0
configure:1401: result: o
configure:1405: checking whether we are using the GNU C compiler
configure:1426: gcc -c   conftest.c >&5
configure:1429: $? = 0
configure:1432: test -s conftest.o
configure:1435: $? = 0
configure:1447: result: yes
configure:1453: checking whether gcc accepts -g
configure:1471: gcc -c -g  conftest.c >&5
configure:1474: $? = 0
configure:1477: test -s conftest.o
configure:1480: $? = 0
configure:1490: result: yes
configure:1517: gcc -c -g -O2  conftest.c >&5
conftest.c:2: parse error before `me'
configure:1520: $? = 1
configure: failed program was:
#ifndef __cplusplus
  choke me
#endif
configure:1644: checking for library containing inflate
configure:1671: gcc -o conftest.exe -g -O2       conftest.c -lm >&5
C:\Temp\ccoPaaaa.o: In function `main':
//C/XTRA/R/compile/libsrc/hdf5/configure:1664: undefined reference to
`inflate'
configure:1674: $? = 1
configure: failed program was:
#line 1652 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char inflate ();
int
main ()
{
inflate ();
  ;
  return 0;
}
configure:1711: gcc -o conftest.exe -g -O2       conftest.c -lz  -lm >&5
C:\xtra\R\compile\bin\..\lib\gcc-lib\mingw32\2.95.3-6\..\..\..\..\mingw32\bi
n\ld.exe: cannot find -lz
configure:1714: $? = 1
configure: failed program was:
#line 1692 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char inflate ();
int
main ()
{
inflate ();
  ;
  return 0;
}
configure:1733: result: no
configure:1742: checking for library containing H5open
configure:1769: gcc -o conftest.exe -g -O2       conftest.c -lm >&5
C:\Temp\ccoPaaaa.o: In function `main':
//C/XTRA/R/compile/libsrc/hdf5/configure:1762: undefined reference to
`H5open'
configure:1772: $? = 1
configure: failed program was:
#line 1750 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char H5open ();
int
main ()
{
H5open ();
  ;
  return 0;
}
configure:1809: gcc -o conftest.exe -g -O2       conftest.c -lhdf5  -lm >&5
C:\xtra\R\compile\bin\..\lib\gcc-lib\mingw32\2.95.3-6\..\..\..\..\mingw32\bi
n\ld.exe: cannot find -lhdf5
configure:1812: $? = 1
configure: failed program was:
#line 1790 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char H5open ();
int
main ()
{
H5open ();
  ;
  return 0;
}
configure:1831: result: no
configure:1841: error: Can't find zlib

## ----------------- ##
## Cache variables.  ##
## ----------------- ##

ac_cv_prog_cc_g='yes'
ac_cv_env_LDFLAGS_set=''
ac_cv_c_compiler_gnu='yes'
ac_cv_exeext='.exe'
ac_cv_env_CFLAGS_set=''
ac_cv_search_H5open='no'
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_host_alias_set=''
ac_cv_env_build_alias_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CC_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_host_alias_value=''
ac_cv_search_inflate='no'
ac_cv_env_build_alias_value=''
ac_cv_prog_ac_ct_CC='gcc'
ac_cv_env_target_alias_value=''
ac_cv_env_CC_value=''
ac_cv_objext='o'


configure: exit 1
=======================================================




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list