Re: [netcdfgroup] Problems Installing netcdf-c-4.9.3

  • To: "Helly, John" <hellyj@xxxxxxxx>
  • Subject: Re: [netcdfgroup] Problems Installing netcdf-c-4.9.3
  • From: Dave Allured - NOAA Affiliate <dave.allured@xxxxxxxx>
  • Date: Thu, 24 Jul 2025 13:17:00 -0600
Correction.  I missed "Compiling a test".  Run "make" and "make check"
separately.  Which part gets the error?


On Thu, Jul 24, 2025 at 1:11 PM Dave Allured - NOAA Affiliate <
dave.allured@xxxxxxxx> wrote:

> The message for gcc -V is expected and should be ignored.  That is simply
> part of configure's normal mechanism for checking compiler features.
>
> Please remove "--enable-f90".  That is no longer a valid option in modern
> versions of netcdf-C.  The fortran library is now compiled separately.  I
> do not think this would cause your problem, though.
>
> The real error appears to be in a small configure test program that tries
> to compile with "include hdf5.h".  Does the file
> /Users/hellyj/src/hdf5-1.14.6/Build/include/hdf5.h exist?  There are other
> possible causes for this test failure.  I have seen this happen with
> miscellaneous problems linking with libhdf5 or other dependency libraries .
> Examine the end of config.log for more details.  Perhaps copy out the small
> test program, and try to compile and run it as stand-alone.  Post the full
> config.log as attachment, if needed.
>
> Netcdf-C 4.9.3 with HDF5 is building fine on Sequoia arm64 (M1/M2/M3), on
> MacPorts and Homebrew.
>
>
> On Thu, Jul 24, 2025 at 11:58 AM 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
>>
>
  • 2025 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: