I don't know if the 'with-hdf5' flag works. I would instead specify the include
and lib directories in the CPPFLAGS=-I/pathtoinclude and LDFLAGS=-L/pathtolibs
variables.
-- Ted
> On Jul 23, 2025, at 6:59 PM, Helly, John <hellyj@xxxxxxxx> wrote:
>
> Aloha.
>
> I've installed earlier versions of netCDF many, many times but I've been away
> from it for a few years (maybe more than a few).
>
> Anyway, I'm trying to install on OSX 15.5 (Sequoia) on Apple M2 hardware.
> I've (apparently) successfully installed hdf5-1.14.6 and am not trying to
> compile NC against it. But when I run this ...
>
>
> CPPFLAGS='-I/Users/hellyj/src/hdf5-1.14.6/Build/include' \
> LDFLAGS='-L/Users/hellyj/src/hdf5-1.14.6/Build/lib' \
> ./configure --prefix=/Users/hellyj/src/netcdf-c-4.9.3/Build
> --enable-netcdf-4 --enable-f90
> --with-hdf5=/Users/hellyj/src/hdf5-1.14.6/Build
> make check install
>
> This is what happens:
>
> configure: error: Compiling a test with HDF5 failed. Either hdf5.h cannot be
> found, or config.log should be checked for other reason.
> + make check install
>
> When I look at config.log the only error I find is:
>
> configure:4531: $? = 0
> configure:4520: gcc -V >&5
> gcc: error: unrecognized command-line option '-V'
>
> Which seems to be a problem with gcc arguments. However, not sure how to
> correct this in the 'configure' script or if it should be happening at all.
>
> Any advice is very welcome.
>
> Mahalo
>
> ----------------------------------------------------------------------------------------------------------------------
> John Helly / San Diego Supercomputer Center / Scripps Institution of
> Oceanography
> https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> To subscribe: netcdfgroup-join@xxxxxxxxxxxxxxxx
> To unsubscribe: netcdfgroup-leave@xxxxxxxxxxxxxxxx