Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing r-hdf5r via spack #183

Open
perrymil opened this issue Sep 14, 2021 · 2 comments
Open

Issue installing r-hdf5r via spack #183

perrymil opened this issue Sep 14, 2021 · 2 comments

Comments

@perrymil
Copy link

perrymil commented Sep 14, 2021

Hi @hhoeflin

I tried your suggestion from #164 just now, and am getting the following error.

checking for HDF5 libraries... yes (version )
checking hdf5.h usability... no
checking hdf5.h presence... no
checking for hdf5.h... no
checking for H5Fcreate in -lhdf5... no
configure: WARNING: Unable to compile HDF5 test program
checking for hdf5_hl.h... no
checking for H5LTpath_valid in -lhdf5_hl... no
configure: WARNING: Unable to compile HDF5_HL test program
checking for main in -lhdf5_hl... no
checking for matching HDF5 Fortran wrapper... no
Found hdf5 with version: 
configure: error: The version of hdf5 installed on your system is not sufficient. Please ensure that at least version 1.8.13 is installed
ERROR: configuration failed for package ‘hdf5r’

I tried

spack install r-hdf5r ^[email protected]+hl

I think the issue is that something about the r-hdf5r package checking for hdf5 package version isn't quite right, but I am having issues tracing down where that check occurs, and how r-hdf5r goes about it.

Found hdf5 with version:

That line without a specific version of hdf5 that it found makes me think that something about the check is the issue, rather than not actually having a working hdf5 dependency?

I am using the spack develop branch.

the spack-configure-args.txt shows:

--with-hdf5=[SystemPath]/linux-centos7-ivybridge/gcc-8.3.1/hdf5-1.10.7-lizgn5qbklotstzwn63svnzrxk7sbq3y/bin/h5pcc'

I omitted the full path as its pretty long, but I have confirmed that the h5pcc file is indeed present.

If you can assist me in determining why this error keeps occuring, I will update the spack package with the correct configuration. The default spack package doesn't include the +hl dependency for hdf5 you recommended in that previous closed issue, is that required? Below is the spec output from spack:

