Unidata / netcdf-c

Official GitHub repository for netCDF-C libraries and utilities.
BSD 3-Clause "New" or "Revised" License
508 stars 262 forks source link

netcdf-c 4.9.2 on spack not building #2902

Open JWGits opened 5 months ago

JWGits commented 5 months ago

I'm running this Spack install on the command line:

spack install esmf esmf_comm=openmpi esmf_os=Linux ^netcdf-fortran~shared ^netcdf-c~shared ^hdf5~shared ^openblas ^parallel-netcdf ^openmpi ^parallelio

The solve gives netcdf-c@4.9.2 but it won't build. It gets stuck at line 444 in configure_args:

/scratch/jw2636/spack/var/spack/repos/builtin/packages/netcdf-c/package.py:444, in configure_args:
        441        if "~shared" in hdf5:
        442            if "+szip" in hdf5:
        443                extra_libs.append(hdf5["szip"].libs)
>>      444            extra_libs.append(hdf5["zlib"].libs)
        445
        446        if self.spec.satisfies("@4.9.0:+shared"):
        447            lib_search_dirs.extend(self.spec["zlib-api"].libs.directories)

I've currently set netcdf-c to 4.9.0 and I'm retrying the ESMF build.

Update:

I was not able to find any combination of Spack's available netcdf-c and hdf5 versions that worked when both used ~shared. However I was able to fully compile netcdf-c when I removed ~shared from hdf5. This skips over line 441's if "~shared" in hdf5: logic, thus not failing when trying to append hdf5["zlib"].lib. Digging deeper it seems like the ~shared assignment is in flux. I'm very new to Spack (this week) so this is probably a closeable issue. Thanks!

edwardhartnett commented 4 weeks ago

No member of the netCDF team actually maintains the spack package file. I would love to be more involved in it, but that's not happened yet.