[email protected]%[email protected] arch=linux-centos7-ivybridge
    ^[email protected]%[email protected]~cxx~fortran+hl~ipo~java+mpi+shared~szip~threadsafe+tools api=default build_type=RelWithDebInfo arch=linux-centos7-ivybridge
        ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]~symlinks+termlib abi=none arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]~docs+systemcerts arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]+cpanm+shared+threads arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected]+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected]~debug~pic+shared arch=linux-centos7-ivybridge
                        ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                            ^[email protected]%[email protected] libs=shared,static arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                        ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-ivybridge
        ^[email protected]%[email protected]~atomics~cuda~cxx~cxx_exceptions+gpfs~internal-hwloc~java~legacylaunchers~lustre~memchecker+pmi~singularity~sqlite3+static~thread_multiple+vt+wrapper-rpath fabrics=ucx schedulers=slurm arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]~cairo~cuda~gl~libudev+libxml2~netloc~nvml~opencl+pci~rocm+shared arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                        ^[email protected]%[email protected]+sigsegv patches=9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573,bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89 arch=linux-centos7-ivybridge
                            ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]~python arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected]~pic libs=shared,static arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]+openssl arch=linux-centos7-ivybridge
            ^[email protected]%[email protected] patches=4e1d78cbbb85de625bad28705e748856033eaafab92a66dffd383a3d7e00cc94,62fc8a8bf7665a60e8f4c93ebbd535647cebf74198f7afafec4c085a8825c006 arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] patches=35c449281546376449766f92d49fc121ca50e330e60fefcfc9be2af3253082c2,7793209b33013dc0f81208718c68440c5aae80e7a1c4b8d336e382525af791a7,a49dd5bac3b62daa0ff688ab4d508d71dbd2f4f8d7e2a02321926346161bf3ee arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] arch=linux-centos7-ivybridge
            ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] arch=linux-centos7-ivybridge
            ^slurm@17-2-11-1%[email protected]~gtk~hdf5~hwloc~mariadb~pmix+readline~restd sysconfdir=PREFIX/etc arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]~assertions~cm~cma~cuda~dc~debug~dm~gdrcopy~ib-hw-tm~java~knem~logging+mlx5-dv+optimizations~parameter_checking+pic+rc+thread_multiple+ud~xpmem cuda_arch=none arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]~ipo build_type=RelWithDebInfo arch=linux-centos7-ivybridge
    ^[email protected]%[email protected]~X~external-lapack~memory_profiling~rmath arch=linux-centos7-ivybridge
        ^[email protected]%[email protected]~gssapi~ldap~libidn2~librtmp~libssh~libssh2~nghttp2 tls=openssl arch=linux-centos7-ivybridge
        ^[email protected]%[email protected] cxxstd=11 arch=linux-centos7-ivybridge
            ^[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87 arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]+libbsd arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                        ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-centos7-ivybridge
                    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0 arch=linux-centos7-ivybridge
                ^[email protected]%[email protected]+column_metadata+fts~functions~rtree arch=linux-centos7-ivybridge
                ^[email protected]%[email protected] arch=linux-centos7-ivybridge
        ^[email protected]_10%[email protected] arch=linux-centos7-ivybridge
        ^[email protected]%[email protected]~jit+multibyte arch=linux-centos7-ivybridge
    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
        ^[email protected]%[email protected] arch=linux-centos7-ivybridge
    ^[email protected]%[email protected] arch=linux-centos7-ivybridge
   class RHdf5r(RPackage):
   """Interface to the 'HDF5' Binary Data Format

   'HDF5' is a data model, library and file format for storing and managing
   large amounts of data. This package provides a nearly feature complete,
   object oriented wrapper for the 'HDF5' API
   <https://support.hdfgroup.org/HDF5/doc/RM/RM_H5Front.html> using R6
   classes. Additionally, functionality is added so that 'HDF5' objects behave
   very similar to their corresponding R counterparts."""

   homepage = "https://hhoeflin.github.io/hdf5r"
   url      = "https://cloud.r-project.org/src/contrib/hdf5r_1.2.0.tar.gz"
   list_url = "https://cloud.r-project.org/src/contrib/Archive/hdf5r"

   version('1.3.3', sha256='a0f83cbf21563e81dbd1a1bd8379623ed0c9c4df4e094c75013abfd7a5271545')
   version('1.2.0', sha256='58813e334fd3f9040038345a7186e5cb02090898883ac192477a76a5b8b4fe81')

   depends_on('[email protected]:', type=('build', 'run'))
   depends_on('r-r6', type=('build', 'run'))
   depends_on('r-bit64', type=('build', 'run'))
   depends_on('[email protected]:')

   def configure_args(self):
       if 'mpi' in self.spec:
           args = [
               '--with-hdf5={0}/h5pcc'.format(self.spec['hdf5'].prefix.bin),
           ]
       else:
           args = [
               '--with-hdf5={0}/h5cc'.format(self.spec['hdf5'].prefix.bin),
           ]
       return args

The spack package includes options for including the path to hdf5 provided h5pcc file for --with-hdf5=PATH, but something about that isn't working at the moment.

I tried with [email protected] and [email protected] just now and got the same error.

checking for HDF5 libraries... yes (version )
checking hdf5.h usability... no
checking hdf5.h presence... no
checking for hdf5.h... no
checking for H5Fcreate in -lhdf5... no
configure: WARNING: Unable to compile HDF5 test program
checking for hdf5_hl.h... no
checking for H5LTpath_valid in -lhdf5_hl... no
configure: WARNING: Unable to compile HDF5_HL test program
checking for main in -lhdf5_hl... no
checking for matching HDF5 Fortran wrapper... no
Found hdf5 with version: 
configure: error: The version of hdf5 installed on your system is not sufficient. Please ensure that at least version 1.8.13 is installed
@drkrynstrng
Copy link

I think the issue is that the Spack hdf5 package switched to a CMake build which does not currently include a h5cc -showconfig option, so the configure script for this packages fails. See spack/spack#27000 and spack/spack#27634.

@mladenivkovic
Copy link

It looks like the switch to the CMake build was indeed the issue.
Unfortunately the sowftware I work with relies on h5cc and h5pcc to be around and in working condition in order to check whether a working hdf5 build is present. The current spack version does not deliver that - while an h5cc executable is built, running it results in linking errors.

A workaround I've found is to revert the contents of spack/var/spack/repos/builtin/packages/hdf5 to commit 3039237a0e7cee898d85a33b13ed6d5ab712b3f3, which was the last version before the change to the CMake build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants